Skip to content
Snippets Groups Projects
Verified Commit 1933fb22 authored by nd's avatar nd
Browse files

move config to shared file

parent 31bf3e4e
Branches
Tags
No related merge requests found
Pipeline #8607 passed
...@@ -8,40 +8,8 @@ variables: ...@@ -8,40 +8,8 @@ variables:
PACKAGE_NAME: prometheus-nginxlog-exporter PACKAGE_NAME: prometheus-nginxlog-exporter
UPSTREAM_GITHUB_PATH: martin-helmich/prometheus-nginxlog-exporter UPSTREAM_GITHUB_PATH: martin-helmich/prometheus-nginxlog-exporter
image: registry.git.cccv.de/infra/packages/docker-images/bullseye
autoupdate: autoupdate:
stage: autoupdate extends: .autoupdate:github:release-tags
rules:
- if: '$RUN_AUTOUPDATE == "1"'
when: always
- when: manual
dependencies: []
needs: []
script:
- git clone "https://${GITLAB_ACCESS_USER}:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" autoupdate-checkout
- cd autoupdate-checkout
- wget "${SHARED_CI_SCRIPTS_URL_PREFIX}/filter-versions-from-github.py"
- chmod 555 filter-versions-from-github.py
- ./filter-versions-from-github.py
- |
git config --global user.email "infra+packages-autoupdate@cccv.de"
git config --global user.name "autoupdater"
for version in $(./filter-versions-from-github.py); do
printf "variables:\n UPSTREAM_VERSION: ${version}" > gitlabci-version.yml
git commit -m "[autoupdate] Bump version to ${version}" gitlabci-version.yml
git tag "${version}"
done
git tag --list
- git push
- git push --tags
.build:
rules:
- if: '$RUN_AUTOUPDATE != "1"'
stage: build
dependencies: []
needs: []
.build:binary: .build:binary:
extends: .build extends: .build
...@@ -55,29 +23,6 @@ autoupdate: ...@@ -55,29 +23,6 @@ autoupdate:
paths: paths:
- prometheus-nginxlog-exporter - prometheus-nginxlog-exporter
.package:
rules:
- if: '$RUN_AUTOUPDATE != "1"'
stage: package
.package:apt:
extends: .package
image: registry.git.cccv.de/infra/packages/docker-images/bullseye
script:
- wget "${SHARED_CI_SCRIPTS_URL_PREFIX}/create_debian-changelog-from-git.py"
- chmod 555 create_debian-changelog-from-git.py
- ./create_debian-changelog-from-git.py ${PACKAGE_NAME} > debian/changelog
- ls -lahtr
- dpkg-buildpackage -us -uc
- mv ../*.deb ./
- cp debian/changelog ./changelog.txt
- dpkg-deb -I *.deb
- dpkg-deb -c *.deb
artifacts:
paths:
- ./*.deb
- changelog.txt
build:binary:buster: build:binary:buster:
image: registry.git.cccv.de/infra/packages/docker-images/buster image: registry.git.cccv.de/infra/packages/docker-images/buster
extends: .build:binary extends: .build:binary
...@@ -100,11 +45,6 @@ package:apt:bullseye: ...@@ -100,11 +45,6 @@ package:apt:bullseye:
needs: needs:
- build:binary:bullseye - build:binary:bullseye
.publish:
stage: publish
rules:
- if: '$RUN_AUTOUPDATE != "1" && $CI_COMMIT_TAG =~ /v[0-9]+[.][0-9]+[.][0-9]+.*/'
# for now, publish the bullseye package for buster as well # for now, publish the bullseye package for buster as well
publish:apt: publish:apt:
extends: .publish extends: .publish
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment