Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sympl
Sympl
Commits
746b428d
Commit
746b428d
authored
Mar 27, 2019
by
Paul Cammish
Browse files
Speculative fix to allow test installs
parent
5a05e416
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
746b428d
...
...
@@ -148,63 +148,25 @@ publish:
# fails on stretch for the time being - see issue #57 for updates
.install
:
&install
image
:
debian:stretch
stage
:
install
tags
:
-
systemd-containers
before_script
:
-
apt-get update ; apt-get -y install systemd-container
-
MACHINE=$CI_BUILD_ID-symbiosis-$DEBIAN_RELEASE-$ACTION
-
HOSTNAME=$MACHINE.localdomain
-
RUN_ARGS="--wait --quiet --pty --machine $MACHINE"
-
|
if [ "$ACTION" = "dist-upgrade" ]; then
machinectl clone ${OLD_DEBIAN_RELEASE} $MACHINE
else
machinectl clone ${DEBIAN_RELEASE} $MACHINE
fi
-
machinectl start $MACHINE
-
|
while [ "$IP" = "" ]; do
export IP=$(get-machine-ip $MACHINE)
sleep 3
done
-
machinectl copy-to $MACHINE test/internal-test.d /root/test.d
script
:
-
|
cat > run-test <<END_OF_INTERNAL_TEST
#!/bin/bash
set -e
export ACTION=$ACTION
export DEBIAN_RELEASE=$DEBIAN_RELEASE
export OLD_DEBIAN_RELEASE=$OLD_DEBIAN_RELEASE
export BRANCH_NAME=$CI_BUILD_REF_SLUG
export HOSTNAME=$HOSTNAMR
echo "$HOSTNAME" | tee /etc/hostname
echo "$IP $HOSTNAME" | tee -a /etc/hosts
hostname $HOSTNAME
/bin/run-parts --exit-on-error /root/test.d/
END_OF_INTERNAL_TEST
-
apt-get update
-
echo "deb file:$(pwd)/pkg ./" > /etc/apt/sources.list.d/local.list
-
apt-get update
-
apt-get install --install-recommends bytemark-symbiosis
-
sed -e 's/32;/34;/g' -i run-test
-
chmod +x run-test
-
machinectl copy-to $MACHINE run-test /run-test
-
ssh -o StrictHostKeyChecking=false -o UserKnownHostsFile=/dev/null root@$IP /run-test
-
run-parts --verbose --exit-on-error test/external-test.d
after_script
:
-
MACHINE=$CI_BUILD_ID-symbiosis-$DEBIAN_RELEASE-$ACTION
-
|
while machinectl status $MACHINE > /dev/null; do
machinectl stop $MACHINE || true
sleep 1
done
-
machinectl remove $MACHINE
-
./run-test
-
./run-parts --verbose --exit-on-error test/external-test.d
dependencies
:
[]
variables
:
&installvars
DEBIAN_RELEASE
:
stretch
OLD_DEBIAN_RELEASE
:
jessie
when
:
manual
# variables: &installvars
# DEBIAN_RELEASE: stretch
# OLD_DEBIAN_RELEASE: jessie
# when: manual
artifacts
:
paths
:
-
pkg/*
install:fresh-install:
<<
:
*install
...
...
@@ -212,17 +174,17 @@ install:fresh-install:
<<
:
*installvars
ACTION
:
install
install:upgrade:
<<
:
*install
allow_failure
:
true
variables
:
<<
:
*installvars
ACTION
:
upgrade
install:dist-upgrade:
<<
:
*install
allow_failure
:
true
variables
:
<<
:
*installvars
ACTION
:
dist-upgrade
#
install:upgrade:
#
<<: *install
#
allow_failure: true
#
variables:
#
<<: *installvars
#
ACTION: upgrade
#
install:dist-upgrade:
#
<<: *install
#
allow_failure: true
#
variables:
#
<<: *installvars
#
ACTION: dist-upgrade
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment