diff --git a/.drone.yml b/.drone.yml index 788d92f..a03af1d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,8 @@ pipeline: build: image: registry.i.wit.com/toby/packager:1.3 + environment: + - RELEASE=$${BRANCH/prod/} commands: - apt-get --allow-releaseinfo-change update - apt-get install -y sed strongswan frr isc-dhcp-client systemd @@ -10,7 +12,6 @@ pipeline: - ls -lha ../wit-network-config_*_all.deb - echo "$SSH_KEY" >/tmp/id_rsa - chmod 600 /tmp/id_rsa - - [ $DRONE_BRANCH -eq "prod" ] && export RELEASE="" - - scp -i /tmp/id_rsa -o StrictHostKeyChecking=no -P 22022 ../wit-network-config_*_all.deb root@cloud-api.v2.stack.wit.com:/data/incoming/${RELEASE:=staging} + - scp -i /tmp/id_rsa -o StrictHostKeyChecking=no -P 22022 ../wit-network-config_*_all.deb root@cloud-api.v2.stack.wit.com:/data/incoming/${RELEASE} secrets: [ ssh_key ] branches: [ staging, prod ]