forked from ibm-cloud-architecture/cp4i-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-integration-instance-task.yaml
84 lines (83 loc) · 2.46 KB
/
install-integration-instance-task.yaml
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
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: install-integration-instance
spec:
inputs:
resources:
- name: source
type: git
params:
- name: integrationComponent
default: integration/tracing
description: The integration component that needs to be installed.
- name: env
default: "dev"
description: Specfiy the current environment. It is used in computing the Helm release name.
- name: production
default: "false"
description: Specifies if the deployment is production-like with High Availability enabled. Default [false]
steps:
- name: install-instance
image: docker.io/rsundara/cp4i-setup
workingdir: /workspace/source
env:
- name: INTEGRATION_COMPONENT
value: $(inputs.params.integrationComponent)
- name: IBMCLOUD_PASSWORD
valueFrom:
secretKeyRef:
name: common-settings
key: password
- name: IBMCLOUD_USERNAME
valueFrom:
secretKeyRef:
name: common-settings
key: username
- name: CLUSTER
valueFrom:
secretKeyRef:
name: common-settings
key: url
- name: CLOUD_TYPE
valueFrom:
secretKeyRef:
name: common-settings
key: cloudType
- name: OFFLINE_INSTALL
valueFrom:
secretKeyRef:
name: common-settings
key: offlineInstall
- name: STORAGE_FILE
valueFrom:
secretKeyRef:
name: common-settings
key: fileStorage
- name: STORAGE_BLOCK
valueFrom:
secretKeyRef:
name: common-settings
key: blockStorage
- name: PRODUCTION
value: $(inputs.params.production)
- name: ENV
value: $(inputs.params.env)
command: ["/bin/sh"]
args:
- -c
- |
set -eu;
cloudctl login -a $CLUSTER -n integration -u $IBMCLOUD_USERNAME -p $IBMCLOUD_PASSWORD --skip-ssl-validation
echo Component : $INTEGRATION_COMPONENT;
echo Cloud type : $CLOUD_TYPE;
echo Production : $PRODUCTION;
echo Offline : $OFFLINE_INSTALL;
echo Environment : $ENV;
echo File Storage : $STORAGE_FILE;
echo Block Storage : $STORAGE_BLOCK;
cd $INTEGRATION_COMPONENT;
echo "Running setup.sh";
sh setup.sh
echo "Running install.sh";
sh install.sh;