Skip to content
Snippets Groups Projects

Publish pressure-vessel releases, separate from scout releases

Merged Simon McVittie requested to merge wip/t28526 into master
Compare and Show latest version
2 files
+ 68
42
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 24
2
@@ -52,11 +52,19 @@ 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:
@@ -462,6 +470,9 @@ autopkgtest:
deploy:
stage: deploy
tags:
- docker
- linux
needs:
- package
- package:i386
@@ -473,6 +484,8 @@ deploy:
when: never
- if: '$PRESSURE_VESSEL_CI_UPLOAD_HOST == ""'
when: never
- if: '$PRESSURE_VESSEL_CI_UPLOAD_HOST_SSH_PUBLIC_KEYS_FILE == ""'
when: never
- if: '$CI_COMMIT_TAG && $PRESSURE_VESSEL_CI_UPLOAD_PATH == ""'
when: never
- if: >-
@@ -485,18 +498,26 @@ deploy:
when: never
- if: '$CI_COMMIT_TAG'
when: always
- when: always
- when: manual
image: "${DEVEL_DOCKER_REGISTRY}/${DEVEL_DOCKER_IMAGE}"
variables:
STEAM_CI_DEPENDENCIES: >-
openssh-client
script:
- |
if ! [ -f "$PRESSURE_VESSEL_CI_UPLOAD_HOST_SSH_PUBLIC_KEYS_FILE" ]; then
echo "P_V_CI_UPLOAD_HOST_SSH_PUBLIC_KEYS_FILE must be of type File" >&2
exit 1
fi
if ! [ -f "$PRESSURE_VESSEL_CI_UPLOAD_SSH_PRIVATE_KEY_FILE" ]; then
echo "P_V_CI_UPLOAD_SSH_PRIVATE_KEY_FILE must be of type File" >&2
exit 1
fi
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"
@@ -508,6 +529,7 @@ deploy:
--host="$PRESSURE_VESSEL_CI_UPLOAD_HOST" \
--path="$path" \
--login="$PRESSURE_VESSEL_CI_UPLOAD_USER" \
--ssh-private-key="$PRESSURE_VESSEL_CI_UPLOAD_SSH_PRIVATE_KEY_FILE" \
${NULL+}
# vim:set sw=4 sts=4 et:
Loading