-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release] Testing alpha release using automated script
- Loading branch information
Sathish Kumar
authored and
Sathish Kumar
committed
Aug 1, 2024
1 parent
3f2fc86
commit cead70e
Showing
4 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
set -ev | ||
|
||
find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT" | xargs -r -l rm -rf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
echo "=========================== Starting Init Script ===========================" | ||
PS4="\[\e[35m\]+ \[\e[m\]" | ||
set -vex | ||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../" | ||
|
||
# Maven Setup | ||
find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf | ||
|
||
# Docker Logins | ||
echo "${DOCKERHUB_PASSWORD}" | docker login -u="${DOCKERHUB_USERNAME}" --password-stdin | ||
echo "${QUAY_PASSWORD}" | docker login -u="${QUAY_USERNAME}" --password-stdin quay.io | ||
|
||
popd | ||
set +vex | ||
echo "=========================== Finishing Init Script ==========================" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
echo "=========================== Starting Release Script ===========================" | ||
PS4="\[\e[35m\]+ \[\e[m\]" | ||
set -vex | ||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../" | ||
|
||
# Use full history for release | ||
git checkout -B "${BRANCH_NAME}" | ||
|
||
# Run the release plugin - with "[skip ci]" in the release commit message | ||
mvn -B \ | ||
"-Darguments=-DskipTests -Dbuild-number=${BUILD_NUMBER}" \ | ||
release:clean release:prepare release:perform \ | ||
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \ | ||
-Dusername="${GIT_USERNAME}" \ | ||
-Dpassword="${GIT_PASSWORD}" \ | ||
-Prelease | ||
|
||
popd | ||
set +vex | ||
echo "=========================== Finishing Release Script ==========================" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
echo "=========================== Starting Verify Release Tag Script ===========================" | ||
PS4="\[\e[35m\]+ \[\e[m\]" | ||
set -vex | ||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../" | ||
|
||
# | ||
# Check that the version to be released does not already have a git tag. | ||
# | ||
|
||
POM_VERSION=$(mvn -B -q help:evaluate -Dexpression=project.version -DforceStdout) | ||
printf "POM version: %s\n" "${POM_VERSION}" | ||
|
||
TAG="${POM_VERSION%-SNAPSHOT}" | ||
|
||
if git rev-parse "${TAG}^{tag}" &>/dev/null ; then | ||
echo "The next tag \"${TAG}\" already exists in the git project" | ||
exit 1 | ||
fi | ||
|
||
popd | ||
set +vex | ||
echo "=========================== Finishing Verify Release Tag Script ==========================" |