@@ -18,15 +18,15 @@ spec:
1818 parameters :
1919 - name : version_map_cli
2020 description : Version of the map produce CLI docker container to use
21- value : ' v0.6 '
21+ value : ' latest '
2222
2323 - name : version_argo_tasks
2424 description : Version of the Argo Tasks CLI docker container to use
2525 value : ' v5'
2626
2727 - name : project
2828 description : Path or s3 of QGIS Project to use for generate map sheets.
29- value : ' s3://linz-topography-nonprod/qgis/latest/nztopo50map/nz-topo50-map .json'
29+ value : ' s3://linz-topography-nonprod/qgis/nztopo50/ latest/nztopo50 .json'
3030
3131 - name : map_sheets
3232 description : Map Sheet Codes to process, json array.
5656 - ' s3://linz-topography-nonprod/data/catalog.json'
5757 - ' s3://linz-topography/data/catalog.json'
5858
59- - name : output
60- description : Path or s3 of the output directory to write generated map sheets.
61- value : ' s3://linz-topography-scratch-nonprod/test/'
59+ - name : target
60+ description : Path or s3 of the target directory to write generated map sheets.
61+ value : ' s3://linz-topography-scratch-nonprod/'
62+ enum :
63+ - ' s3://linz-topography-scratch-nonprod/'
64+ - ' s3://linz-topography-nonprod/'
65+ - ' s3://linz-topography/'
66+
67+ - name : latest
68+ description : Whether to push to stac with latest strategy.
69+ value : ' true'
70+ enum :
71+ - ' true'
72+ - ' false'
73+
74+ - name : commit
75+ description : Whether to push to write the output to target bucket
76+ value : ' true'
77+ enum :
78+ - ' true'
79+ - ' false'
6280
6381 - name : format
6482 description : Export format as pdf, tiff, or geotiff
@@ -103,6 +121,8 @@ spec:
103121 value : ' {{ workflow.parameters.version_map_cli }}'
104122 - name : project
105123 value : ' {{ workflow.parameters.project }}'
124+ - name : source
125+ value : ' {{ workflow.parameters.source }}'
106126 - name : map_sheets
107127 value : ' {{ workflow.parameters.map_sheets }}'
108128 - name : produce_all
@@ -113,8 +133,6 @@ spec:
113133 value : ' {{ workflow.parameters.map_sheet_layer }}'
114134 - name : data_tags
115135 value : ' {{ workflow.parameters.data_tags }}'
116- - name : source
117- value : ' {{ workflow.parameters.source }}'
118136 - name : format
119137 value : ' {{ workflow.parameters.format }}'
120138 - name : dpi
@@ -154,33 +172,21 @@ spec:
154172 - name : grouped
155173 from : ' {{ tasks.group.outputs.artifacts.output }}'
156174
157- - name : copy
158- templateRef :
159- name : copy
160- template : main
161- depends : produce
175+ - name : stac-push
176+ template : stac-push
177+ depends : get-location && produce
162178 arguments :
163179 parameters :
180+ - name : version_map_cli
181+ value : ' {{ workflow.parameters.version_map_cli }}'
164182 - name : source
165183 value : ' {{ tasks.get-location.outputs.parameters.location }}'
166184 - name : target
167- value : ' {{ workflow.parameters.output }}'
168- - name : include
169- value : ' \.{{ workflow.parameters.format }}$|\.json$'
170- - name : exclude
171- value : ' '
172- - name : flatten
173- value : ' false'
174- - name : group
175- value : ' 1000'
176- - name : group_size
177- value : ' 100Gi'
178- - name : transform
179- value : ' f'
180- - name : copy_option
181- value : ' --force-no-clobber'
182- - name : aws_role_config_path
183- value : ' s3://linz-bucket-config/config-write.topography.json'
185+ value : ' {{ workflow.parameters.target }}'
186+ - name : latest
187+ value : ' {{ workflow.parameters.latest }}'
188+ - name : commit
189+ value : ' {{ workflow.parameters.commit }}'
184190
185191 - name : generate-map-sheets
186192 inputs :
@@ -219,7 +225,7 @@ spec:
219225 - name : cover-items
220226 path : /tmp/produce/cover-items.json
221227 container :
222- image : 725496895483.dkr.ecr.ap-southeast-2.amazonaws.com/github /linz/topographic-system/map:{{ inputs.parameters.version_map_cli }}
228+ image : ghcr.io /linz/topographic-system/map:{{ inputs.parameters.version_map_cli }}
223229 env :
224230 - name : AWS_ROLE_CONFIG_PATH
225231 value : s3://linz-bucket-config/config-write.topography.json
@@ -228,6 +234,7 @@ spec:
228234 - --project={{ inputs.parameters.project }}
229235 - --all={{ inputs.parameters.produce_all }}
230236 - --layout={{ inputs.parameters.layout }}
237+ - --map-sheet-layer={{ inputs.parameters.map_sheet_layer }}
231238 - --from-file=/tmp/map-sheets.json
232239 - " {{= sprig.empty(inputs.parameters.data_tags) ? '' : '--data-tags=' + inputs.parameters.data_tags }}"
233240 - --source={{ inputs.parameters.source }}
@@ -244,7 +251,7 @@ spec:
244251 - name : grouped
245252 path : /tmp/group/grouped/
246253 container :
247- image : 725496895483.dkr.ecr.ap-southeast-2.amazonaws.com/github /linz/topographic-system/map:{{ inputs.parameters.version_map_cli }}
254+ image : ghcr.io /linz/topographic-system/map:{{ inputs.parameters.version_map_cli }}
248255 resources :
249256 requests :
250257 memory : 7.8Gi
@@ -257,6 +264,35 @@ spec:
257264 - produce
258265 - --from-file={{= inputs.artifacts.grouped.path }}{{inputs.parameters.grouped_id}}.json
259266
267+ - name : stac-push
268+ inputs :
269+ parameters :
270+ - name : version_map_cli
271+ - name : source
272+ - name : target
273+ - name : latest
274+ - name : commit
275+ container :
276+ image : ghcr.io/linz/topographic-system/map:{{ inputs.parameters.version_map_cli }}
277+ resources :
278+ requests :
279+ memory : 7.8Gi
280+ cpu : 15000m
281+ imagePullPolicy : Always
282+ env :
283+ - name : AWS_ROLE_CONFIG_PATH
284+ value : s3://linz-bucket-config/config-write.topography.json
285+ command : [bash, -c]
286+ args :
287+ - |
288+ node /app/index.cjs stac-push \
289+ --source={{ inputs.parameters.source }}catalog.json \
290+ --target={{ inputs.parameters.target }} \
291+ --category=product \
292+ --strategy=date \
293+ $( [ "{{ inputs.parameters.latest }}" = "true" ] && echo "--strategy=latest" ) \
294+ --commit={{ inputs.parameters.commit }}
295+
260296 - name : exit-handler
261297 retryStrategy :
262298 limit : ' 0' # `tpl-log-notification` retries itself
0 commit comments