File tree Expand file tree Collapse file tree 8 files changed +10
-25
lines changed Expand file tree Collapse file tree 8 files changed +10
-25
lines changed Original file line number Diff line number Diff line change 50
50
- run : make ci
51
51
name : ci
52
52
53
- # - name: Build an image for integration testing
54
- # run: ./scripts/package-for-ci
55
- # env:
56
- # ARCH: "${{ matrix.arch }}"
57
- # SHA: "${{ github.sha }}"
58
-
59
53
- name : install K3d
60
54
run : ./.github/workflows/scripts/install-k3d.sh
61
55
77
71
RANCHER_IMAGE_TAG : " v2.9-head"
78
72
VERSION : " 2.9"
79
73
80
- - name : debug show image_tag file
81
- run : cat dist/image_tag
82
-
83
74
- name : get vars
84
75
run : cat dist/image_tag >> $GITHUB_ENV
85
76
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- set -eux
2
+ set -eu
3
3
4
4
cd $( dirname $0 ) /../../..
5
5
DIST_DIR=" $PWD " /dist
@@ -45,7 +45,7 @@ echo "Uploading new webhook image"
45
45
46
46
# Install the webhook chart we just built.
47
47
upgrade_rancher_webhook () {
48
- helm upgrade rancher-webhook ./dist/artifacts/rancher-webhook-${HELM_VERSION } .tgz -n cattle-system \
48
+ helm upgrade rancher-webhook ./dist/artifacts/rancher-webhook-${HELM_CHART_VERSION } .tgz -n cattle-system \
49
49
--wait --timeout=120s --set image.repository=" ${IMAGE_REPO} " --set image.tag=" ${IMAGE_TAG} " --reuse-values --debug
50
50
}
51
51
68
68
./bin/rancher-webhook-integration.test -test.v -test.run IntegrationTest
69
69
70
70
# Install the webhook chart with new ports.
71
- helm upgrade rancher-webhook ./dist/artifacts/rancher-webhook-${HELM_VERSION } .tgz -n cattle-system \
71
+ helm upgrade rancher-webhook ./dist/artifacts/rancher-webhook-${HELM_CHART_VERSION } .tgz -n cattle-system \
72
72
--wait --reuse-values --set port=443
73
73
74
74
# Test that the ports are set as expected and run a single integration test to verify the webhook is still accessible.
Original file line number Diff line number Diff line change @@ -35,15 +35,15 @@ source ./dist/tags
35
35
36
36
# Install the webhook chart we just built.
37
37
upgrade_rancher_webhook () {
38
- helm upgrade rancher-webhook ./dist/artifacts/rancher-webhook-${HELM_VERSION } .tgz -n cattle-system \
38
+ helm upgrade rancher-webhook ./dist/artifacts/rancher-webhook-${HELM_CHART_VERSION } .tgz -n cattle-system \
39
39
--wait --set image.repository=" ${IMAGE_REPO} " --set image.tag=" ${IMAGE_TAG} " --reuse-values --debug
40
40
}
41
41
try --delay 2 --max 4 --failmsg " Couldn't helm upgrade rancher-webhook" upgrade_rancher_webhook
42
42
43
43
./bin/rancher-webhook-integration.test -test.v -test.run IntegrationTest
44
44
45
45
# Install the webhook chart with new ports.
46
- helm upgrade rancher-webhook ./dist/artifacts/rancher-webhook-${HELM_VERSION } .tgz -n cattle-system \
46
+ helm upgrade rancher-webhook ./dist/artifacts/rancher-webhook-${HELM_CHART_VERSION } .tgz -n cattle-system \
47
47
--wait --reuse-values --set port=443
48
48
49
49
# Test that the ports are set as expected and run a single integration test to verify the webhook is still accessible.
Original file line number Diff line number Diff line change 3
3
4
4
source $( dirname $0 ) /version
5
5
6
- set -x
7
-
8
6
cd $( dirname $0 ) /..
9
7
10
8
echo Running package
Original file line number Diff line number Diff line change 8
8
9
9
source $( dirname $0 ) /version
10
10
11
- set -x
12
-
13
- echo " QQQ: scripts/package: SHA is ${SHA} "
14
11
REPO=rancher
15
12
IMAGE=${REPO} /webhook:${TAG}
16
13
docker tag ${IMAGE} " ${REPO} /webhook:${SHA} "
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ cp -rf charts build/
12
12
13
13
# must use sed -i'<backup_extension>'` for GNU and OSX compatibility
14
14
sed -i' .bkp' \
15
- -e ' s/^version:.*/version: ' ${HELM_VERSION } ' /' \
16
- -e ' s/appVersion:.*/appVersion: ' ${HELM_VERSION } ' /' \
15
+ -e ' s/^version:.*/version: ' ${HELM_CHART_VERSION } ' /' \
16
+ -e ' s/appVersion:.*/appVersion: ' ${HELM_CHART_VERSION } ' /' \
17
17
build/charts/rancher-webhook/Chart.yaml
18
18
19
19
sed -i' .bkb' \
Original file line number Diff line number Diff line change 2
2
set -e
3
3
cd $( dirname $0 ) /..
4
4
5
- ./scripts/package-helm
6
5
echo Running helm lint
7
6
helm lint ./charts/rancher-webhook
8
7
# Check for unittest plugin
Original file line number Diff line number Diff line change 21
21
SUFFIX=" -${ARCH} "
22
22
23
23
HELM_TAG=" ${HELM_TAG:- ${TAG:- ${VERSION} } } "
24
- HELM_VERSION =" ${HELM_VERSION :- ${HELM_TAG/ v/ } } "
24
+ HELM_CHART_VERSION =" ${HELM_CHART_VERSION :- ${HELM_TAG/ v/ } } "
25
25
TAG=" ${TAG:- ${VERSION}${SUFFIX} } "
26
26
REPO=" ${REPO:- rancher} "
27
27
28
28
if echo $TAG | grep -q dirty; then
29
29
TAG=dev
30
30
HELM_TAG=dev
31
- HELM_VERSION =0.0.0-dev
31
+ HELM_CHART_VERSION =0.0.0-dev
32
32
fi
33
33
34
34
DIST_DIR=" ${DIST_DIR:- $(dirname $0 )/ ../ dist/ } "
35
35
mkdir -p ${DIST_DIR}
36
- echo " export TAG=${TAG} ; export HELM_TAG=${HELM_TAG} ; export HELM_VERSION =${HELM_VERSION } ;" > ${DIST_DIR} /tags
36
+ echo " export TAG=${TAG} ; export HELM_TAG=${HELM_TAG} ; export HELM_CHART_VERSION =${HELM_CHART_VERSION } ;" > ${DIST_DIR} /tags
You can’t perform that action at this time.
0 commit comments