Skip to content
Snippets Groups Projects

Publish pressure-vessel releases, separate from scout releases

Merged Simon McVittie requested to merge wip/t28526 into master
2 files
+ 405
0
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 69
0
@@ -52,10 +52,26 @@ variables:
BUILD_IMAGE: '${SCOUT_DOCKER_REGISTRY}/${SCOUT_DOCKER_IMAGE}'
# These need to be configured in
# https://gitlab.steamos.cloud/groups/steamrt/-/settings/ci_cd
# Hostname of the machine that receives pressure-vessel releases
PRESSURE_VESSEL_CI_UPLOAD_HOST: ''
# Create a File variable with the public key(s) of P_V_CI_UPLOAD_HOST
PRESSURE_VESSEL_CI_UPLOAD_HOST_SSH_PUBLIC_KEYS_FILE: ''
# Path on P_V_CI_UPLOAD_HOST: /srv/VHOST/www/pressure-vessel/snapshots
PRESSURE_VESSEL_CI_UPLOAD_PATH: ''
# Similar path on P_V_CI_UPLOAD_HOST for unreleased test-builds
PRESSURE_VESSEL_CI_UPLOAD_PLAYGROUND_PATH: ''
# User to log in on P_V_CI_UPLOAD_HOST
PRESSURE_VESSEL_CI_UPLOAD_USER: ''
# Create a File variable with a private authorized for P_V_CI_UPLOAD_USER
PRESSURE_VESSEL_CI_UPLOAD_SSH_PRIVATE_KEY_FILE: ''
stages:
- build
- relocatable-install
- test
- deploy
package:
extends: .build_package
@@ -452,4 +468,57 @@ autopkgtest:
${NULL+}
apt-get -y -f install
deploy:
stage: deploy
tags:
- docker
- linux
needs:
- package
- package:i386
- relocatable-install:production
rules:
- if: '$DEVEL_DOCKER_REGISTRY == ""'
when: never
- if: '$DEVEL_DOCKER_IMAGE == ""'
when: never
- if: '$PRESSURE_VESSEL_CI_UPLOAD_HOST == ""'
when: never
- if: '$CI_COMMIT_TAG && $PRESSURE_VESSEL_CI_UPLOAD_PATH == ""'
when: never
- if: >-
$PRESSURE_VESSEL_CI_UPLOAD_PATH == ""
&& $PRESSURE_VESSEL_CI_UPLOAD_PLAYGROUND_PATH == ""
when: never
- if: '$PRESSURE_VESSEL_CI_UPLOAD_USER == ""'
when: never
- if: '$PRESSURE_VESSEL_CI_UPLOAD_SSH_PRIVATE_KEY_FILE == ""'
when: never
- if: '$CI_COMMIT_TAG'
when: always
- when: manual
image: "${DEVEL_DOCKER_REGISTRY}/${DEVEL_DOCKER_IMAGE}"
variables:
STEAM_CI_DEPENDENCIES: >-
openssh-client
script:
- |
mkdir -p ~/.ssh
chmod 0700 ~/.ssh
cat "$PRESSURE_VESSEL_CI_UPLOAD_HOST_SSH_PUBLIC_KEYS_FILE" >> ~/.ssh/known_hosts
chmod 0644 ~/.ssh/known_hosts
tr -d '\r' < "$PRESSURE_VESSEL_CI_UPLOAD_SSH_PRIVATE_KEY_FILE" | ssh-add -
if [ -n "${CI_COMMIT_TAG-}" ]; then
path="$PRESSURE_VESSEL_CI_UPLOAD_PATH"
else
path="$PRESSURE_VESSEL_CI_UPLOAD_PLAYGROUND_PATH"
fi
python3.5 pressure-vessel/deploy.py \
--host="$PRESSURE_VESSEL_CI_UPLOAD_HOST" \
--path="$path" \
--login="$PRESSURE_VESSEL_CI_UPLOAD_USER" \
${NULL+}
# vim:set sw=4 sts=4 et:
Loading