documentation

CI/CD in Jenkins

Galaxy Server Update

Jenkins job executed every night at ~ 4:00 CET.
It runs ansible playbook sn06.yml from infrastructure-playbook repository. The playbook updates Galaxy server and runs all the included roles.

The configuration overview of the usegalaxy.it-sn06 Jenkins job:

General:

Source Code Management:

Build Triggers:

Build Environment:

Build Steps:

Post-build Actions:

Usegalaxy.it Tools Update

Jenkins jobs run every night at ~ 3:00 CET.
usegalaxy.it-tools installs and updates tools, saving the logs and updating tools repo with new lockfiles. It sends an email to a specified list of recipients in case of job failure.
usegalaxy.it-restart-gunicorns is triggered if the previous job is successful. It restarts gunicorns one by one in order to make the newly installed tools visible and accessible by users.
usegalaxy.it-tools-reports job runs if the previous job is successful and transforms logs into the Markdown report, saving it to github repo.

Install/Update Tools

The configuration overview of the usegalaxy.it-tools Jenkins job:

General:

Source Code Management:

Build Triggers:

Build Environment:

Build Steps:

Post-build Actions:

Restart Gunicorns

The configuration overview of the usegalaxy.it-restart-gunicorns Jenkins job:

General:

Source Code Management:

Build Triggers:

Build Environment:

Build Steps:

Push Reports

The configuration overview of the usegalaxy.it-tools-reports Jenkins job:

General:

Source Code Management:

Build Triggers:

Build Environment:

Build Steps:

Post-build Actions:

Email Notifications Guide

Email notifications are enables by mailer Jenkins plugin.
To send email notifications from gmail account, some steps need to be performed with gmail account and Jenkins settings. They are generally described below:

Jenkins mailer setup:

  1. In the Gmail account
    • Log in to the Gmail account.
    • Go to Settings
    • “How you sign in to Google” → enable and configure 2 step verification
    • When it’s enabled go again to “How you sign in to Google” → “2-step Verification”
    • Scroll down to “App passwords”
    • Generate application password (Other) and save it to use in Jenkins
  2. In Jenkins
    • Log in to Jenkins as an administrator.
    • Go to “Manage Jenkins” > “Configure System.”
    • Scroll down to the “E-mail Notification” section.
    • Enter the following details:
      • SMTP server: smtp.gmail.com
      • Click “Advanced”
      • “Use SMTP Authentication”: checked
      • User Name: <the_gmail_address_you_configured>
      • Password: <application-specific_password_generated_in_step_1>
      • “Use SSL”: checked
      • SMTP Port: 465
    • “Test configuration by sending test email”: checked
    • Enter the same email or your email address, where you can check the incoming messages
    • Click “Test Configuration” in the bottom right corner
    • Check if you got the message
  3. In a Jenkins project:
    • Add post-build actions
    • “E-mail Notification”
    • Enter where to send notification
    • “Send e-mail for every unstable build”: checked

Now you’ll get messages in case of failure, and when the project is back to normal

References

Author Information

Polina Khmelevskaia