Commit 503a6d78 authored by Ben Couturier's avatar Ben Couturier
Browse files

Merge branch '2-change-ci-cd-job-to-publish-rpm-to-nexusrm' into 'master'

Change CI/CD job to publish RPM to NexusRM

Closes #2

See merge request !14
parents 7a14aba4 72e2745a
Pipeline #1351152 passed with stages
in 2 minutes and 8 seconds
......@@ -4,9 +4,7 @@ stages:
- deploy
variables:
RPM_REPO: incubator
RPM_REPO_EOS: /eos/project/l/lhcbwebsites/www/lhcb-rpm/${RPM_REPO}
RPM_REPO_URL: "http://lhcb-rpm.web.cern.ch/lhcb-rpm/${RPM_REPO}/"
RPM_REPO_URL: "https://lhcb-repository.web.cern.ch/repository/lhcb-rpms/incubator/"
test-host_os-centos7:
......@@ -72,25 +70,19 @@ pack-rpm:
when: always
expire_in: 1 week
# see https://gitlab.cern.ch/gitlabci-examples/deploy_eos for the details
# of the configuration
deploy-rpm:
stage: deploy
only:
- tags
dependencies:
- pack-rpm
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer:latest
script:
- test -z "$EOS_ACCOUNT_USERNAME" -o -z "$EOS_ACCOUNT_PASSWORD" && exit 0 || true
# we do not publish the source RPM
- rm -fv public/*.src.rpm
# Script that performs the deploy to EOS. Makes use of the variables defined in the project
# It will copy the generated content to the folder in EOS
- export EOS_PATH=${RPM_REPO_EOS}
- find public -type f -ls
- deploy-eos
- test -z "$REPO_USERNAME" -o -z "$REPO_PASSWORD" && exit 0 || true
- cd public
- for rpm in $(find . -name "*.rpm") ; do
- echo $rpm
- curl --user "$REPO_USERNAME:$REPO_PASSWORD" -T $rpm $RPM_REPO_URL
- done
# do not run any globally defined before_script or after_script for this step
before_script: []
after_script: []
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