Skip to content

Commit

Permalink
Update the vector etl workflow to use the new create-pr cli.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentao-Kuang committed Sep 25, 2023
1 parent f391f68 commit a254a14
Showing 1 changed file with 24 additions and 15 deletions.
39 changes: 24 additions & 15 deletions workflows/basemaps/vector-etl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ spec:
tasks:
- name: vector-etl
template: vector-etl
- name: create-pr
template: create-pr
- name: create-pull-request
template: create-pull-request
arguments:
parameters:
- name: layer
value: "{{tasks.vector-etl.outputs.parameters.layer}}"
- name: target
value: "{{tasks.vector-etl.outputs.parameters.target}}"
when: "{{workflow.parameters.create-pull-request}} == true"
depends: "vector-etl"

Expand All @@ -58,27 +58,36 @@ spec:
]
outputs:
parameters:
- name: layer
- name: target
valueFrom:
path: "/tmp/layer.json"
path: "/tmp/target"

- name: create-pr
- name: create-pull-request
inputs:
parameters:
- name: layer
- name: target
container:
image: ghcr.io/linz/basemaps/cli:latest
image: 019359803926.dkr.ecr.ap-southeast-2.amazonaws.com/eks:argo-tasks-latest
volumeMounts:
- name: secret-vol
mountPath: "/root/.ssh/"
command: [node, index.cjs]
command: [node, /app/index.js]
env:
- name: GIT_USER_EMAIL
value: basemaps@linz.govt.nz
- name: GIT_USER_NAME
value: basemaps[bot]
- name: AWS_ROLE_CONFIG_PATH
value: s3://linz-bucket-config/config.basemaps.json
- name: GITHUB_API_TOKEN
valueFrom:
secretKeyRef:
name: github-bot-pat
key: github-token
args:
["-V", "cog-pr", "--layer", "{{inputs.parameters.layer}}", "--vector"]
[
"bmc",
"create-pr",
"--target",
"{{inputs.parameters.target}}",
"--vector",
]
volumes:
- name: secret-vol
secret:
Expand Down

0 comments on commit a254a14

Please sign in to comment.