diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index 1f13202..76503ee 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -18,7 +18,7 @@ spec: app: accounts spec: containers: - - image: us.icr.io/sn-labs-irgalamarr/accounts:1 + - image: IMAGE_NAME_HERE name: accounts resources: {} env: diff --git a/tekton/pipeline.yaml b/tekton/pipeline.yaml index 8d9209d..a9de80b 100644 --- a/tekton/pipeline.yaml +++ b/tekton/pipeline.yaml @@ -79,3 +79,22 @@ spec: runAfter: - tests - lint + + - name: deploy + workspaces: + - name: manifest-dir + workspace: pipeline-workspace + taskRef: + name: openshift-client + kind: ClusterTask + params: + - name: SCRIPT + value: | + echo "Updating manifest..." + sed -i "s|IMAGE_NAME_HERE|$(params.build-image)|g" deploy/deployment.yaml + cat deploy/deployment.yaml + echo "Deploying to OpenShift..." + oc apply -f deploy/ + oc get pods -l app=accounts + runAfter: + - build