Skip to content
Snippets Groups Projects
Unverified Commit 75bb409f authored by Kali Kaneko's avatar Kali Kaneko
Browse files

[ci] separate push into its own stage

parent 356c8add
No related branches found
No related tags found
No related merge requests found
---
stages:
- build
- trigger-deb
- push
- trigger
variables:
GOPATH: /go
......@@ -27,28 +28,6 @@ build_test:
- 'bitmask-connect'
expire_in: 1 month
branded_push:
image: 0xacab.org:4567/leap/docker/bitmask-systray:latest
stage: build
script:
# install the command-line openssh client to manage private keys
- apt install -y openssh-client
# activate the ssh-agent
- eval $(ssh-agent -s)
# load the private key, which is accessed vi a gitlab CI secret environment variable
# We're using tr to fix line endings which makes ed25519 keys work
# without extra base64 encoding.
- ssh-add <(echo "$RISEUP_VPN_PACKAGE_SSH_KEY")
- mkdir -p ~/.ssh
# ensure that ssh will trust a new host, instead of asking
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
# we also need to configure name and email for git user
- git config user.name "Gitlab CI"
- git config user.email "gitlabci@0xacab.org"
# Add the remote repository and push to it
- git remote add riseup-vpn git@0xacab.org:leap/riseup-vpn_package.git
- git push --force riseup-vpn HEAD:incoming
win_installer:
image: 0xacab.org:4567/leap/docker/bitmask-systray:latest
stage: build
......@@ -140,8 +119,31 @@ deb:
# expire_in: 1 month
branded_push:
image: 0xacab.org:4567/leap/docker/bitmask-systray:latest
stage: push
script:
# install the command-line openssh client to manage private keys
- apt install -y openssh-client
# activate the ssh-agent
- eval $(ssh-agent -s)
# load the private key, which is accessed vi a gitlab CI secret environment variable
# We're using tr to fix line endings which makes ed25519 keys work
# without extra base64 encoding.
- ssh-add <(echo "$RISEUP_VPN_PACKAGE_SSH_KEY")
- mkdir -p ~/.ssh
# ensure that ssh will trust a new host, instead of asking
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
# we also need to configure name and email for git user
- git config user.name "Gitlab CI"
- git config user.email "gitlabci@0xacab.org"
# Add the remote repository and push to it
- git remote add riseup-vpn git@0xacab.org:leap/riseup-vpn_package.git
- git push --force riseup-vpn HEAD:incoming
trigger_deb:
image: 0xacab.org:4567/leap/docker/buster_amd64:latest
stage: trigger-deb
stage: trigger
script:
- "curl -X POST -F token=$RISEUP_VPN_DEB_TRIGGER_TOKEN -F ref=master https://0xacab.org/api/v4/projects/1916/trigger/pipeline"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment