diff --git a/workflows/basemaps/imagery-import-cogify.yml b/workflows/basemaps/imagery-import-cogify.yml index 11c18d093..c548c80ac 100644 --- a/workflows/basemaps/imagery-import-cogify.yml +++ b/workflows/basemaps/imagery-import-cogify.yml @@ -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" @@ -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 @@ -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 @@ -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: @@ -347,7 +355,7 @@ spec: "create-pr", "--target", "{{inputs.parameters.target}}", - "--individual={{workflow.parameters.individual}}", + "--individual={{inputs.parameters.individual}}", "--category={{workflow.parameters.category}}", ] volumes: