Skip to content

Commit 142c6ae

Browse files
authored
Call out the need for secret and sa, and use new environments path (#87)
1 parent ab2c8f1 commit 142c6ae

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

automerge-example/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,12 @@ kubectl apply -f standalone/resources
6565
kubectl apply -f standalone/templates
6666
```
6767

68-
Finally start the Tekton pipeline:
68+
Create or modify an existing ServiceAccount to use your `github-secret` (hint, you can use the provided `sa.yaml` file: this creates `my-sa` which will be used in the `tkn` command)
69+
70+
Finally start the Tekton pipeline referencing your ServiceAccount:
6971

7072
```sh
71-
tkn pipeline start automerge-pipeline -r source-repo=gitops-repo -r pr=pull-request -p github-config=promoteconfigmap -p github-secret=github-secret --showlog
73+
tkn pipeline start automerge-pipeline -r source-repo=gitops-repo -r pr=pull-request -p github-config=promoteconfigmap -p github-secret=github-secret --showlog -s my-sa
7274
```
7375

7476
The pipeline will do a dry run to test that the yaml in the Pull Request is good, then merge the Pull Request and delete the branch associated with it.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
name: my-sa
5+
secrets:
6+
- name: github-secret

automerge-example/standalone/templates/automerge-task.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
image: YOUR_DOCKER_HUB_ID/hub-test
2929
script: |
3030
#!/bin/bash
31-
kubectl apply -k git-source/env --dry-run=client
31+
kubectl apply -k git-source/environments/dev/env --dry-run=client
3232
- name: merge-pr
3333
image: YOUR_DOCKER_HUB_ID/hub-test
3434
volumeMounts:

0 commit comments

Comments
 (0)