Skip to content

Commit

Permalink
[sophora-import-job]: support for tar gz archive
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-schoener committed Sep 21, 2023
1 parent 6531b40 commit be9035c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/sophora-import-job/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.2
version: 1.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
7 changes: 6 additions & 1 deletion charts/sophora-import-job/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ A one-time Sophora Importer that runs as a k8s job and imports the data from s3

Additional environment variables are supported via `importer.extraEnv`. The variables have to be defined in kubernetes env format.

## Supported archive formats

* `.zip`
* `.tar.gz`

## Import transformation files via S3 or HTTP

Activate transformations by setting `transformation.enabled` to `true`. Now you can reference one or more zip files via s3 or http
Expand Down Expand Up @@ -51,7 +56,7 @@ transformation:
secretName: "read-only-bucket-secret"
bucketName: "bucket-with-transformations"
zipPaths:
- "/transformation-data.zip"
- "/transformation-data.tar.gz"
useSaxon: true
saxonLicenceSecretName: "saxon-license"
saxonLicenceSecretKey: "saxon-license.lic"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ downloadDurationMillis=$((downloadEnd-jobStart))
downloadDurationSeconds=$(awk -v millis=$downloadDurationMillis 'BEGIN { print ( millis / 1000 ) }')

for file in `ls *.zip`; do unzip "$file"; done
rm *.zip;
for file in `ls *.tar.gz`; do tar -zxvf "$file"; done
rm *.zip
rm *.tar.gz
mkdir -p /import/incoming
mkdir -p /import/temp
mkdir -p /import/success
Expand Down

0 comments on commit be9035c

Please sign in to comment.