Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The current Jenkins configuration consists of 3 pipelines: one for dashboard-frontend dashboard, one for dashboard-backend dashboard, and one for mobile-backend mobile. The pipelines are configured to automatically build , test (with poor coverage, as no proper unit tests existed at the time of writing), and then deploy all code pushed to the master branches of each Github repository for the three pipelines. Finally the docker image after a push to the master branch (Github uses webhook to notify Jenkins that a new push is made). It then docker push the image to our private docker registry, called nexus, which is hosted on our K8s Cluster. Finally, an email with all output from each pipeline job run and the results of the job are sent to the the diaperjenkins@gmail.com email email address (password set to the  password password stored in the login secrets file on Box). 

Each pipeline is currently hosted here infantDIAPER-nutrition-project/jenkins-pipelines in the for of three separate Jenkinsfiles which specify the main behavior of the pipelines.

...

If you want to build a new Jenkins pipeline, you start by navigating to the Jenkins dashboard, login with the username and password.

Click clicking "New Item," then enter a name and click "Pipeline," followed by "Ok." Then configure the pipeline with the following options:

Image Removed

Image Removed

Image Removed

You can then study previously created JenkinsFiles for the format of the new JenkinsFile needed to create the new pipeline and the plugins used (most importantly the "Publish Over SSH" plugin). You will likely need to SSH into a machine to deploy and for that you need to also configure the SSH credentials for that server in the "Publish Over SSH" options under "Configure System" on the "Manage Jenkins" page as exemplified here:

 Image Removed

Image Added

Then you'll update the Jenkinsfile for you pipeline (likely initially created as a copy of an existing Jenkinsfile) with the name you gave the server in the previous step everywhere there is a "shh Publisher" step in the Jenkinsfile. You also need to change the Git checkout step in the file to pull from the desired repository you are deploying with the new pipeline. Finally, you need to add web hooks to that very repository with the following configuration:


Image RemovedImage Added 

Troubleshooting

...

Code Block
$ sudo systemctl restart jenkins

...


For other issues with the Jenkins server itself consider making sure its SSL cert is not expired or checking the status of the nginx server.

...

If Jenkins is up and running and anything goes wrong with a build you should consult the errors either sent to the email or stored in the failed job report in Jenkins. You can find this by navigating to jenkins.diaper-project.cf com and signing in with the username and password stored in the Cornell Box and clicking on the relevant job.

...