Skip to content

Commit

Permalink
feat: add elevation repo to publish-copy TDE-833 (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
amfage authored Aug 17, 2023
1 parent b3703d6 commit 2713629
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions workflows/imagery/publish-copy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
- name: group-size
dag:
tasks:
- name: create-manifest-linz-imagery
- name: create-manifest-github
template: create-manifest
arguments:
parameters:
Expand All @@ -62,7 +62,7 @@ spec:
value: "{{inputs.parameters.group-size}}"
- name: version-argo-tasks
value: "{{workflow.parameters.version-argo-tasks}}"
when: "{{=sprig.contains('s3://linz-imagery/', workflow.parameters.target)}}"
when: "{{=sprig.regexMatch('s3://linz-(elevation|imagery)/', workflow.parameters.target)}}"
- name: create-manifest
template: create-manifest
arguments:
Expand All @@ -81,8 +81,8 @@ spec:
value: "{{inputs.parameters.group-size}}"
- name: version-argo-tasks
value: "{{workflow.parameters.version-argo-tasks}}"
depends: "create-manifest-linz-imagery.Skipped"
- name: copy-linz-imagery
depends: "create-manifest-github.Skipped"
- name: copy-with-github
template: copy
arguments:
parameters:
Expand All @@ -92,8 +92,8 @@ spec:
value: "{{item}}"
- name: version-argo-tasks
value: "{{workflow.parameters.version-argo-tasks}}"
depends: "create-manifest-linz-imagery.Succeeded"
withParam: "{{tasks.create-manifest-linz-imagery.outputs.parameters.files}}"
depends: "create-manifest-github.Succeeded"
withParam: "{{tasks.create-manifest-github.outputs.parameters.files}}"
- name: copy
template: copy
arguments:
Expand All @@ -112,7 +112,7 @@ spec:
parameters:
- name: source
value: "{{inputs.parameters.source}}"
depends: "copy-linz-imagery"
depends: "copy-with-github"
- name: create-manifest
inputs:
parameters:
Expand Down Expand Up @@ -167,7 +167,7 @@ spec:
command: [node, /app/index.js]
env:
- name: AWS_ROLE_CONFIG_PATH
value: s3://linz-bucket-config/config-write.imagery.json,s3://linz-bucket-config/config.json
value: s3://linz-bucket-config/config-write.imagery.json,s3://linz-bucket-config/config-write.elevation.json,s3://linz-bucket-config/config.json
args:
[
"copy",
Expand All @@ -186,9 +186,9 @@ spec:
- name: AWS_ROLE_CONFIG_PATH
value: s3://linz-bucket-config/config.json
- name: GIT_AUTHOR_NAME
value: "imagery[bot]"
value: "{{=sprig.regexFind('(elevation|imagery)', workflow.parameters.target)}}[bot]"
- name: GIT_AUTHOR_EMAIL
value: "[email protected]"
value: "{{=sprig.regexFind('(elevation|imagery)', workflow.parameters.target)}}@linz.govt.nz"
volumeMounts:
- name: secret-volume
mountPath: "/root/.ssh/"
Expand All @@ -201,9 +201,11 @@ spec:
"{{=sprig.trim(inputs.parameters.source)}}",
"--target",
"{{=sprig.trim(workflow.parameters.target)}}",
"--repo-name",
"linz/{{=sprig.regexFind('(elevation|imagery)', workflow.parameters.target)}}",
]
volumes:
- name: secret-volume
secret:
secretName: github-linz-imagery
secretName: "github-linz-{{=sprig.regexFind('(elevation|imagery)', workflow.parameters.target)}}"
defaultMode: 384

0 comments on commit 2713629

Please sign in to comment.