From 081fe41c826bc3067b823612fbb0a28cf2e8e5c0 Mon Sep 17 00:00:00 2001 From: Joseph Manley Date: Thu, 18 Jul 2019 16:50:57 -0400 Subject: [PATCH] Fixed tagging, fixed self versioning, and push latest --- .bumpversion.cfg | 8 ++++---- Jenkinsfile | 6 +++--- VERSION | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 9497194..e4a5bf9 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -6,11 +6,11 @@ tag_name = {new_version} message = Bump version: {current_version} -> {new_version} [bumpversion:file:semver.semver] -search = version = {current_version} -replace = version = {new_version} +search = __version__ = {current_version} +replace = __version__ = {new_version} [semver] -main_branches = develops, env-test, env-stage, env-prod +main_branches = develop major_branches = -minor_branches = feature, RightBrain-Networks/feature +minor_branches = feature patch_branches = hotfix, bugfix diff --git a/Jenkinsfile b/Jenkinsfile index 2ba6340..93c6ec3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,12 +6,12 @@ pipeline { environment { SERVICE = 'auto-semver' GITHUB_KEY = 'autosemverDeployKey' - GITHUB_URL = 'https://github.com/RightBrain-Networks/auto-semver' + GITHUB_URL = 'git@github.com:RightBrain-Networks/auto-semver.git' DOCKER_REGISTRY = '356438515751.dkr.ecr.us-east-1.amazonaws.com' //Image tag to use for self-versioning - SELF_SEMVER_TAG = "HEAD" + SELF_SEMVER_TAG = "bugfix.pipeline" } stages { @@ -79,7 +79,7 @@ pipeline { sh "docker push ${env.DOCKER_REGISTRY}/${env.SERVICE}:${env.VERSION}" script { - if("${env.BRANCH_NAME}" != "develop") + if("${env.BRANCH_NAME}" == "develop") { sh "docker tag ${env.DOCKER_REGISTRY}/${env.SERVICE}:${env.VERSION} ${env.DOCKER_REGISTRY}/${env.SERVICE}:latest" sh "docker push ${env.DOCKER_REGISTRY}/${env.SERVICE}:latest" diff --git a/VERSION b/VERSION index 71a5aa4..d93206f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -version=1.0.6 +__version__ = 1.0.6 \ No newline at end of file