Giter Site home page Giter Site logo

kata-jenkins's Introduction

Jenkins Kata

  • If you enjoyed this kata you can continue with the Second part.

Requirements

Install Docker
Run Jenkins
$ # Run inside docker container
$ docker run --rm -d \
	-p 8080:8080 \
	-v jenkins_home:/var/jenkins_home \
	--name my-jenkins \
	jenkins/jenkins:lts
	
$ # Get the admin password
$ docker exec -it my-jenkins cat /var/jenkins_home/secrets/initialAdminPassword

$ # Stop Jenkins
$ docker kill my-jenkins
Install Jenkins Plugins
  • Recommended plugins.
  • Blue Ocean.
  • Pipeline: AWS Steps.
  • Slack Notification Plugin.
Slack account for notifications
  • Notifications channel #jenkins.
AWS account for artifact uploads
  • S3 bucket pipeline_kata/my-team-name.
Fork this repository

Kata steps:

  1. Create a pipeline job. You can use the Scripted or Declarative Pipeline.
  2. Download the source code from the forked repository (master branch).
  3. Build the project and launch the unit tests. You can use the following command:
    $ mvn clean package -Drevision=${VERSION}
    
    Create a version using the current job build number.
    Hint: you need to install Maven 3.5.0 or newer.
  4. Publish on Jenkins your test results using the junit step.
    Get the build result (JAR) from the /target directory and save it in Jenkins for later retrieval. You can use the archive step.
  5. Upload the JAR to AWS S3 bucket (create a directory with you team name). Take care how you store your credentials.
    Hint: you need AWS credentials for this step.
  6. Send Slack notification in case of successful or failed execution. You can send any information like job name, build number, message color etc...
    Hint: you need the Slack URL and a token for this step.
  7. Pipeline as code. Move the pipeline code in a Jenkinsfile and push it to the same repository. Pool the repository to detect any commit changes and start the build without manual steps.

Documentation

kata-jenkins's People

Contributors

laurentiu-marcut avatar

Watchers

Nacho Cougil avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.