diff options
author | liamfallon <liam.fallon@est.tech> | 2022-03-01 21:01:03 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2022-03-01 21:05:54 +0000 |
commit | d7d9a664cb6d45b1019f8ac897feac512e5b37e8 (patch) | |
tree | aeda2f2c5b71e61abb81a086e69530b021be6f62 /integration/src/release_scripts/mkart.sh | |
parent | 006a229e166b5656fd9ba320e2b36d33c7e945a8 (diff) |
Update release scripts for branches
Release scripts are updated:
- Can now handle releasing on a branch for a maintenance release
- startPhase.sh script updated to handle all 13 phases of the release
process
- Various corrections and bug fixes found during the release
- scripts updated to comply with IntelliJ shekkcheck suggestions
Issue-ID: POLICY-3835
Change-Id: Ibfa49e4132ca61ae0541600fae5f6814cdf7a409
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'integration/src/release_scripts/mkart.sh')
-rwxr-xr-x | integration/src/release_scripts/mkart.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/integration/src/release_scripts/mkart.sh b/integration/src/release_scripts/mkart.sh index 62ec0302..2243e293 100755 --- a/integration/src/release_scripts/mkart.sh +++ b/integration/src/release_scripts/mkart.sh @@ -65,7 +65,7 @@ if [ -z "${BRANCH}" ]; then echo "cannot extract default branch from ${TOPDIR}/.gitreview" >&2 exit 1 fi -echo Branch: ${BRANCH} +echo Branch: "${BRANCH}" PROJECT=$(awk -F= '$1 == "project" { print $2 }' "${TOPDIR}/.gitreview" | $SED 's/.git$//') @@ -73,9 +73,8 @@ if [ -z "${PROJECT}" ]; then echo "cannot extract project from ${TOPDIR}/.gitreview" >&2 exit 1 fi -echo Project: ${PROJECT} -TPROJ=$(echo ${PROJECT} | $SED 's!/!%2F!') -DPROJ=$(echo ${PROJECT} | $SED 's!/!-!') +echo Project: "${PROJECT}" +DPROJ=$(echo "${PROJECT}" | $SED 's!/!-!') VERSION=$( xmllint --xpath \ @@ -87,11 +86,11 @@ if [ -z "${VERSION}" ]; then echo "cannot extract version from ${TOPDIR}/pom.xml" >&2 exit 1 fi -echo Version: ${VERSION} +echo "Version: ${VERSION}" prefix='https://jenkins.onap.org/view/policy/job/' STAGE_ID=$( - curl --silent ${prefix}${DPROJ}-maven-stage-${BRANCH}/ | + curl --silent "${prefix}${DPROJ}-maven-stage-${BRANCH}/" | grep "Last completed build" | $SED -e 's!.*Last completed build .#!!' -e 's!).*!!' | head -1 @@ -100,18 +99,19 @@ if [ -z "${STAGE_ID}" ]; then echo "cannot extract last maven stage ID from jenkins" >&2 exit 1 fi -STAGE_ID=${DPROJ}-maven-stage-${BRANCH}/${STAGE_ID}/ -echo Stage ID: ${STAGE_ID} +STAGE_ID="${DPROJ}-maven-stage-${BRANCH}/${STAGE_ID}/" +echo Stage ID: "${STAGE_ID}" prefix='https://jenkins.onap.org/view/policy/job/' -JOB_OUT=$(curl --silent ${prefix}${STAGE_ID}/console) +JOB_OUT=$(curl --silent "${prefix}${STAGE_ID}/consoleFull") echo "${JOB_OUT}" | grep -q "Finished: SUCCESS" +# shellcheck disable=SC2181 if [ $? -ne 0 ]; then echo "last jenkins build has not completed successfully" >&2 exit 1 fi -echo Creating ${TOPDIR}/releases/${VERSION}.yaml +echo Creating "${TOPDIR}/releases/${VERSION}.yaml" echo "distribution_type: 'maven'" > "${TOPDIR}/releases/${VERSION}.yaml" echo "version: '${VERSION}'" >> "${TOPDIR}/releases/${VERSION}.yaml" |