Skip to content

Commit

Permalink
Update to use cogify create-config.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentao-Kuang committed Sep 26, 2023
1 parent f8befce commit 4ab1f4a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 36 deletions.
34 changes: 14 additions & 20 deletions workflows/basemaps/create-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ spec:
parameters:
- name: version-basemaps-cli
value: "v6"
- name: title
value: ""
- name: location
value: "s3://bucket/path/to"
templateDefaults:
Expand All @@ -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"
31 changes: 15 additions & 16 deletions workflows/imagery/standardising.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4ab1f4a

Please sign in to comment.