diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 529d991f2e628e1f64e1c87d9966954b70048b80..b111041fd5411e0ea8c8e2a24c15623fd0ac5669 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,40 +8,8 @@ variables: PACKAGE_NAME: prometheus-nginxlog-exporter UPSTREAM_GITHUB_PATH: martin-helmich/prometheus-nginxlog-exporter -image: registry.git.cccv.de/infra/packages/docker-images/bullseye - autoupdate: - stage: autoupdate - 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: [] + extends: .autoupdate:github:release-tags .build:binary: extends: .build @@ -55,29 +23,6 @@ autoupdate: paths: - 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: image: registry.git.cccv.de/infra/packages/docker-images/buster extends: .build:binary @@ -100,11 +45,6 @@ package:apt:bullseye: needs: - 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 publish:apt: extends: .publish