UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit 1070466b authored by Charles Culman's avatar Charles Culman Committed by Micah Nagel
Browse files

Cac ci upgrades

parent f121a31a
No related branches found
No related tags found
1 merge request!497Cac ci upgrades
......@@ -59,22 +59,6 @@ pre vars:
reports:
dotenv: variables.env
script:
# obtain MR and master versions
- CHART_MR_VERSION=$(sed -n -e 's/^version. //p' chart/Chart.yaml)
- git fetch && git checkout ${CI_DEFAULT_BRANCH}
- CHART_MA_VERSION=$(sed -n -e 's/^version. //p' chart/Chart.yaml)
- git fetch && git checkout ${CI_COMMIT_REF_NAME}
- echo "CHART_MR_VERSION=$CHART_MR_VERSION" >> variables.env
- echo "CHART_MA_VERSION=$CHART_MA_VERSION" >> variables.env
- CHART_VERSION_DIFF=$(./scripts/semver_diff.sh $CHART_MR_VERSION $CHART_MA_VERSION)
- IFS=. DIFF_ARR=(${CHART_VERSION_DIFF##*-})
- echo "CHART_VERSION_DIFF=$CHART_VERSION_DIFF" >> variables.env
# detect breaking change (first two version sections in semver diff)
- CHART_BREAKING_CHANGE="false"
- if (( ${DIFF_ARR[0]} > 0 )); then CHART_BREAKING_CHANGE="true"; fi
- if (( ${DIFF_ARR[1]} > 0 )); then CHART_BREAKING_CHANGE="true"; fi
# store variables
- echo "CHART_BREAKING_CHANGE=$CHART_BREAKING_CHANGE" >> variables.env
# Create the TF_VAR_env variable
- echo "TF_VAR_env=$(echo $CI_COMMIT_REF_SLUG | cut -c 1-7)-$(echo $CI_COMMIT_SHA | cut -c 1-7)" >> variables.env
- cat variables.env
......@@ -143,8 +127,8 @@ upgrade:
extends:
- .k3d-ci
rules:
# skip job when MR title starts with 'Breaking Change'
- if: '$CI_MERGE_REQUEST_TITLE =~ /^Breaking Change/'
# skip job when MR title starts with 'SKIP UPGRADE'
- if: '$CI_MERGE_REQUEST_TITLE =~ /^SKIP UPGRADE/'
when: never
# run pipeline on merge request events
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
......@@ -152,7 +136,6 @@ upgrade:
variables:
CLUSTER_NAME: "upgrade-${CI_COMMIT_SHORT_SHA}"
script:
- if $CHART_BREAKING_CHANGE; then echo "Breaking change detected by chart version difference, skipping job"; exit 0; fi
- echo "Install Big Bang from ${CI_DEFAULT_BRANCH}"
- git fetch && git checkout ${CI_DEFAULT_BRANCH}
- *deploy_bigbang
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment