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
+ 479
3
Compare changes
  • Side-by-side
  • Inline
Files
2
  • When combined with changes to SteamLinuxRuntime scripts, this will let
    us do a new pressure-vessel release and incorporate it into
    soldier/sniper/etc. depots, without having to do a whole release of
    scout to provide the new pressure-vessel.
    
    These releases don't include anything that we didn't already publish
    in Gitlab artifacts, and they're relatively small, so they might as well
    be public immediately (unlike the full scout releases, which we avoid
    publishing before they are final, both because they are rather large and
    because game developers could get compatibility issues if they build
    against a non-finalized scout runtime).
    
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
+ 151
13
@@ -3,7 +3,6 @@ include:
file: '/steam-gitlab-ci-common.yml'
variables:
BUILD_IMAGE: registry.gitlab.steamos.cloud/steamrt/scout/sdk:beta
STEAM_CI_USE_BINARIES_FROM: build
STEAM_CI_DEPENDENCIES: >-
debhelper
@@ -51,14 +50,37 @@ variables:
# different devices
STEAM_CI_TMPDIR: "${CI_PROJECT_DIR}/debian/tmpdir"
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,
# in the usual ~/.ssh/known_hosts format:
# upload-host.example ssh-rsa AAA...
# upload-host.example ecdsa-sha2-nistp256 AAA...
# upload-host.example ssh-ed25519 AAA...
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 key authorized for P_V_CI_UPLOAD_USER
PRESSURE_VESSEL_CI_UPLOAD_SSH_PRIVATE_KEY_FILE: ''
stages:
- build
- relocatable-install
- deploy
- test
package:
extends: .build_package
variables:
BUILD_IMAGE: '${SCOUT_DOCKER_REGISTRY}/${SCOUT_DOCKER_IMAGE}'
STEAM_CI_DEB_BUILD: full # debuild --build=full, aka -F
STEAM_CI_INSTALL_SCRIPT: |
apt-get -y install pkg-create-dbgsym
@@ -66,7 +88,7 @@ package:
package:i386:
extends: .build_package
variables:
BUILD_IMAGE: registry.gitlab.steamos.cloud/steamrt/scout/sdk/i386:beta
BUILD_IMAGE: '${SCOUT_DOCKER_REGISTRY}/${SCOUT_I386_DOCKER_IMAGE}'
STEAM_CI_DEB_BUILD: any # debuild --build=any, aka -B
STEAM_CI_INSTALL_SCRIPT: |
apt-get -y install pkg-create-dbgsym
@@ -199,7 +221,7 @@ build:scout-i386:
- _build/scout-i386/meson-logs/*.txt
when: always
relocatable-install:
relocatable-install:debug:
stage: relocatable-install
needs:
- build:scout
@@ -213,30 +235,85 @@ relocatable-install:
- |
apt-get -y --no-install-recommends install \
bubblewrap \
libglib2.0-dev \
libxau-dev \
libglib2.0-dev:amd64 \
libglib2.0-dev:i386 \
libxau-dev:amd64 \
libxau-dev:i386 \
meson \
waffle-utils-multiarch:amd64 \
waffle-utils-multiarch:i386 \
${NULL+}
rm -fr _build/scout/relocatable-install
rm -fr _build/debug/relocatable-install
mkdir -p _build/debug
_build/scout/prefix/lib/pressure-vessel/relocatable/bin/pressure-vessel-build-relocatable-install \
--output _build/scout/relocatable-install \
--archive "$(pwd)/_build/scout" \
--output _build/debug/relocatable-install \
--archive "$(pwd)/_build/debug" \
${CI_ALLOW_MISSING_SOURCES:+--allow-missing-sources} \
${NULL+}
prove -epython3.5 -v ./tests/pressure-vessel/relocatable-install.py :: \
"$(pwd)/_build/debug/relocatable-install"
artifacts:
paths:
- _build/debug/pressure-vessel-*-bin.tar.gz
- _build/debug/pressure-vessel-*-bin+src.tar.gz
when: on_success
relocatable-install:production:
stage: relocatable-install
needs:
- package
- package:i386
tags:
- docker
- linux
image: "${SCOUT_DOCKER_REGISTRY}/${SCOUT_DOCKER_IMAGE}"
script:
- *prepare_scout
- |
apt-get -y --no-install-recommends install \
bubblewrap \
libglib2.0-dev:amd64 \
libglib2.0-dev:i386 \
libxau-dev:amd64 \
libxau-dev:i386 \
meson \
waffle-utils-multiarch:amd64 \
waffle-utils-multiarch:i386 \
${NULL+}
dpkg -i \
debian/tmp/artifacts/build/*_amd64.*deb \
debian/tmp/artifacts/build/libsteam-runtime-tools-0-0-dbgsym_*_i386.*deb \
debian/tmp/artifacts/build/libsteam-runtime-tools-0-0_*_i386.deb \
debian/tmp/artifacts/build/libsteam-runtime-tools-0-dev_*_i386.deb \
debian/tmp/artifacts/build/libsteam-runtime-tools-0-helpers-dbgsym_*_i386.*deb \
debian/tmp/artifacts/build/libsteam-runtime-tools-0-helpers_*_i386.deb \
debian/tmp/artifacts/build/libsteam-runtime-tools-0-relocatable-libs_*_i386.deb \
debian/tmp/artifacts/build/pressure-vessel-libs-i386_*_i386.deb \
${NULL+}
rm -fr _build/production/relocatable-install
mkdir -p _build/production
/usr/lib/pressure-vessel/relocatable/bin/pressure-vessel-build-relocatable-install \
--output _build/production/relocatable-install \
--archive "$(pwd)/_build/production" \
--no-archive-versions \
${CI_ALLOW_MISSING_SOURCES:+--allow-missing-sources} \
${NULL+}
prove -epython3.5 -v ./tests/pressure-vessel/relocatable-install.py :: \
"$(pwd)/_build/scout/relocatable-install"
"$(pwd)/_build/production/relocatable-install"
artifacts:
paths:
- _build/scout/pressure-vessel-*-bin.tar.gz
- _build/scout/pressure-vessel-*-bin+src.tar.gz
- _build/production/pressure-vessel-bin.tar.gz
- _build/production/pressure-vessel-bin+src.tar.gz
when: on_success
.prepare_test: &prepare_test
- |
set -eux
PRESSURE_VESSEL=$(ls _build/scout/pressure-vessel-*-bin.tar.gz | head -1)
PRESSURE_VESSEL=_build/production/pressure-vessel-bin.tar.gz
mkdir -p _build/depot-template/common
if [ -n "${IMAGES_DOWNLOAD_URL}" ] && [ -n "${IMAGES_DOWNLOAD_CREDENTIAL}" ]; then
@@ -276,7 +353,7 @@ relocatable-install:
.test_template:
needs:
- relocatable-install
- relocatable-install:production
stage: test
tags:
- docker
@@ -396,4 +473,65 @@ 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: '$PRESSURE_VESSEL_CI_UPLOAD_HOST_SSH_PUBLIC_KEYS_FILE == ""'
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:
- |
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"
else
path="$PRESSURE_VESSEL_CI_UPLOAD_PLAYGROUND_PATH"
fi
./pressure-vessel/upload-artifacts.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