diff --git a/E3ModuleBuild-require-3.3.0.gitlab-ci.yml b/E3ModuleBuild-require-3.3.0.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..52a0f7ccf028c11719e5afbda1b4e9fbd83d8ea2 --- /dev/null +++ b/E3ModuleBuild-require-3.3.0.gitlab-ci.yml @@ -0,0 +1,93 @@ +default: + image: registry.esss.lu.se/ics-docker/centos-e3:latest + +variables: + # Variables required for run-iocsh environment + LC_ALL: "en_US.utf-8" + LANG: "en_US.utf-8" + +stages: + - build + - test + - deploy + +# Job templates. Actual jobs extend these hidden jobs. +.e3-build: + stage: build + script: + - make init + - make patch + - make build + +# This test job is used for require <= 3.3.0. Later versions >= 3.4.0 have +# built in testing capabilities. +.e3-test: + stage: test + variables: + before_script: + - pip3 install --user run-iocsh -i https://artifactory.esss.lu.se/artifactory/api/pypi/pypi-virtual/simple + - export PATH=$PATH:$(python3 -m site --user-base)/bin + # Extract EPICS environment information from RELEASE file + - BASE_DIR=$(grep -E EPICS_BASE.?= configure/RELEASE | cut -f 2 -d "=") + - REQUIRE_VER=$(grep -E REQUIRE_VERSION.?= configure/RELEASE | cut -f 2 -d "=") + # Extract module information from CONFIG_MODULE file + - MODULE_NAME=$(grep -E EPICS_MODULE_NAME.?= configure/CONFIG_MODULE | cut -f 2 -d "=") + - MODULE_VER=$(grep -E E3_MODULE_VERSION.?= configure/CONFIG_MODULE | cut -f 2 -d "=") + - source $BASE_DIR/require/$REQUIRE_VER/bin/setE3Env.bash + - make cellinstall + script: + - run-iocsh -r $MODULE_NAME,$MODULE_VER -l cellMods + +.e3-install: + stage: deploy + script: + - make install SUDO= + only: + refs: + - tags + when: manual + allow_failure: false + +# CSLAB jobs + +e3-build-cslab: + extends: .e3-build + tags: + - cslab + - e3-modules + +e3-test-cslab: + extends: .e3-test + tags: + - cslab + - e3-modules + +e3-install-cslab: + extends: .e3-install + tags: + - cslab + - e3-modules + environment: + name: cslab + +# TN jobs. All hidden at the moment, pending creation of TN gitlab runner. + +.e3-build-tn: + extends: .e3-build + tags: + - tn + - e3-modules + +.e3-test-tn: + extends: .e3-test + tags: + - tn + - e3-modules + +.e3-install-tn: + extends: .e3-install + tags: + - tn + - e3-modules + environment: + name: tn diff --git a/E3ModuleBuild.gitlab-ci.yml b/E3ModuleBuild.gitlab-ci.yml index e43521bf7a56e52f45a52ee52202639df34ba217..9295a2417600ec61c67d7f8b656d576fc1d828f2 100644 --- a/E3ModuleBuild.gitlab-ci.yml +++ b/E3ModuleBuild.gitlab-ci.yml @@ -1,26 +1,81 @@ ---- +default: + image: registry.esss.lu.se/ics-docker/centos-e3:latest + +variables: + # Variables required for run-iocsh environment + LC_ALL: "en_US.utf-8" + LANG: "en_US.utf-8" + stages: - build - - release - -default: - tags: - - e3-modules + - test + - deploy -build: +# Job templates. Actual jobs extend these hidden jobs. +.e3-build: stage: build - image: registry.esss.lu.se/ics-docker/centos-e3:latest script: - make init + - make patch - make build -# - make install - artifacts: - expire_in: 24h - paths: - - ./*/O.* - -install: - stage: release - image: registry.esss.lu.se/ics-docker/centos-e3:latest + +# Simplified test script for require 3.4.0 +.e3-test: + stage: test + before_script: + - pip3 install --user run-iocsh -i https://artifactory.esss.lu.se/artifactory/api/pypi/pypi-virtual/simple + - export PATH=$PATH:$(python3 -m site --user-base)/bin + script: + - make test + +.e3-install: + stage: deploy script: - make install + only: + refs: + - tags + when: manual + allow_failure: false + +# CSLAB jobs +e3-build-cslab: + extends: .e3-build + tags: + - cslab + - e3-modules + +e3-test-cslab: + extends: .e3-test + tags: + - cslab + - e3-modules + +e3-install-cslab: + extends: .e3-install + tags: + - cslab + - e3-modules + environment: + name: cslab + +# TN jobs. All hidden at the moment, pending creation of TN gitlab runner. +.e3-build-tn: + extends: .e3-build + tags: + - tn + - e3-modules + +.e3-test-tn: + extends: .e3-test + tags: + - tn + - e3-modules + +.e3-install-tn: + extends: .e3-install + tags: + - tn + - e3-modules + environment: + name: tn