From 855b96deae568bdaa5c8d77927eaad6fbce81d79 Mon Sep 17 00:00:00 2001 From: Andrea Carbone Date: Fri, 31 May 2024 16:59:31 +0200 Subject: [PATCH 1/5] cicd edit to allow rc build --- .travis.yml | 2 +- ci/docker.sh | 3 ++- ci/setup_env.sh | 36 +++++++++++++++++++++++------------- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 635e4d7..035f41d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ git: env: global: - PROD_RELEASE_BRANCH=main - - DEV_RELEASE_BRANCH=development + - DEV_RELEASE_BRANCH=cicd-rc-addition before_script: - source ci/setup_env.sh diff --git a/ci/docker.sh b/ci/docker.sh index 9e6c1a5..08e9cf9 100755 --- a/ci/docker.sh +++ b/ci/docker.sh @@ -1,5 +1,6 @@ #!/bin/bash set -eEuo pipefail +set -x workdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." &> /dev/null && pwd )" evmapp_docker_image_name="${EVMAPP_DOCKER_IMAGE_NAME:-evmapp}" @@ -66,7 +67,7 @@ if [ -n "${docker_tag}" ]; then for tag in "${tags[@]}"; do echo "" && echo "Publishing docker image: ${docker_image}:${tag}" docker tag "${docker_image}:${docker_tag}" "index.docker.io/${docker_hub_org}/${docker_image}:${tag}" - docker push "index.docker.io/${docker_hub_org}/${docker_image}:${tag}" +# docker push "index.docker.io/${docker_hub_org}/${docker_image}:${tag}" done done fi diff --git a/ci/setup_env.sh b/ci/setup_env.sh index fe15333..0ec342c 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -1,5 +1,6 @@ #!/bin/bash set -eo pipefail +set -x IS_A_RELEASE="false" IS_A_GH_PRERELEASE="false" @@ -98,8 +99,8 @@ if [ -n "${TRAVIS_TAG}" ]; then check_signed_tag "${TRAVIS_TAG}" # Checking format of production release pom version - if ! [[ "${ROOT_POM_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?(-RC[0-9]+)?$ ]]; then - echo "Warning: package(s) version is in the wrong format for PRODUCTION} release. Expecting: d.d.d(-RC[0-9]+)?. The build is not going to be released !!!" + if ! [[ "${ROOT_POM_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?$ ]]; then + echo "Warning: package(s) version is in the wrong format for PRODUCTION} release. Expecting: d.d.d+(-[0-9]+)?. The build is not going to be released !!!" export IS_A_RELEASE="false" fi @@ -124,21 +125,30 @@ if [ -n "${TRAVIS_TAG}" ]; then check_signed_tag "${TRAVIS_TAG}" # Checking if package version matches DEV release version - if ! [[ "${ROOT_POM_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?(-RC[0-9]+)?(-SNAPSHOT){1}$ ]]; then - echo "Warning: package(s) version is in the wrong format for DEVELOPMENT release. Expecting: d.d.d(-RC[0-9]+)?(-SNAPSHOT){1}. The build is not going to be released !!!" - export IS_A_RELEASE="false" - fi - - # Checking Github tag format - if ! [[ "${TRAVIS_TAG}" =~ "${ROOT_POM_VERSION}"[0-9]*$ ]]; then - echo "" && echo "=== Warning: GIT tag format differs from the pom file version. ===" && echo "" - echo -e "Github tag name: ${TRAVIS_TAG}\nPom file version: ${ROOT_POM_VERSION}.\nThe build is not going to be released !!!" + if [[ "${ROOT_POM_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?(-SNAPSHOT){1}$ ]]; then + if [[ "${TRAVIS_TAG}" =~ "${ROOT_POM_VERSION}"[0-9]*$ ]]; then + echo "" && echo "=== Development release ===" && echo "" + export IS_A_RELEASE="true" + else + echo "" && echo "=== Warning: GIT tag format differs from the pom file version. ===" && echo "" + echo -e "Github tag name: ${TRAVIS_TAG}\nPom file version: ${ROOT_POM_VERSION}.\nThe build is not going to be released !!!" + export IS_A_RELEASE="false" + fi + elif [[ "${ROOT_POM_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-RC[0-9]+){1}$ ]]; then + if [[ "${TRAVIS_TAG}" == "${ROOT_POM_VERSION}" ]]; then + echo "" && echo "=== RC release ===" && echo "" + export IS_A_RELEASE="true" + else + echo "" && echo "=== Warning: GIT tag format differs from the pom file version. ===" && echo "" + echo -e "Github tag name: ${TRAVIS_TAG}\nPom file version: ${ROOT_POM_VERSION}.\nThe build is not going to be released !!!" + export IS_A_RELEASE="false" + fi + else + echo "Warning: package(s) version is in the wrong format for DEVELOPMENT or RC release. Expecting: d.d.d(-SNAPSHOT){1} or d.d.d(-RC[0-9]+){1}. The build is not going to be released !!!" export IS_A_RELEASE="false" fi if [ "${IS_A_RELEASE}" = "true" ]; then - echo "" && echo "=== Development release ===" && echo "" - export PROD_RELEASE="false" export IS_A_GH_PRERELEASE="true" fi From 21f9770e32095022e93670b3cf45221ee2c352eb Mon Sep 17 00:00:00 2001 From: Andrea Carbone Date: Fri, 31 May 2024 17:49:13 +0200 Subject: [PATCH 2/5] pom update --- bootstraptool/pom.xml | 4 ++-- node/pom.xml | 2 +- pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstraptool/pom.xml b/bootstraptool/pom.xml index d8e5cba..c61c4ab 100644 --- a/bootstraptool/pom.xml +++ b/bootstraptool/pom.xml @@ -3,7 +3,7 @@ 4.0.0 io.horizen bootstraptool - 1.4.0-SNAPSHOT + 0.0.1-RC1 2023 UTF-8 @@ -21,7 +21,7 @@ io.horizen eon - 1.4.0-SNAPSHOT + 0.0.1-RC1 compile diff --git a/node/pom.xml b/node/pom.xml index 9b21873..2032a03 100644 --- a/node/pom.xml +++ b/node/pom.xml @@ -3,7 +3,7 @@ 4.0.0 io.horizen eon - 1.4.0-SNAPSHOT + 0.0.1-RC1 2023 UTF-8 diff --git a/pom.xml b/pom.xml index aebe4ea..f91229d 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 io.horizen eonproject - 1.4.0-SNAPSHOT + 0.0.1-RC1 pom 2023 From 27c1fd250d90d4e5a86ae8fec9b473381c80319d Mon Sep 17 00:00:00 2001 From: Andrea Carbone Date: Fri, 31 May 2024 19:58:47 +0200 Subject: [PATCH 3/5] restoring original pom and dev branch --- .travis.yml | 2 +- bootstraptool/pom.xml | 4 ++-- node/pom.xml | 2 +- pom.xml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 035f41d..635e4d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ git: env: global: - PROD_RELEASE_BRANCH=main - - DEV_RELEASE_BRANCH=cicd-rc-addition + - DEV_RELEASE_BRANCH=development before_script: - source ci/setup_env.sh diff --git a/bootstraptool/pom.xml b/bootstraptool/pom.xml index c61c4ab..d8e5cba 100644 --- a/bootstraptool/pom.xml +++ b/bootstraptool/pom.xml @@ -3,7 +3,7 @@ 4.0.0 io.horizen bootstraptool - 0.0.1-RC1 + 1.4.0-SNAPSHOT 2023 UTF-8 @@ -21,7 +21,7 @@ io.horizen eon - 0.0.1-RC1 + 1.4.0-SNAPSHOT compile diff --git a/node/pom.xml b/node/pom.xml index 2032a03..9b21873 100644 --- a/node/pom.xml +++ b/node/pom.xml @@ -3,7 +3,7 @@ 4.0.0 io.horizen eon - 0.0.1-RC1 + 1.4.0-SNAPSHOT 2023 UTF-8 diff --git a/pom.xml b/pom.xml index f91229d..aebe4ea 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 io.horizen eonproject - 0.0.1-RC1 + 1.4.0-SNAPSHOT pom 2023 From c8be9ed03396ae98e8d6faafa89e7a473b5b8c05 Mon Sep 17 00:00:00 2001 From: Andrea Carbone Date: Fri, 31 May 2024 20:06:49 +0200 Subject: [PATCH 4/5] removing more debug points --- ci/docker.sh | 3 +-- ci/setup_env.sh | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ci/docker.sh b/ci/docker.sh index 08e9cf9..9e6c1a5 100755 --- a/ci/docker.sh +++ b/ci/docker.sh @@ -1,6 +1,5 @@ #!/bin/bash set -eEuo pipefail -set -x workdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." &> /dev/null && pwd )" evmapp_docker_image_name="${EVMAPP_DOCKER_IMAGE_NAME:-evmapp}" @@ -67,7 +66,7 @@ if [ -n "${docker_tag}" ]; then for tag in "${tags[@]}"; do echo "" && echo "Publishing docker image: ${docker_image}:${tag}" docker tag "${docker_image}:${docker_tag}" "index.docker.io/${docker_hub_org}/${docker_image}:${tag}" -# docker push "index.docker.io/${docker_hub_org}/${docker_image}:${tag}" + docker push "index.docker.io/${docker_hub_org}/${docker_image}:${tag}" done done fi diff --git a/ci/setup_env.sh b/ci/setup_env.sh index 0ec342c..9d505fc 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -1,6 +1,5 @@ #!/bin/bash set -eo pipefail -set -x IS_A_RELEASE="false" IS_A_GH_PRERELEASE="false" From 3b7cbf0cdb8169b4b145f34da9ebe673a3be516e Mon Sep 17 00:00:00 2001 From: Andrea Carbone Date: Fri, 31 May 2024 23:32:17 +0200 Subject: [PATCH 5/5] small fix in comment --- ci/setup_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/setup_env.sh b/ci/setup_env.sh index 9d505fc..92d83e0 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -99,7 +99,7 @@ if [ -n "${TRAVIS_TAG}" ]; then # Checking format of production release pom version if ! [[ "${ROOT_POM_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?$ ]]; then - echo "Warning: package(s) version is in the wrong format for PRODUCTION} release. Expecting: d.d.d+(-[0-9]+)?. The build is not going to be released !!!" + echo "Warning: package(s) version is in the wrong format for PRODUCTION} release. Expecting: d.d.d(-[0-9]+)?. The build is not going to be released !!!" export IS_A_RELEASE="false" fi