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

move more config to shared file

parent f3b9f5f5
No related branches found
No related tags found
No related merge requests found
......@@ -11,3 +11,65 @@ stages:
- package
- publish
- autoupdate
image: registry.git.cccv.de/infra/packages/docker-images/utility
.autoupdate:github:release-tags:
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: []
.package:
rules:
- if: '$RUN_AUTOUPDATE != "1"'
stage: package
.package:apt:
extends: .package
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
.publish:
stage: publish
rules:
- if: '$RUN_AUTOUPDATE != "1" && $CI_COMMIT_TAG =~ /v[0-9]+[.][0-9]+[.][0-9]+.*/'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment