diff --git a/bin/getfile.sh b/bin/getfile.sh index 381db6c45838f6b3582148d9675f8f36e6f54a34..db494005e59677ef77e45f308fcefc1e7d07fcae 100755 --- a/bin/getfile.sh +++ b/bin/getfile.sh @@ -163,6 +163,7 @@ ${apiTS} fi else echo ERROR: Download failed. + exit 1 fi else curl\ @@ -287,4 +288,4 @@ if [ "$IMLCI_FILE" = "ALL" ]; then done else makeRequest GET "/packages/$IMLCI_PHASE/$IMLCI_PROJECT/$IMLCI_FILE" "$IMLCI_OUTFILE" "$IMLCI_PKG_SECRET" -fi \ No newline at end of file +fi diff --git a/deploy_app.sh b/deploy_app.sh index 393f27d2f68e0e8bfc1f2dfe27a59d390b6b9ddf..d1d1e017e9dd12fbf32d5fe2bde6294da6c7ddeb 100755 --- a/deploy_app.sh +++ b/deploy_app.sh @@ -20,6 +20,10 @@ tmpdir=/var/tmp/imldeployment_packages wait=0 # wait=1 +# export variables that will be set in getfile config or project +export IMLCI_PROJECT=TODO +export IMLCI_PHASE=TODO + # ---------------------------------------------------------------------- # FUNCTIONS diff --git a/readme.md b/readme.md index 77cc4d594c2ccdc018f70f19be6b744fc2fb81cc..6dbb02864bff64883d9d8ffb2ef36532d8de8ea4 100644 --- a/readme.md +++ b/readme.md @@ -80,13 +80,13 @@ cleanup_force=0 Config variables: -name | type | description +name | type | description --- | --- | --- installdir | string | target directory of your application appowner | string | if not empty a chown -R will be applied in target directory by `chwon -R ${appowner} ${installdir}`; appowner is the parameter behind -R. It is something like "myuser." or "myuser:mygroup". For a web application it should be the user of your webservice (www-data/ apache/ nginx). The command chown requires to run the deploy script as root. IMLCI_PROJECT | string | Project id in IML CI server IMLCI_PHASE | string | optional: override the global IMLCI_PHASE in ./bin/getfile.sh.cfg; it is one of preview\|stage\|live -cleanup_preview | 0 or 1 | Cleanup preview - shows diff between downloaded TGZ and ${installdir}. +cleanup_preview | 0 or 1 | Cleanup preview - shows diff between downloaded TGZ and ${installdir}. cleanup_force | 0 or 1 | Run cleanup: it deletes all files in target directory that aren't in the last downloaded tgz. To keep runtime data like logs or uploads you can add a file `.keep` in the directory. Make a testrun: `./deploy_app.sh` in application root.