README_CI.gitlab-ci.yml 3.01 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
# Note about the name of this file: README_CI.gitlab-ci.yml
#
# Automatic builds of the Debian website via Gitlab CI were setup during
# September-October 2018 (see <20180914134901.GC29596@grep.be>
# and <20181011191247.GA2733@grep.be>  (and the corresponding threads in
# debian-www mailing list) for context.
#
# This file (when named .gitlab-ci.yml) builds the website both for English
# and translations, and the result (the html files) can be browsed via
# artifacts.
#
# On November 2018 Salsa (Gitlab) settings for webwml project were set to keep
# artifacts 1 week (default was 4 weeks) in order to save space.
# Unfortunately the builds use too much resources, affecting salsa's ability
# to serve other users.
#
# So the settings were tweaked again to disable the use of shared runners,
# and this file has been renamed from .gitlab-ci.yml to README_CI.gitlab-ci.yml
#
# If you would like to enable Salsa's (GitLab's) CI builds for some test,
# please contact the Debian web team, or you can rename this file
# to its original name in your fork, and the CI build will run (occasionally)
# in your Salsa account.
#

26 27 28
stages:
- english
- translations
29
- merge
30 31 32
# english, which we do always
english:
  stage: english
33
  image: registry.salsa.debian.org/webmaster-team/webwml/build:latest
34
  script:
35
  - make LANGUAGES=english STRICT_ERROR_CHECKS=1 USE_SAMPLE_FILES=1 install
36 37 38 39
  after_script:
  - mkdir -p .public
  - mv ../www .public/english
  artifacts:
40
    expire_in: 1 week
41 42
    untracked: true
    when: always
43 44 45 46
    paths:
      - .public
# translations
.build: &build
47
  image: registry.salsa.debian.org/webmaster-team/webwml/build:latest
48 49 50
  stage: translations
  retry: 2
  script:
51
  - if ci/build-me; then make LANGUAGES=${CI_JOB_NAME} STRICT_ERROR_CHECKS=1 USE_SAMPLE_FILES=1 install; else echo "no changes for $CI_JOB_NAME"; fi
52 53 54 55
  after_script:
  - mkdir -p .public
  - mv ../www .public/${CI_JOB_NAME}
  artifacts:
56
    expire_in: 1 week
57
    when: always
58
    paths:
59
      - .public/$CI_JOB_NAME
60 61
merge:
  stage: merge
62
  image: debian:stretch
63 64 65 66 67 68 69
  before_script:
  - apt-get update
  - apt-get -y install rsync
  script:
  - mkdir -p public
  - for i in .public/*; do rsync -a $i/ public/; done
  artifacts:
70
    expire_in: 1 week
71 72
    paths:
      - public
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
albanian:
  <<: *build
arabic:
  <<: *build
armenian:
  <<: *build
bulgarian:
  <<: *build
catalan:
  <<: *build
chinese:
  <<: *build
croatian:
  <<: *build
czech:
  <<: *build
danish:
  <<: *build
dutch:
  <<: *build
esperanto:
  <<: *build
finnish:
  <<: *build
french:
  <<: *build
galician:
  <<: *build
german:
  <<: *build
greek:
  <<: *build
hebrew:
  <<: *build
hungarian:
  <<: *build
indonesian:
  <<: *build
italian:
  <<: *build
japanese:
  <<: *build
korean:
  <<: *build
lithuanian:
  <<: *build
norwegian:
  <<: *build
persian:
  <<: *build
polish:
  <<: *build
portuguese:
  <<: *build
romanian:
  <<: *build
russian:
  <<: *build
slovak:
  <<: *build
slovene:
  <<: *build
spanish:
  <<: *build
swedish:
  <<: *build
tamil:
  <<: *build
turkish:
  <<: *build
ukrainian:
  <<: *build
vietnamese:
  <<: *build