summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeorg <georg@riseup.net>2019-02-23 15:21:05 -0800
committergeorg <georg@riseup.net>2019-02-23 15:21:05 -0800
commit080c1394ffed54cf59362a2558db01312b63c1e5 (patch)
tree749850bfec8c8013f02bf6f3642a5b2b9c881590
parent6afc351d1c098a6f07fdc8752b8e1500d5ad30f3 (diff)
parent570f7152daaed3b9ccb3a8469e35cdbfb8264c9d (diff)
Merge branch 'ci-use-own-images' into 'master'
CI: use own images to speed up jobs (and to simplify the config) See merge request schleuder/schleuder-website!68
-rw-r--r--.gitlab-ci.yml37
1 files changed, 1 insertions, 36 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f160e86..8df03c4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,38 +1,12 @@
---
-image: debian:unstable
+image: $CI_REGISTRY/schleuder/schleuder-ci-images:debian-generic
stages:
- build
- deploy
- qa
-cache:
- paths:
- - vendor
-
-# Jobs that start with a period are disabled
-# This is just a template, to be used further below in the individual job definitions
-.setup_apt: &setup_apt
- before_script:
- # Export APT env vars to cache packages archives and lists based on the current working directory
- - export APT_DIR=$CI_PROJECT_DIR/vendor/apt && export APT_ARCHIVES_DIR=$APT_DIR/archives && export APT_LISTS_DIR=$APT_DIR/lists
- # Configure APT: Only install necessary packages, set cache location
- - printf
- "apt::install-recommends 0;\n
- apt::install-suggests 0;\n
- dir::cache::archives ${APT_ARCHIVES_DIR};\n
- dir::state::lists ${APT_LISTS_DIR};\n"
- >> /etc/apt/apt.conf.d/99custom
- # Ensure the custom APT directory does exist
- - mkdir -p {${APT_ARCHIVES_DIR},${APT_LISTS_DIR}}/partial
- - apt-get update -qq
- # To keep things DRY, use an env var to handle packages to be installed via APT
- - apt-get install -qq -y $APT_INSTALL_PACKAGES
-
build:
- variables:
- APT_INSTALL_PACKAGES: jekyll
- <<: *setup_apt
script:
# Set jekylls 'baseurl' option in case we're not dealing with the master branch.
- 'if ! [ "$CI_COMMIT_REF_SLUG" == "master" ]; then
@@ -47,9 +21,6 @@ build:
expire_in: 2 weeks
deploy:
- variables:
- APT_INSTALL_PACKAGES: lftp openssh-client
- <<: *setup_apt
script:
# Disable bash history to prevent secret variables to be recorded and saved
- unset HISTFILE
@@ -86,9 +57,6 @@ deploy:
- branches@schleuder/schleuder-website
codespell:
- variables:
- APT_INSTALL_PACKAGES: codespell
- <<: *setup_apt
script:
# Run codespell to check for spelling errors, using a config with ignored words,
# ignoring warnings about binary files and to check file names as well.
@@ -103,9 +71,6 @@ codespell:
stage: qa
linkcheck:
- variables:
- APT_INSTALL_PACKAGES: linkchecker
- <<: *setup_apt
script:
# Run linkchecker against the pushed (and deployed) branch. Exclude mailto: links, as the ones
# which we commonly use miss a MX record.