Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: publish-copy for elevation or imagery TDE-833 #149

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 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 @@ -185,10 +185,6 @@ spec:
env:
- name: AWS_ROLE_CONFIG_PATH
value: s3://linz-bucket-config/config.json
- name: GIT_AUTHOR_NAME
value: "imagery[bot]"
- name: GIT_AUTHOR_EMAIL
value: "[email protected]"
volumeMounts:
- name: secret-volume
mountPath: "/root/.ssh/"
Expand All @@ -201,9 +197,11 @@ spec:
"{{=sprig.trim(inputs.parameters.source)}}",
"--target",
"{{=sprig.trim(workflow.parameters.target)}}",
"--repo-name",
"{{=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
Loading