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
+ 77
47
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 27
7
@@ -52,18 +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
- test
package:
extends: .build_package
@@ -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,17 +498,22 @@ deploy:
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 ! [ -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
chmod 0600 "$PRESSURE_VESSEL_CI_UPLOAD_SSH_PRIVATE_KEY_FILE"
if [ -n "${CI_COMMIT_TAG-}" ]; then
path="$PRESSURE_VESSEL_CI_UPLOAD_PATH"
@@ -503,10 +521,12 @@ deploy:
path="$PRESSURE_VESSEL_CI_UPLOAD_PLAYGROUND_PATH"
fi
python3.5 pressure-vessel/deploy.py \
./pressure-vessel/deploy.py \
--host="$PRESSURE_VESSEL_CI_UPLOAD_HOST" \
--path="$path" \
--login="$PRESSURE_VESSEL_CI_UPLOAD_USER" \
--ssh-known-hosts="$PRESSURE_VESSEL_CI_UPLOAD_HOST_SSH_PUBLIC_KEYS_FILE" \
--ssh-private-key="$PRESSURE_VESSEL_CI_UPLOAD_SSH_PRIVATE_KEY_FILE" \
${NULL+}
# vim:set sw=4 sts=4 et:
Loading