eea.docker.gitflow
Used in jenkins to test github pull requests prerequisites and make releases.
Pull request checks on eggs:
To run from jenkins:
$docker run -i --name="$BUILD_TAG-gitflow-pr" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e GIT_NAME="$GIT_NAME" eeacms/gitflow
Variables
GIT_NAME - Mandatory, repository name, example: "eea.testegg"
GIT_ORG - Organisation name, default: "eea"
GIT_VERSIONFILE - Location of the Versionfile, default: "eea/testegg/version.txt"
GIT_HISTORYFILE - Location of the changelog, default:"docs/HISTORY.txt"
The checks:
History file updated in pull request
Version file updated in pull request
Version is not present in git tags
Version format is number.number
New version is bigger than last released version or no versions released yet
Egg Release on commit to master
To run from jenkins:
$docker run -i --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e EGGREPO_USERNAME="$EGGREPO_USERNAME" -e EGGREPO_PASSWORD="$EGGREPO_PASSWORD" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" eeacms/gitflow
Variables
GIT_NAME - Mandatory, repository name, example: "eea.testegg"
GIT_ORG - Organisation name, default: "eea"
GIT_VERSIONFILE - Location of the Versionfile, default: "eea/testegg/version.txt"
GIT_USERNAME - User that will do the changes in github, default "EEA Jenkins"
GIT_EMAIL - Email that will do the changes in github, default value set in code
EGGREPO_URL - URL of Repository for python eggs - default: https://eggrepo.eea.europa.eu/
KGS_GITNAME - Repository name on github for KGS (Docker image for Plone with EEA Common Add-ons) - default: eea.docker.kgs
KGS_VERSIONS_PATH - Location of file from KGS where the version of the egg is configured - default: src/plone/versions.cfg
Jenkins secret variables
EGGREPO_USERNAME, EGGREPO_PASSWORD - user and password for eggrepo
GIT_TOKEN - token used for GitHub API
The release steps:
Release on EGGREPO_URL
Create tag on GIT_NAME repo with released version
Update in KGS_GITNAME repo with the released version
All the steps can be rerun, the job skipping the steps already processed
KGS release on commit to master
Is done only if there are files changed since the latest release.
Version is calculated using current date - YY.MM.DD.
Waits for dockerhub to finish the build before modifying the www Dockerfile.
To run from jenkins:
$docker run -i --rm --name="$BUILD_TAG-nightlyrelease" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" eeacms/gitflow'
Variables
GIT_NAME - Mandatory, repository name, example: "eea.docker.kgs"
GIT_ORG - Organisation name, default: "eea"
GIT_USERNAME - User that will do the changes in github, default "EEA Jenkins"
GIT_EMAIL - Email that will do the changes in github, default value set in code
EGGREPO_URL - URL of Repository for python eggs - default: https://eggrepo.eea.europa.eu/
KGS_GITNAME - Repository name on github for KGS (Docker image for Plone with EEA Common Add-ons) - default: eea.docker.kgs
WWW_GITNAME - Repository name on github for WWW (EEA Plone WWW Docker Image based on EEA KGS) - default: eea.docker.plone-eea-www
DOCKERHUB_KGSREPO - DockerHub repository name - default: eeacms/kgs
Jenkins secret variables
GIT_TOKEN - Mandatory, the token used for GitHub API
Apache/Varnish release on commit to master
To run from jenkins:
$docker run -i --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME=eea.docker.apache-eea-www -e GIT_TOKEN="$GITHUB_TOKEN" eeacms/gitflow
and
$docker run -i --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME=eea.docker.varnish-eea-www -e GIT_TOKEN="$GITHUB_TOKEN" eeacms/gitflow