Skip to content

Create a local pipeline for Git releasing and Jenkins Build/Deploying Jobs in MDTP

Notifications You must be signed in to change notification settings

joseblas/release

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is based on the works of HMRC from

https://github.com/hmrc/release

Improvements

  1. No need to download the project to release/tag. Done remotely in GitHub.
  2. Use of native Python Libs for GitHub and Jenkins.
  3. Creates a pipeline to tag, build and deploy the app in several Envs (only QA by now)

Releasing an artifact

This repo provides a script that allows to tag a git repository:

It looks if the specified build completed successfully

  1. Gets the commit id from the build
  2. Suggests you the new version
  3. Tags the repository

Prepare the environment

Set up your local configuration by creating a file ~/.hmrc/release.conf which is a json formatted file that should look like this:

{
    "jenkins":"https://ci-dev...",
    "jenkins_build": "https://ci-build...",
    "jenkins_qa": "https://deploy-qa...",
    "jenkins_staging": "https://deploy-staging...",
    "github_api": "https://github.../api/v3",
    "git_username": "jose-taboada",
    "git_email": "jose.taboada@...",
    "git_token": "69...",
    "jenkins_user":"jose.taboada",
    "jenkins_key":"<dev-key>",
    "jenkins_build_key": "<build-key>",
    "jenkins_qa_key": "<QA-key>",
    "jenkins_qa_key": "<Staging-key>"
}

How to create Git token: Add repo and admin:org profiles

In addition to that you need some python libraries (setup pip and virtualenv if needed) $ virtualenv virtual_release $ source virtual_release/bin/activate $ pip install -r requirements.txt

Release

./bin/mdtp.py release 'app' 'env' ./bin/mdtp.py deploy 'app' 'version' 'env'

'env' could be: dev, qa, staging or prod License

This code is open source software licensed under the Apache 2.0 License.

About

Create a local pipeline for Git releasing and Jenkins Build/Deploying Jobs in MDTP

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages