Skip to content
Snippets Groups Projects
Commit bb61376b authored by Sam Thursfield's avatar Sam Thursfield
Browse files

ci: Separate image preparation commands

The Debian image preparation is moved to before_script to separate it
from the build and test commands. Note that this adds an implicit 5 minute
time limit on this part of the script (see
https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2716).

The commands are also now written once and copied using YAML anchors
(as documented at
https://docs.gitlab.com/ee/ci/yaml/README.html#yaml-anchors-for-before_script-and-after_script).
parent eea06f73
No related branches found
No related tags found
No related merge requests found
.debian_image_preparation: &debian_image_preparation
- echo "" | sudo -S apt-get -qq purge -y pd-l2ork > /dev/null || echo "couldn't purge..."
- echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y update > /dev/null
- echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y upgrade > /dev/null
debian_stretch_x86_64_deb:
tags:
- debian
- stretch
- x86_64
before_script:
- *debian_image_preparation
script:
- echo "" | sudo -S apt-get -qq purge -y pd-l2ork > /dev/null || echo "couldn't purge..."
- echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y update > /dev/null
- echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y upgrade > /dev/null
- cd l2ork_addons
- ./tar_em_up.sh -B
- cd ..
......@@ -24,10 +28,9 @@ ubuntu_16.04_x86_64_deb:
- ubuntu
- v16.04
- x86_64
before_script:
- *debian_image_preparation
script:
- echo "" | sudo -S apt-get -qq purge -y pd-l2ork > /dev/null || echo "couldn't purge..."
- echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y update > /dev/null
- echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y upgrade > /dev/null
- cd l2ork_addons
- ./tar_em_up.sh -B
- cd ..
......@@ -99,10 +102,9 @@ raspbian_stretch_armv7l_deb:
- raspbian
- arm
- stretch
before_script:
- *debian_image_preparation
script:
- echo "" | sudo -S apt-get -qq purge -y pd-l2ork > /dev/null || echo "couldn't purge..."
- echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y update > /dev/null
- echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y upgrade > /dev/null
- echo `pwd`
- cd l2ork_addons
- ./tar_em_up.sh -r
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment