Skip to content
Snippets Groups Projects
Commit 0bf0ff96 authored by Frederic Danis's avatar Frederic Danis
Browse files

Add destination directory to upload.sh


This allows to upload to different directories the runtime and the app.

Signed-off-by: default avatarFrédéric Danis <frederic.danis@collabora.com>
parent 8cc83edc
No related branches found
No related tags found
No related merge requests found
...@@ -47,7 +47,7 @@ upload-runtime: ...@@ -47,7 +47,7 @@ upload-runtime:
image: ubuntu:16.04 image: ubuntu:16.04
stage: upload runtime stage: upload runtime
script: script:
- './upload.sh _build/flatdeb' - './upload.sh _build/flatdeb/ostree-repo/. runtime'
rules: rules:
- if: '$ARCHIVE_SECRET_FILE' - if: '$ARCHIVE_SECRET_FILE'
when: on_success when: on_success
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
set -eux set -eux
LOCAL_PATH=$1 LOCAL_PATH=$1
DEST_DIR=$2
cd $(dirname $0) cd $(dirname $0)
...@@ -12,5 +13,5 @@ upload_dest="$upload_host:$upload_root" ...@@ -12,5 +13,5 @@ upload_dest="$upload_host:$upload_root"
apt -y update apt -y update
apt -y install rsync ssh apt -y install rsync ssh
chmod 0400 "$ARCHIVE_SECRET_FILE" chmod 0400 "$ARCHIVE_SECRET_FILE"
ssh -oStrictHostKeyChecking=no -i "$ARCHIVE_SECRET_FILE" "$upload_host" mkdir -p "$upload_root" ssh -oStrictHostKeyChecking=no -i "$ARCHIVE_SECRET_FILE" "$upload_host" mkdir -p "$upload_root/$DEST_DIR"
rsync -e "ssh -oStrictHostKeyChecking=no -i $ARCHIVE_SECRET_FILE" -aP $LOCAL_PATH "$upload_dest/" rsync -e "ssh -oStrictHostKeyChecking=no -i $ARCHIVE_SECRET_FILE" -aP $LOCAL_PATH "$upload_dest/$DEST_DIR"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment