Skip to content

Commit

Permalink
ci: generate release-notes template
Browse files Browse the repository at this point in the history
(cherry picked from commit afb15bb)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
  • Loading branch information
kofemann committed Nov 4, 2023
1 parent 8fff819 commit 428f7c7
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .ci/generate-changelog.sh
@@ -0,0 +1,22 @@
#!/bin/sh


SRM_RPM_NAME=`ls modules/srm-client/target/rpmbuild/RPMS/noarch/ | grep dcache-srmclient`
SRM_RPM_SUM=`md5sum modules/srm-client/target/rpmbuild/RPMS/noarch/$SRM_RPM_NAME | cut -d ' ' -f 1`
DEB_NAME=`ls packages/fhs/target/ | grep dcache`
DEB_SUM=`md5sum packages/fhs/target/$DEB_NAME | cut -d ' ' -f 1`
TAR_NAME=`ls packages/tar/target/ | grep dcache`
TAR_SUM=`md5sum packages/tar/target/$TAR_NAME | cut -d ' ' -f 1`
RPM_NAME=`ls packages/fhs/target/rpmbuild/RPMS/noarch/ | grep dcache`
RPM_SUM=`md5sum packages/fhs/target/rpmbuild/RPMS/noarch/$RPM_NAME | cut -d ' ' -f 1`
DATE=`date +"%Y.%m.%d"`

echo "| Download | Build date | md5 sum |"
echo "|:-----------|:-----------|----------|"
echo "| $RPM_NAME | $DATE | $RPM_SUM |"
echo "| $DEB_NAME | $DATE | $DEB_SUM |"
echo "| $TAR_NAME | $DATE | $TAR_SUM |"
echo "| $SRM_RPM_NAME | $DATE | $SRM_RPM_SUM |"

echo ; echo; echo
git log `git describe --tags --abbrev=0`...`git describe --tags --abbrev=0 HEAD^` --no-merges --format='[%h](https://github.com/dcache/dcache/commit/%H)%n: %s%n'
20 changes: 20 additions & 0 deletions .gitlab-ci.yml
Expand Up @@ -316,6 +316,26 @@ upload_container:
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination dcache/dcache:$tag
#
# This jobs needs that the number of changes to fetch from GitLab when cloning a repository is high enough to generate
# the changelog.
Generate release notes:
image: almalinux:9-minimal
stage: upload
extends: .upload_rules
dependencies:
- sign_deb
- sign_rpm
- sign_srm_client_rpm
- tar
script:
- microdnf install -y git-core
- .ci/generate-changelog.sh >> release-$CI_COMMIT_TAG.md
artifacts:
paths:
- release-*.md

#
# prepare kubernetes env for the build
#
Expand Down

0 comments on commit 428f7c7

Please sign in to comment.