-
Pierre Smeyers authoredPierre Smeyers authored
.gitlab-ci.yml 1.22 KiB
include:
- project: 'to-be-continuous/tools/gitlab-ci'
ref: 'master'
file: '/templates/validation.yml'
- project: 'to-be-continuous/kicker'
ref: 'master'
file: '/templates/validation.yml'
- project: 'to-be-continuous/bash'
ref: '1.0.0'
file: 'templates/gitlab-ci-bash.yml'
stages:
- build
- publish
variables:
GITLAB_CI_FILES: "templates/gitlab-ci-openshift.yml"
BASH_SHELLCHECK_FILES: "*.sh"
BASH_BATS_ENABLED: "true"
BASH_BATS_TESTS: "test"
BASH_BATS_LIBRARIES: "bats-support@https://github.com/bats-core/bats-support/archive/v0.3.0.zip bats-assert@https://github.com/bats-core/bats-assert/archive/v2.0.0.zip"
extract-script:
stage: .pre
script:
- echo "#!/bin/bash" > script.sh
- sed -n '/BEGSCRIPT/,/ENDSCRIPT/p' "$GITLAB_CI_FILES" | sed 's/^ //' >> script.sh
- export LC_ALL=C.UTF-8
artifacts:
when: always
name: extracted template script
expire_in: 1h
paths:
- script.sh
release:
image: node:12
stage: publish
before_script:
- npm install -g semantic-release @semantic-release/gitlab @semantic-release/exec @semantic-release/git
script:
- semantic-release
only:
refs:
- master
variables:
- $TMPL_RELEASE_ENABLED