-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: bump elastic stack version (#1038)
* ci: bump elastic stack version * chore: fix typo in the script * chore: set commit message * ci: remove scope prefix
- Loading branch information
Showing
6 changed files
with
66 additions
and
29 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,37 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Given the stack version this script will bump the release version. | ||
# | ||
# This script is executed by the automation we are putting in place | ||
# and it requires the git add/commit commands. | ||
# | ||
# Parameters: | ||
# $1 -> the minor version to be bumped. Mandatory. | ||
# $1 -> the major version to be bumped. Mandatory. | ||
# | ||
set -euo pipefail | ||
MSG="parameter missing." | ||
VERSION_RELEASE=${1:?$MSG} | ||
VERSION_DEV=${2:?$MSG} | ||
|
||
OS=$(uname -s| tr '[:upper:]' '[:lower:]') | ||
|
||
if [ "${OS}" == "darwin" ] ; then | ||
SED="sed -i .bck" | ||
else | ||
SED="sed -i" | ||
fi | ||
|
||
echo "Update stack with versions ${VERSION_RELEASE} and ${VERSION_DEV}" | ||
${SED} -E -e "s#(values '8.0.0-SNAPSHOT', '7.x',) '[0-9]+\.[0-9]+\.[0-9]+'#\1 '${VERSION_DEV}'#g" Jenkinsfile | ||
${SED} -E -e "s#(defaultValue:) '[0-9]+\.[0-9]+\.[0-9]+'#\1 '${VERSION_RELEASE}'#g" Jenkinsfile | ||
git add Jenkinsfile | ||
for FILE in .ci/scripts/load-testing.sh .ci/scripts/pull_and_build.sh .ci/scripts/test.sh dev-utils/docker-compose.yml ; do | ||
${SED} -E -e "s#:-[0-9]+\.[0-9]+\.[0-9]+#:-${VERSION_RELEASE}#g" $FILE | ||
git add $FILE | ||
done | ||
|
||
git diff --staged --quiet || git commit -m "chore: update elastic stack release ${VERSION_RELEASE} and ${VERSION_DEV}" | ||
git --no-pager log -1 | ||
|
||
echo "You can now push and create a Pull Request" |
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
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
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
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
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