mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-16 02:30:03 -03:30
Merge pull request #12050 from VannTen/cleanup/next_version_auto
Auto compute previous tag in CI
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
version_from_galaxy=$(grep "^version:" galaxy.yml | awk '{print $2}')
|
||||
|
||||
# TODO: compute the next expected version somehow
|
||||
if [[ $KUBESPRAY_VERSION == "v${version_from_galaxy}" ]]
|
||||
then
|
||||
echo "Please update galaxy.yml version to match the next KUBESPRAY_VERSION."
|
||||
echo "Be sure to remove the \"v\" to adhere to semantic versioning"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,15 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
KUBESPRAY_NEXT_VERSION=2.$(( ${KUBESPRAY_VERSION:3:2} + 1 ))
|
||||
|
||||
# Rebase PRs on master (or release branch) to get latest changes
|
||||
if [[ $CI_COMMIT_REF_NAME == pr-* ]]; then
|
||||
git config user.email "ci@kubespray.io"
|
||||
git config user.name "CI"
|
||||
if [[ -z "`git branch -a --list origin/release-$KUBESPRAY_NEXT_VERSION`" ]]; then
|
||||
git pull --rebase origin master
|
||||
else
|
||||
git pull --rebase origin release-$KUBESPRAY_NEXT_VERSION
|
||||
fi
|
||||
if [ "${GITHUB_BASE_REF}" ]; then
|
||||
git pull --rebase origin $GITHUB_BASE_REF
|
||||
fi
|
||||
|
||||
@@ -17,7 +17,7 @@ fi
|
||||
|
||||
# Check out latest tag if testing upgrade
|
||||
if [ "${UPGRADE_TEST}" != "false" ]; then
|
||||
git fetch --all && git checkout "$KUBESPRAY_VERSION"
|
||||
git fetch --all && git checkout $(git describe --tags --abbrev=0)
|
||||
# Checkout the current tests/ directory ; even when testing old version,
|
||||
# we want the up-to-date test setup/provisionning
|
||||
git checkout "${CI_COMMIT_SHA}" -- tests/
|
||||
|
||||
Reference in New Issue
Block a user