mailman3-ldap-sync/.gitlab-ci.yml

71 lines
1.8 KiB
YAML
Raw Normal View History

2018-06-29 13:55:45 +02:00
stages:
2018-08-22 16:31:57 +02:00
- lint
2018-06-29 13:55:45 +02:00
- build
- checking
- deploy
2018-08-22 16:31:57 +02:00
run-lint:
image: debian:buster
2018-08-22 16:31:57 +02:00
stage: lint
allow_failure: true
tags:
- debian
before_script:
- apt-get update
- apt-get install -y rubocop
script:
- rubocop
2018-06-29 13:55:45 +02:00
# Build package using dpkg-buildpackage
run-build:
stage: build
tags:
- debian
- generic
script:
- echo 'Acquire::http { Proxy "http://rapperswil:3142"; };' > /etc/apt/apt.conf.d/02proxy
- apt-get update -qy
- apt-get install -y dpkg-dev debhelper
- dpkg-buildpackage -us -uc
- mkdir build-artifacts
- mv ../unipoly-mlmmj-ldap-sync* build-artifacts/
artifacts:
paths:
- build-artifacts
# Check built package using lintian.
run-checking:
stage: checking
tags:
- debian
- generic
script:
- echo 'Acquire::http { Proxy "http://rapperswil:3142"; };' > /etc/apt/apt.conf.d/02proxy
- apt-get update -qy
- apt-get install -y lintian
- lintian -i build-artifacts/unipoly-mlmmj-ldap-sync*.changes
# Deploy the built package to rapperswil
run-deploy:
2018-06-29 13:55:45 +02:00
stage: deploy
variables:
only:
- tags
except:
- /^(?!master).+@/
tags:
- debian
- generic
before_script:
- 'which ssh-agent || (apt-get update -qy && apt-get install openssh-client -y)'
- eval $(ssh-agent -s)
- echo "$CD_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- echo "$CD_SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- apt-get update -qy
- apt-get install -y dput
- 'echo "$CD_MINIDINSTALL_CONFIG" > ~/.dput.cf'
2018-12-25 10:56:05 +01:00
- 'dput -u gnugen build-artifacts/unipoly-mlmmj-ldap-sync*.changes'