Skip to content

Commit

Permalink
Remove the individual paramter and use create-pull-request instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentao-Kuang committed Sep 27, 2023
1 parent 5532ebd commit 8c20fea
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions workflows/basemaps/imagery-import-cogify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ spec:
description: Source imagery location "s3://linz-imagery"
value: "s3://linz-imagery-staging/test/sample/"

- name: individual
description: "Import as individual imagery."
value: false
- name: create-pull-request
description: "Create pull request after importing imagery."
value: 'aerial'
enum:
- false
- true
- 'aerial'
- 'individual'
- 'none'

- name: category
value: "Rural Aerial Photos"
Expand Down Expand Up @@ -71,12 +72,6 @@ spec:
description: How many items to pass to each create-cog job
value: 20

- name: create-pull-request
value: true
enum:
- true
- false

templates:
# Main entrypoint into the workflow
- name: main
Expand Down Expand Up @@ -108,13 +103,25 @@ spec:
value: "{{ inputs.parameters.cutline_blend }}"
- name: group_size
value: "{{ inputs.parameters.group_size }}"
- name: create-pull-request
- name: create-pull-request-aerial
template: create-pull-request
arguments:
parameters:
- name: target
value: "{{ tasks.cogify.outputs.parameters.target }}"
- name: individual
value: false
when: "{{workflow.parameters.create-pull-request}} == 'aerial'"
depends: "cogify"
- name: create-pull-request-individual
template: create-pull-request
arguments:
parameters:
- name: target
value: "{{ tasks.cogify.outputs.parameters.target }}"
when: "{{workflow.parameters.create-pull-request}} == true"
- name: individual
value: true
when: "{{workflow.parameters.create-pull-request}} == 'individual'"
depends: "cogify"

# Generate COGs for a specific tile matrix from a given collection of source imagery
Expand Down Expand Up @@ -327,6 +334,7 @@ spec:
inputs:
parameters:
- name: target
- name: individual
container:
image: 019359803926.dkr.ecr.ap-southeast-2.amazonaws.com/eks:argo-tasks-{{workflow.parameters.version_argo_tasks}}
volumeMounts:
Expand All @@ -347,7 +355,7 @@ spec:
"create-pr",
"--target",
"{{inputs.parameters.target}}",
"--individual={{workflow.parameters.individual}}",
"--individual={{inputs.parameters.individual}}",
"--category={{workflow.parameters.category}}",
]
volumes:
Expand Down

0 comments on commit 8c20fea

Please sign in to comment.