Skip to content

Commit f7ce91d

Browse files
added deploy task
1 parent 3202762 commit f7ce91d

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

deploy/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
app: accounts
1919
spec:
2020
containers:
21-
- image: us.icr.io/sn-labs-imranullahkh/accounts:1
21+
- image: IMAGE_NAME_HERE
2222
name: accounts
2323
resources: {}
2424

tekton/pipeline.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,22 @@ spec:
5858
value: "$(params.build-image)"
5959
runAfter:
6060
- tests
61+
62+
- name: deploy
63+
workspaces:
64+
- name: manifest-dir
65+
workspace: pipeline-workspace
66+
taskRef:
67+
name: openshift-client
68+
kind: ClusterTask
69+
params:
70+
- name: SCRIPT
71+
value: |
72+
echo "Updating manifest..."
73+
sed -i "s|IMAGE_NAME_HERE|$(params.build-image)|g" deploy/deployment.yaml
74+
cat deploy/deployment.yaml
75+
echo "Deploying to OpenShift..."
76+
oc apply -f deploy/
77+
oc get pods -l app=accounts
78+
runAfter:
79+
- build

0 commit comments

Comments
 (0)