Skip to content
Snippets Groups Projects
Commit 431c12b9 authored by Sebastian Lobinger's avatar Sebastian Lobinger
Browse files

pass ENV-Variables via ENVIRONMENTS file in .gitlab-ci.yml

parent 466b1a05
No related branches found
No related tags found
No related merge requests found
Pipeline #
image: ${CI_REGISTRY_IMAGE}/buildimage
before_script:
- export ARCH=all
- export VERSION="$(dpkg-parsechangelog -S version)"
- export PKGNAME="$(awk '/^Package:/ { print $2 }' debian/control)"
- echo $ARCH
- echo $VERSION
- echo $PKGNAME
- echo "ARCH=all" > ENVIRONMENTS
- echo "VERSION=$(dpkg-parsechangelog -S version)" >> ENVIRONMENTS
- echo "PKGNAME=$(awk '/^Package:/ { print $2 }' debian/control)" >> ENVIRONMENTS
.build-package: &build-package
stage: test
......@@ -13,9 +10,6 @@ before_script:
# will test, if we can build the package - this also runs the unittests
# ecause we use python3-setuptools
- dpkg-buildpackage -uc -us -b
- echo $ARCH
- echo $VERSION
- echo $PKGNAME
test-others:
<<: *build-package
......@@ -30,9 +24,7 @@ build-master:
<<: *build-package
stage: build
after_script:
- echo $ARCH
- echo $VERSION
- echo $PKGNAME
- eval $(cat ENVIRONMENTS)
- mkdir build
- ls ../
- mv ../${PKGNAME}_${VERSION}_${ARCH}.deb build/
......@@ -49,6 +41,7 @@ test-and-deploy-master:
dependencies:
- build-master
script:
- eval $(cat ENVIRONMENTS)
- gdebi --non-interactive build/${PKGNAME}_${VERSION}_${ARCH}.deb
environment:
name: staging
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment