Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Commit

Permalink
added deploy task
Browse files Browse the repository at this point in the history
  • Loading branch information
irgalamarr committed Dec 17, 2023
1 parent e1bc980 commit 2e906d3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
19 changes: 19 additions & 0 deletions tekton/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2e906d3

Please sign in to comment.