Skip to content

Commit

Permalink
feat: add publish copy steps
Browse files Browse the repository at this point in the history
  • Loading branch information
MDavidson17 committed Aug 24, 2023
1 parent 5373cf6 commit 442501d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 6 deletions.
9 changes: 6 additions & 3 deletions workflows/util/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ Upon completion all standardised TIFF and STAC files will be located within the

## Workflow Input Parameters

| Parameter | Type | Default | Description |
| --------- | ---- | --------------------------------- | --------------------------------- |
| source | str | s3://linz-topgraphic/maps/topo50/ | the uri (path) to the input tiffs |
| Parameter | Type | Default | Description |
| ----------- | ---- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| source | str | s3://linz-topgraphic/maps/topo50/ | the uri (path) to the input tiffs |
| target | str | s3://linz- | the target uri (path) to copy the input and thumbnails |
| transform | str | f | String to be transformed from source to target to renamed filenames, e.g. `f.replace("text to replace", "new_text_to_use")`. Leave as `f` for no transformation. |
| copy-option | str | no-clobber | `--no-clobber` Skip overwriting existing files. `--force` Overwrite all files. `--force-no-clobber` Overwrite only changed files, skip unchanged files. tiffs |

## Workflow Outputs

Expand Down
44 changes: 41 additions & 3 deletions workflows/util/create-thumbnails.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ spec:
- name: version-topo-imagery
value: "v3"
- name: source
value: "s3://linz-topographic/maps/topo50/"
value: "s3://linz-topographic-upload/maps/topo50/"
- name: target
value: "s3://linz-"
- name: transform
value: "f"
- name: copy-option
value: "--no-clobber"
templateDefaults:
container:
imagePullPolicy: Always
Expand All @@ -28,6 +34,9 @@ spec:
- name: aws-list
template: aws-list

- name: get-location
template: get-location

- name: thumbnails
template: thumbnails
arguments:
Expand All @@ -39,8 +48,37 @@ spec:
from: "{{ tasks.aws-list.outputs.artifacts.files }}"
depends: "aws-list && get-location"

- name: get-location
template: get-location
- name: publish-source
templateRef:
name: publish-copy
template: main
arguments:
parameters:
- name: source
value: "{{workflow.parameters.source}}"
- name: include
value: ".*.*.tif?$"
- name: group
value: "1000"
- name: group-size
value: "100Gi"
depends: "thumbnails"

- name: publish-thumbnails
templateRef:
name: publish-copy
template: main
arguments:
parameters:
- name: source
value: "{{tasks.get-location.outputs.parameters.location}}thumbnails/"
- name: include
value: ".jpg?$"
- name: group
value: "1000"
- name: group-size
value: "100Gi"
depends: "thumbnails"

outputs:
parameters:
Expand Down

0 comments on commit 442501d

Please sign in to comment.