Commit b6d18571 authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

gitlab: add rpm publishing (part I)

parent 45209d5b
Pipeline #15274 passed with stages
in 3 minutes and 25 seconds
......@@ -27,6 +27,7 @@ package:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- "target/dcache-cta*.tar.gz"
- "target/SPECS"
publish:
only:
......@@ -41,6 +42,22 @@ publish:
- VERSION=${VERSION_1%.tar.gz}
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ${PACKAGE} ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/v${VERSION}/${PACKAGENAME}'
publish_rpm:
# only:
# - tags
stage: publish
image: centos:8
script:
- yum install -y curl rpm-build
- mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
- cp target/dcache-cta*.tar.gz rpmbuild/SOURCES
- rpmbuild -ba --define "_topdir `pwd`/rpmbuild" target/SPECS/dcache-cta.spec
- PACKAGE=$(ls -1 target/dcache-cta*.tar.gz)
- PACKAGENAME=$(basename ${PACKAGE})
- VERSION_1=${PACKAGENAME##*-}
- VERSION=${VERSION_1%.tar.gz}
# - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ${PACKAGE} ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/v${VERSION}/${PACKAGENAME}'
test:
stage: build
image: maven:3.6.3-openjdk-11
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment