From 4ab1f4ae72d41927b796d2be798b6a85ecbd24c5 Mon Sep 17 00:00:00 2001 From: Wentao Kuang Date: Wed, 27 Sep 2023 11:32:10 +1300 Subject: [PATCH] Update to use cogify create-config. --- workflows/basemaps/create-config.yaml | 34 +++++++++++---------------- workflows/imagery/standardising.yaml | 31 ++++++++++++------------ 2 files changed, 29 insertions(+), 36 deletions(-) diff --git a/workflows/basemaps/create-config.yaml b/workflows/basemaps/create-config.yaml index ca45a387e..8707efbde 100644 --- a/workflows/basemaps/create-config.yaml +++ b/workflows/basemaps/create-config.yaml @@ -10,8 +10,6 @@ spec: parameters: - name: version-basemaps-cli value: "v6" - - name: title - value: "" - name: location value: "s3://bucket/path/to" templateDefaults: @@ -27,33 +25,29 @@ spec: parameters: - name: location value: "{{workflow.parameters.location}}" - - name: title - value: "{{workflow.parameters.title}}" - name: create-config + retryStrategy: + limit: "2" inputs: parameters: - name: location - - name: title + description: Location of the imagery to create config for container: - image: ghcr.io/linz/basemaps/cli:{{=sprig.trim(workflow.parameters['version-basemaps-cli'])}} - command: [node, index.cjs] + image: ghcr.io/linz/basemaps/cli:{{ workflow.parameters.version-basemaps-cli }} + command: [node, /app/node_modules/.bin/cogify] env: - name: AWS_ROLE_CONFIG_PATH - value: s3://linz-bucket-config/config.json + value: s3://linz-bucket-config/config.basemaps.json args: - [ - "-V", - "create-config", - "--path", - "{{=sprig.trim(inputs.parameters.location)}}", - "--title", - "{{=sprig.trim(inputs.parameters.title)}}", - "--output", - "/tmp/url", - "--commit", - ] + - "config" + - "{{ inputs.parameters.location }}" outputs: parameters: - name: url + description: Basemaps URL to view the imagery valueFrom: - path: "/tmp/url" + path: "/tmp/cogify/config-url" + - name: config + description: Location of the config file + valueFrom: + path: "/tmp/cogify/config-path" diff --git a/workflows/imagery/standardising.yaml b/workflows/imagery/standardising.yaml index 7d8ecd625..3e60c5e77 100644 --- a/workflows/imagery/standardising.yaml +++ b/workflows/imagery/standardising.yaml @@ -20,7 +20,7 @@ spec: - name: version-argo-tasks value: "v2" - name: version-basemaps-cli - value: "v6.39.0-15-g3e982390" + value: "v6" - name: version-topo-imagery value: "v3" - name: source @@ -480,32 +480,31 @@ spec: ] - name: create-config + retryStrategy: + limit: "2" inputs: parameters: - name: location + description: Location of the imagery to create config for container: - image: "ghcr.io/linz/basemaps/cli:{{=sprig.trim(workflow.parameters['version-basemaps-cli'])}}" - command: [node, index.cjs] + image: ghcr.io/linz/basemaps/cli:{{ workflow.parameters.version-basemaps-cli }} + command: [node, /app/node_modules/.bin/cogify] env: - name: AWS_ROLE_CONFIG_PATH - value: s3://linz-bucket-config/config.json + value: s3://linz-bucket-config/config.basemaps.json args: - [ - "-V", - "create-config", - "--path", - "{{inputs.parameters.location}}flat/", - "--output", - "/tmp/url", - "--title", - "{{=sprig.trim(workflow.parameters.title)}}", - "--commit", - ] + - "config" + - "{{ inputs.parameters.location }}" outputs: parameters: - name: url + description: Basemaps URL to view the imagery + valueFrom: + path: "/tmp/cogify/config-url" + - name: config + description: Location of the config file valueFrom: - path: "/tmp/url" + path: "/tmp/cogify/config-path" volumes: - name: ephemeral