From 0ff416da28a55788fb2c269086a2b699843d3307 Mon Sep 17 00:00:00 2001 From: "Cezar.Leahu" Date: Wed, 26 Aug 2020 13:29:28 +0300 Subject: [PATCH 1/5] ACS-457: Build linkage, tagging and release - reorder a few conditions in build.sh --- scripts/travis/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/travis/build.sh b/scripts/travis/build.sh index 3c5143bf19..e188b7bd8e 100644 --- a/scripts/travis/build.sh +++ b/scripts/travis/build.sh @@ -4,9 +4,11 @@ pushd "$(dirname "${BASH_SOURCE[0]}")/../../" source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh" -if [ "${TRAVIS_BUILD_STAGE_NAME,,}" = "release" ] && [ "${TRAVIS_BRANCH}" = "master" ] && isBranchBuild ; then +if isBranchBuild && [ "${TRAVIS_BRANCH}" = "master" ] && [ "${TRAVIS_BUILD_STAGE_NAME,,}" = "release" ] ; then + # update ":latest" image tags on remote repositories by using the maven *internal* profile PROFILES="-Pinternal" else + # build the ":latest" image tags locally with the maven *communityDocker* profile PROFILES="-PcommunityDocker" fi From 339a0f7b90e256deb519229a5e7beb9eb2aca3ea Mon Sep 17 00:00:00 2001 From: "Cezar.Leahu" Date: Wed, 26 Aug 2020 15:18:52 +0300 Subject: [PATCH 2/5] ACS-457: Build linkage, tagging and release - add validation on release jobs for the latest upstream tag --- scripts/travis/build_functions.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/travis/build_functions.sh b/scripts/travis/build_functions.sh index f37febfe6b..305d60da3c 100644 --- a/scripts/travis/build_functions.sh +++ b/scripts/travis/build_functions.sh @@ -111,3 +111,18 @@ function pullAndBuildSameBranchOnUpstream() { popd } +function retieveLatestTag() { + local REPO="${1}" + local BRANCH="${2}" + + local LOCAL_PATH="/tmp/$(basename "${REPO%.git}")" + + git clone -q -b "${BRANCH}" "https://${GIT_USERNAME}:${GIT_PASSWORD}@${REPO}" "${LOCAL_PATH}" + + pushd "${LOCAL_PATH}" >/dev/null + git describe --abbrev=0 --tags + popd >/dev/null + + rm -rf "${LOCAL_PATH}" +} + From 85c7623080d55a41b90cc900c5549a47ccc7d37c Mon Sep 17 00:00:00 2001 From: "Cezar.Leahu" Date: Wed, 26 Aug 2020 15:42:36 +0300 Subject: [PATCH 3/5] ACS-550 Trigger test release --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 683a26b255..faf4cf9027 100644 --- a/.travis.yml +++ b/.travis.yml @@ -235,7 +235,6 @@ jobs: # TODO enable job - name: "Push to Nexus" stage: release - if: false before_script: bash scripts/travis/verify_release_tag.sh script: travis_wait 40 bash scripts/travis/maven_release.sh From bce435ef7b73327754a3ade90fbcb49def8abb2e Mon Sep 17 00:00:00 2001 From: "Cezar.Leahu" Date: Wed, 26 Aug 2020 16:37:36 +0300 Subject: [PATCH 4/5] ACS-550 Test docker login [no-release] --- scripts/travis/init.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/travis/init.sh b/scripts/travis/init.sh index d6dd516c28..30515f8ac4 100644 --- a/scripts/travis/init.sh +++ b/scripts/travis/init.sh @@ -7,6 +7,7 @@ mkdir -p "${HOME}/.m2" && cp -f .travis.settings.xml "${HOME}/.m2/settings.xml" find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf # Docker Logins +echo "${DOCKERHUB_USERNAME}" | docker login -u="${DOCKERHUB_PASSWORD}" --password-stdin echo "${QUAY_PASSWORD}" | docker login -u="${QUAY_USERNAME}" --password-stdin quay.io # Enable experimental docker features (for the image squash option) From ba495822bce07a62869772673e109b4699866c5c Mon Sep 17 00:00:00 2001 From: "Cezar.Leahu" Date: Wed, 26 Aug 2020 17:08:22 +0300 Subject: [PATCH 5/5] ACS-550 Trigger test release - without DockerHub image push --- packaging/docker-alfresco/pom.xml | 38 ++++++++++++++++--------------- scripts/travis/init.sh | 3 ++- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/packaging/docker-alfresco/pom.xml b/packaging/docker-alfresco/pom.xml index 986441232a..5fc126ea2b 100644 --- a/packaging/docker-alfresco/pom.xml +++ b/packaging/docker-alfresco/pom.xml @@ -189,15 +189,16 @@ - - ${image.name}:${image.tag} - - ${project.basedir}/ - - true - - - + + + + + + + + + + @@ -237,15 +238,16 @@ - - ${image.name}:${project.version} - - ${project.basedir}/ - - true - - - + + + + + + + + + + diff --git a/scripts/travis/init.sh b/scripts/travis/init.sh index 30515f8ac4..0e98f20826 100644 --- a/scripts/travis/init.sh +++ b/scripts/travis/init.sh @@ -7,7 +7,8 @@ mkdir -p "${HOME}/.m2" && cp -f .travis.settings.xml "${HOME}/.m2/settings.xml" find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf # Docker Logins -echo "${DOCKERHUB_USERNAME}" | docker login -u="${DOCKERHUB_PASSWORD}" --password-stdin +# todo enable when the dockerhub credentials are set on the project +#echo "${DOCKERHUB_USERNAME}" | docker login -u="${DOCKERHUB_PASSWORD}" --password-stdin echo "${QUAY_PASSWORD}" | docker login -u="${QUAY_USERNAME}" --password-stdin quay.io # Enable experimental docker features (for the image squash option)