Commit 384c47bf authored by Dainius Simelevicius's avatar Dainius Simelevicius
Browse files

references #146: replacing ftps based rpm upload with samba mount

parent ee9f1523
......@@ -3,18 +3,18 @@ variables:
WORKSUITE_PACKAGES: "xdaq2rc interface/evb interface/shared evb jobcontrol xpci/drv xpci hal/generic hal/utilities hal/busAdapter/dummy hal/busAdapter/caen hal/busAdapter/pci hal/PyHAL pheaps/drv/cmem_rcc pheaps jal/jtagChain jal/jtagController jal/jtagSVFSequencer ttc/utils ttc/monitoring ttc/ltc ttc/ttcci tts/ttsbase tts/atts tts/cpcibase tts/fmmtd tts/ipcutils tts/fmm tts/fmmcontroller tts/fmmdbi tts/fmmtester d2s/utils d2s/fedemulator d2s/gtpe d2s/gtpecontroller d2s/firmwareloader fedstreamer fedkit ferol ferol40 psx/sapi psx/mapi psx psx/watchdog sentinel sentinel/utils sentinel/probe sentinel/sentineld sentinel/tester sentinel/bridge2g sentinel/spotlight2g sentinel/spotlightocci sentinel/arc/utils sentinel/arc tstore/utils tstore/client tstore tstore/api xmas/admin xmas/heartbeat xmas/heartbeat/probe xmas/heartbeat/heartbeatd xmas/utils xmas/sensord xmas/probe xmas/tester xmas/bridge2g xmas/slash2g xmas/store2g xmas/smarthub ibvla pt/udapl pt/ibv gevb2g es/api es/xtreme es/xbeat elastic/api elastic/timestream amc13controller dipbridge"
RPM_REPO_DIR: "/tmp/$CI_PROJECT_NAME/$CI_JOB_NAME/repo"
YUM_DIR: "/tmp/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME/cc7/x86_64/RPMS"
DOCKER_IMAGE: "gitlab-registry.cern.ch/cmsos/docker/docker-image-cmsos-15-cc7-x86_64-worksuite:2.0.0.0"
DOCKER_IMAGE: "gitlab-registry.cern.ch/cmsos/docker/docker-image-cmsos-15-cc7-x86_64-worksuite:2.1.0.0"
ARTIFACT_PREREQUISITE_DIR: "$CI_PROJECT_DIR/prerequisites/"
ARTIFACT_DISTRIBUTED_DIR: "$CI_PROJECT_DIR/distributed/rpm/"
ARTIFACT_REQUIRED_DIR: "$CI_PROJECT_DIR/required/rpm/"
stages:
- setup
- build
- validate
- distribute
- staging
- production
- setup
- build
- validate
- distribute
- staging
- production
prepare:
stage: setup
......@@ -738,6 +738,7 @@ git:
yum:
stage: distribute
image: $DOCKER_IMAGE
dependencies:
- prepare
- skip-build
......@@ -852,16 +853,27 @@ yum:
# can be used for secure access of the the website.
# The remote repository could be used, when available, to initialize local repository, otherwise empty
# ***************************** IMPORTANT ***********************************************************
- export YUM_USER=$(echo $XDAQ_WEBSITE_CREDENTIALS | awk '{split($0,a,","); print a[1]}')
- export YUM_PASS=$(echo $XDAQ_WEBSITE_CREDENTIALS | awk '{split($0,a,","); print a[2]}')
- echo $YUM_USER
- echo $XDAQ_WEBSITE_HOST
- echo $XDAQ_WEBSITE_PATH
- echo "YUM_DIR="$YUM_DIR
- export DISTRIBUTE_PATH=$XDAQ_WEBSITE_PATH/development/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME/cc7/x86_64/RPMS
- lftp -u $XDAQ_WEBSITE_CREDENTIALS $XDAQ_WEBSITE_HOST -e "set ftp:ssl-protect-data true; set ftp:ssl-force true; set ssl:verify-certificate no; set ftp:use-hftp no; set ftp:proxy $XDAQ_WEBSITE_PROXY; rm -rf $DISTRIBUTE_PATH; mirror -R $YUM_DIR $DISTRIBUTE_PATH"
- echo $DISTRIBUTE_PATH
# - lftp -u $XDAQ_WEBSITE_CREDENTIALS $XDAQ_WEBSITE_HOST -e "set ftp:ssl-protect-data true; set ftp:ssl-force true; set ssl:verify-certificate no; set ftp:use-hftp no; set ftp:proxy $XDAQ_WEBSITE_PROXY; rm -rf $DISTRIBUTE_PATH; mirror -R $YUM_DIR $DISTRIBUTE_PATH"
- export MOUNTED_DIR=/dfs/cern.ch/x
- mkdir -p $MOUNTED_DIR
- mount -t cifs -o user=$YUM_USER,password=$YUM_PASS,iocharset=utf8,file_mode=0777,dir_mode=0777,nolock,vers=2.0 //cerndataw01.cern.ch/Websites-x$ $MOUNTED_DIR
- rm -rf /dfs/cern.ch/$DISTRIBUTE_PATH
- mkdir -p /dfs/cern.ch/$DISTRIBUTE_PATH
- rsync --archive --verbose --times $YUM_DIR /dfs/cern.ch/$DISTRIBUTE_PATH
- umount $MOUNTED_DIR
environment:
name: development
url: http://$XDAQ_WEBSITE_HOST/xdaq/repo/development/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME/cc7/x86_64/RPMS/
tags:
- cmsos-cc7-x86_64-tag
- cmsos-privileged-cc7-x86_64-tag
when: manual
except:
- pushes
......
Supports Markdown
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