-
Notifications
You must be signed in to change notification settings - Fork 1
/
trigger-bundle-test.sh
executable file
·38 lines (32 loc) · 1.21 KB
/
trigger-bundle-test.sh
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
set -x
set -e
if [ $# != 1 ] ; then
echo "USAGE: $0 The Bundle Version"
echo " e.g.: ./trigger-bundle-test 4.16.0"
exit 1;
fi
if [ -d "tmp" ];then
rm -r tmp
fi
cp -r bundle-test tmp
# modify pipeline run file
sed -i'' -e "s#<B_VERSION>#$1#g" tmp/ocp/rhel1-x86.yaml
sed -i'' -e "s#<B_VERSION>#$1#g" tmp/ocp/mac2-amd64.yaml
sed -i'' -e "s#<B_VERSION>#$1#g" tmp/ocp/mac4-arm64.yaml
sed -i'' -e "s#<B_VERSION>#$1#g" tmp/ocp/windows-x86.yaml
sed -i'' -e "s#<BUNDLE_VERSION>#$1#g" tmp/microshift/rhel.yaml
sed -i'' -e "s#<BUNDLE_VERSION>#$1#g" tmp/microshift/mac-x86.yaml
sed -i'' -e "s#<BUNDLE_VERSION>#$1#g" tmp/microshift/mac-arm64.yaml
sed -i'' -e "s#<BUNDLE_VERSION>#$1#g" tmp/microshift/windows.yaml
# confirm login the correct openshift workspace
oc project | grep "devtoolsqe--pipeline"
# create pipeline with yaml file
#oc create -f tmp/ocp/rhel1-x86.yaml
#oc create -f tmp/ocp/windows-x86.yaml
#oc create -f tmp/ocp/mac2-amd64.yaml
#sleep 10*60*60 #two mac pipeline can't run together as they use same machine to build
#oc create -f tmp/ocp/mac4-arm64.yaml
#oc create -f tmp/microshift/rhel.yaml
#oc create -f tmp/microshift/mac-x86.yaml
#oc create -f tmp/microshift/mac-arm64.yaml
#oc create -f tmp/microshift/windows.yaml