forked from rsundara/cp4i-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreateTektonResources.sh
executable file
·47 lines (38 loc) · 3.23 KB
/
createTektonResources.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
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
oc new-project cp4i-setup
. ./initConfig.sh
BASE64_COMMON_SERVICES_USERNAME=`echo -n $COMMON_SERVICES_USERNAME | base64`
BASE64_COMMON_SERVICES_PASSWORD=`echo -n $COMMON_SERVICES_PASSWORD | base64`
BASE64_COMMON_SERVICE_ENDPOINT=`echo -n $COMMON_SERVICE_ENDPOINT | base64`
BASE64_CLOUD_TYPE=`echo -n $CLOUD_TYPE | base64`
BASE64_OFFLINE_INSTALL=`echo -n $OFFLINE_INSTALL | base64`
BASE64_FILE_STORAGE=`echo -n $FILE_STORAGE | base64`
BASE64_BLOCK_STORAGE=`echo -n $BLOCK_STORAGE | base64`
BASE64_GIT_API_KEY_OR_PASSWORD=`echo -n $GIT_API_KEY_OR_PASSWORD | base64`
BASE64_GIT_USER_NAME=`echo -n $GIT_USER_NAME | base64`
sed "s/BASE64_COMMON_SERVICES_USERNAME/$BASE64_COMMON_SERVICES_USERNAME/g" ./manifests/cp4i-setup-secrets-template.yaml > ./manifests/cp4i-setup-secrets-revised-1.yaml
sed "s/BASE64_COMMON_SERVICES_PASSWORD/$BASE64_COMMON_SERVICES_PASSWORD/g" ./manifests/cp4i-setup-secrets-revised-1.yaml > ./manifests/cp4i-setup-secrets-revised-2.yaml
sed "s/BASE64_COMMON_SERVICE_ENDPOINT/$BASE64_COMMON_SERVICE_ENDPOINT/g" ./manifests/cp4i-setup-secrets-revised-2.yaml > ./manifests/cp4i-setup-secrets-revised-3.yaml
sed "s/BASE64_CLOUD_TYPE/$BASE64_CLOUD_TYPE/g" ./manifests/cp4i-setup-secrets-revised-3.yaml > ./manifests/cp4i-setup-secrets-revised-4.yaml
sed "s/BASE64_OFFLINE_INSTALL/$BASE64_OFFLINE_INSTALL/g" ./manifests/cp4i-setup-secrets-revised-4.yaml > ./manifests/cp4i-setup-secrets-revised-5.yaml
sed "s/BASE64_FILE_STORAGE/$BASE64_FILE_STORAGE/g" ./manifests/cp4i-setup-secrets-revised-5.yaml > ./manifests/cp4i-setup-secrets-revised-6.yaml
sed "s/BASE64_BLOCK_STORAGE/$BASE64_BLOCK_STORAGE/g" ./manifests/cp4i-setup-secrets-revised-6.yaml > ./manifests/cp4i-setup-secrets-revised-7.yaml
sed "s/BASE64_GIT_API_KEY_OR_PASSWORD/$BASE64_GIT_API_KEY_OR_PASSWORD/g" ./manifests/cp4i-setup-secrets-revised-7.yaml > ./manifests/cp4i-setup-secrets-revised-8.yaml
sed "s/BASE64_GIT_USER_NAME/$BASE64_GIT_USER_NAME/g" ./manifests/cp4i-setup-secrets-revised-8.yaml > ./manifests/cp4i-setup-secrets-revised-9.yaml
sed "s/OPENSHIFT_CLUSTER_USERNAME/$OPENSHIFT_CLUSTER_USERNAME/g" ./manifests/cp4i-setup-secrets-revised-9.yaml > ./manifests/cp4i-setup-secrets-revised-10.yaml
sed "s/OPENSHIFT_CLUSTER_PASSWORD/$OPENSHIFT_CLUSTER_PASSWORD/g" ./manifests/cp4i-setup-secrets-revised-10.yaml > ./manifests/cp4i-setup-secrets.yaml
rm ./manifests/cp4i-setup-secrets-revised-1.yaml
rm ./manifests/cp4i-setup-secrets-revised-2.yaml
rm ./manifests/cp4i-setup-secrets-revised-3.yaml
rm ./manifests/cp4i-setup-secrets-revised-4.yaml
rm ./manifests/cp4i-setup-secrets-revised-5.yaml
rm ./manifests/cp4i-setup-secrets-revised-6.yaml
rm ./manifests/cp4i-setup-secrets-revised-7.yaml
rm ./manifests/cp4i-setup-secrets-revised-8.yaml
rm ./manifests/cp4i-setup-secrets-revised-9.yaml
rm ./manifests/cp4i-setup-secrets-revised-10.yaml
oc create -f ./manifests/cp4i-setup-secrets.yaml
oc create -f ./manifests/cp4i-setup-resource.yaml
oc create -f ./manifests/install-integration-instance-task.yaml
oc create -f ./manifests/uninstall-integration-instance-task.yaml
oc create -f ./manifests/cp4i-setup-pipeline.yaml