forked from vidispine/hull
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
128 lines (122 loc) · 5.03 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
parameters:
- name: RunTests
default: true
trigger: none
pr: none
pool:
vmImage: 'ubuntu-22.04'
jobs:
- job: RunTests
timeoutInMinutes: 0
strategy:
maxParallel: 5
matrix:
Helm_3_13_0_single:
HelmVersion: "3.13.0"
TestType: single
Helm_3_13_0_multi:
HelmVersion: "3.13.0"
TestType: multi
Helm_3_13_1_single:
HelmVersion: "3.13.1"
TestType: single
Helm_3_13_1_multi:
HelmVersion: "3.13.1"
TestType: multi
Helm_3_13_2_single:
HelmVersion: "3.13.2"
TestType: single
Helm_3_13_2_multi:
HelmVersion: "3.13.2"
TestType: multi
Helm_3_13_3_single:
HelmVersion: "3.13.3"
TestType: single
Helm_3_13_3_multi:
HelmVersion: "3.13.3"
TestType: multi
Helm_3_14_0_single:
HelmVersion: "3.14.0"
TestType: single
Helm_3_14_0_multi:
HelmVersion: "3.14.0"
TestType: multi
Helm_3_14_1_single:
HelmVersion: "3.14.1"
TestType: single
Helm_3_14_1_multi:
HelmVersion: "3.14.1"
TestType: multi
steps:
- template: azure-pipelines-test.yml # Template reference
parameters:
RunTests: ${{ parameters.RunTests }}
- job: CreateRelease
dependsOn: RunTests
steps:
- script: |
set -euo pipefail
echo "-> get chartreleaser"
CHART_RELEASER_VERSION=1.5.0
cp -r . $(Agent.TempDirectory)
cd $(Agent.TempDirectory)
wget https://github.com/helm/chart-releaser/releases/download/v${CHART_RELEASER_VERSION}/chart-releaser_${CHART_RELEASER_VERSION}_linux_amd64.tar.gz
tar -xvzf chart-releaser_${CHART_RELEASER_VERSION}_linux_amd64.tar.gz -C ./
ls
sudo chmod +x ./cr
echo "-> create hull-demo chart"
export HULL_VERSION=`sed -n 's/^version:\s//p' ./hull/Chart.yaml | sed 's/\"//g'`
echo "-> hull version is ${HULL_VERSION}"
mkdir ./hull-demo
cp ./hull/files/test/HULL/sources/cases/deployment/values_short_demo.hull.yaml ./hull-demo/values.yaml
echo "This is a Helm chart for demonstration of the HULL library." > ./hull-demo/README.md
echo "" >> ./hull-demo/README.md
echo "It can also be used as a bootstrapped parent chart already fully integrating HULL." >> ./hull-demo/README.md
echo "" >> ./hull-demo/README.md
echo "Please visit (the HULL website)[https://github.com/vidispine/hull] for more information." >> ./hull-demo/README.md
cp ./hull/LICENSE ./hull-demo/LICENSE
mkdir ./hull-demo/templates
cp ./hull/hull.yaml ./hull-demo/templates/hull.yaml
cp ./hull/Chart.yaml ./hull-demo/Chart.yaml
sed -i 's/name: hull/name: hull-demo/' ./hull-demo/Chart.yaml
sed -i 's/description: HULL - Helm Uniform Layer Library/description: Demo Chart for showcasing HULL library chart usage/' ./hull-demo/Chart.yaml
sed -i 's/type: library/type: application/' ./hull-demo/Chart.yaml
sed -i "/dependencies: \[\]/d" ./hull-demo/Chart.yaml
echo ""
echo "dependencies:" >> ./hull-demo/Chart.yaml
echo "- name: hull" >> ./hull-demo/Chart.yaml
echo " version: \"${HULL_VERSION}\"" >> ./hull-demo/Chart.yaml
echo " repository: \"https://vidispine.github.io/hull\"" >> ./hull-demo/Chart.yaml
echo "-> Chart.yaml:"
cat ./hull-demo/Chart.yaml
echo "<- Chart.yaml"
cp ./hull/CHANGELOG.md ./hull-demo/CHANGELOG.md
cp ./hull/HISTORY.md ./hull-demo/HISTORY.md
echo "-> package hull chart"
sudo ./cr package ./hull
echo "-> upload hull chart"
sudo ./cr upload --git-repo hull --owner vidispine --release-notes-file CHANGELOG.md --token $(GITHUBTOKEN) || true
mkdir .cr-index
wget https://vidispine.github.io/hull/index.yaml -O .cr-index/index.yaml
sudo ./cr index --git-repo hull --owner vidispine --token $(GITHUBTOKEN) --charts-repo https://vidispine.github.io/hull --push
find . -name 'hull\.*\.tgz' -delete
sudo rm -rf .cr-release-packages
rm -rf ./hull
echo "sleep 60s"
sleep 60
echo "-> package hull-demo chart"
sudo ./cr package ./hull-demo
echo "-> test chart"
helm repo add hull https://vidispine.github.io/hull
helm dep build hull-demo
helm template --kube-version ${HULL_VERSION} hull-demo
echo "-> upload hull-demo chart"
sudo ./cr upload --git-repo hull --owner vidispine --release-notes-file CHANGELOG.md --token $(GITHUBTOKEN) || true
sudo rm -rf .cr-index
mkdir .cr-index
wget https://vidispine.github.io/hull/index.yaml -O .cr-index/index.yaml
sudo ./cr index --git-repo hull --owner vidispine --token $(GITHUBTOKEN) --charts-repo https://vidispine.github.io/hull --push