Newer
Older
## Please do not change this file.
## Doing so will unfortunately create unnesseccary merge conflicts between branches and the fork, and nordugrid/arc version of this file.
## To have the automatic builds work on your fork, check that the runner is enabled in your fork: Settings->CI/CD->Runner settings
variables:
OS_V: ''
ARC_IMAGE: ''
BUILD_VOL: ''
BROWSER: ''
BUILD_IMAGE: ''
Maiken
committed
#############################################################
## BUILDS (BOTH FORKS AND MAIN REPO) ##
Maiken
committed
#############################################################
.template_build_rhel: &template_build_rhel
- echo "$(date +%Y%m%d%H%M%S)" > VERSION
- yum update -y
- ./autogen.sh
- yum-builddep nordugrid-arc.spec -y
- echo "Preparing and running rpmbuild"
- make dist
- VERSION=`cat VERSION`
- mv nordugrid-arc-${VERSION}.tar.gz rpmbuild/SOURCES
- rpmbuild -D "_topdir $CI_PROJECT_DIR/rpmbuild" -ba nordugrid-arc.spec
artifacts:
when: on_success
expire_in: 3 days
paths:
- $CI_PROJECT_DIR/rpmbuild/SRPMS/
- $CI_PROJECT_DIR/rpmbuild/RPMS/noarch/
- $CI_PROJECT_DIR/rpmbuild/RPMS/x86_64/
allow_failure: false
tags:
- build
.template_build_rhel9: &template_build_rhel9
stage: build
image: $BUILD_IMAGE
script:
- echo "$(date +%Y%m%d%H%M%S)" > VERSION
- dnf remove -y dyninst
- dnf install -y dyninst
- dnf builddep nordugrid-arc -y
- ./autogen.sh
- ./configure
- dnf builddep nordugrid-arc.spec -y
- echo "Preparing and running rpmbuild"
- mkdir -p rpmbuild/{SOURCES,BUILD,RPMS,SRPMS}
- make dist
- VERSION=`cat VERSION`
- mv nordugrid-arc-${VERSION}.tar.gz rpmbuild/SOURCES
- rpmbuild -D "_topdir $CI_PROJECT_DIR/rpmbuild" -ba nordugrid-arc.spec
artifacts:
when: on_success
expire_in: 3 days
paths:
- $CI_PROJECT_DIR/rpmbuild/SRPMS/
- $CI_PROJECT_DIR/rpmbuild/RPMS/noarch/
- $CI_PROJECT_DIR/rpmbuild/RPMS/x86_64/
allow_failure: false
tags:
- build
allow_failure: false
.template_build_deb: &template_build_deb
stage: build
- echo "6.99.9" > VERSION
- ./autogen.sh
- ./configure
- make dist
- VERSION=`cat VERSION`
- mv nordugrid-arc-${VERSION}.tar.gz nordugrid-arc_${VERSION}.orig.tar.gz
- tar -z -x -f nordugrid-arc_${VERSION}.orig.tar.gz
- cd nordugrid-arc-${VERSION}
- dpkg-buildpackage -S -us -uc -d
- apt-get build-dep ../nordugrid-arc_${VERSION}-1.dsc -y
- dpkg-buildpackage -b -us -uc
- echo "Delete dbgsym debs to save space"
Maiken
committed
- rm -f ../*-dbgsym_*.deb
tags:
- build
artifacts:
when: on_success
expire_in: 3 days
paths:
- $CI_PROJECT_DIR/*.orig.tar.gz
- $CI_PROJECT_DIR/*.debian.tar.*
- $CI_PROJECT_DIR/*.dsc
- $CI_PROJECT_DIR/*.deb
allow_failure: false
Maiken
committed
###############
# CENTOS 7
###############
build_el7:
extends: .template_build_rhel
variables:
BUILD_IMAGE: maikenp/arc-build-centos7
#####################
# CENTOS STREAM 8
####################
build_el8:
extends: .template_build_rhel
variables:
####################
# CENTOS STREAM 9
####################
build_el9:
variables:
BUILD_IMAGE: maikenp/arc-build-cs9
Maiken
committed
# DEBIAN 10
###############
build_deb10:
extends: .template_build_deb
variables:
BUILD_IMAGE: maikenp/arc-build-debian10
###############
# DEBIAN 11
###############
build_deb11:
extends: .template_build_deb
variables:
BUILD_IMAGE: maikenp/arc-build-debian11
Maiken
committed
##################
# UBUNTU 18.04
##################
variables:
BUILD_IMAGE: maikenp/arc-build-ubuntu1804
Maiken
committed
##################
# UBUNTU 20.04
##################
build_ubuntu2004:
extends: .template_build_deb
variables:
BUILD_IMAGE: maikenp/arc-build-ubuntu2004
##################
# UBUNTU 22.04
##################
build_ubuntu2204:
extends: .template_build_deb
variables:
BUILD_IMAGE: maikenp/arc-build-ubuntu2204
Maiken
committed
#############################################################
Maiken
committed
## DEPLOY ##
Maiken
committed
#############################################################
image: docker:stable
Maiken
committed
- export DOCKER_API_VERSION=1.19
- DEPLOY_CONTAINER=$OS_V_`date +%Y%m%dT%H%M`
- docker pull $ARC_IMAGE
- GITLAB_CONTAINER=$(docker ps | awk 'FNR==2' | awk '{print $NF}')
- mkdir -p $BUILD_VOL
- ls -lhrt $BUILD_VOL
- echo '*************** Should be nothing at this point in /arc-logs - ls shows:'
- ls -lhrt /arc-logs
- echo 'Just removing files just in case'
- rm -rf /arc-logs/*
- rm -rf /arc-testlogs/*
script:
- echo "*************>> Starting - inner container"
- docker run
--name=$DEPLOY_CONTAINER
--volumes-from $GITLAB_CONTAINER
-v "/$BUILD_VOL:/$BUILD_VOL:rw"
-v "/arc-testlogs:/arc-testlogs:rw"
-v "/arc-logs:/arc-logs:rw"
--publish 443
--publish 2811
--publish 9000-9002
--publish 9000-9002/udp
--rm $ARC_IMAGE
- echo "*************>> Done - back from inner container - starting cleanup and artifcats copying"
- ls -lhrt /arc-logs
Maiken Pedersen
committed
- ls -lhrt /arc-testlogs
- cat /arc-testlogs/testresults.txt
- cp -r /arc-logs $CI_PROJECT_DIR
Maiken Pedersen
committed
- cp -r /arc-testlogs $CI_PROJECT_DIR
- ls -lhrt $CI_PROJECT_DIR/arc-logs
Maiken Pedersen
committed
- ls -lhrt $CI_PROJECT_DIR/arc-testlogs
- rm -rf /arc-logs/*
- rm -rf /arc-testlogs/*
- rm -rf $BUILD_VOL/*
artifacts:
when: always
paths:
- $CI_PROJECT_DIR/arc-logs/
- $CI_PROJECT_DIR/arc-testlogs/
allow_failure: true
Maiken
committed
##################
Maiken
committed
##################
deploy_el7:
extends: .deploy
variables:
OS_V: el7
ARC_IMAGE: maikenp/arc-deploy-centos7
BUILD_VOL: /rpmbuild
BUILD_DIR: $CI_PROJECT_DIR/$BUILD_VOL/*
- 158.39.201.67
- deploy
needs:
- job: build_el7
artifacts: true
#####################
# CENTOS STREAM 8
#####################
deploy_el8:
extends: .deploy
variables:
OS_V: el8
BUILD_VOL: /rpmbuild
BUILD_DIR: $CI_PROJECT_DIR/$BUILD_VOL/*
tags:
- 158.39.201.179
- deploy
needs:
- job: build_el8
artifacts: true
#####################
# CENTOS STREAM 9
#####################
deploy_el9:
extends: .deploy
variables:
OS_V: el9
ARC_IMAGE: maikenp/arc-deploy-cs9
BUILD_VOL: /rpmbuild
BUILD_DIR: $CI_PROJECT_DIR/$BUILD_VOL/*
tags:
- 158.39.201.179
- deploy
needs:
- job: build_el9
artifacts: true
Maiken
committed
##################
# DEBIAN 10
##################
deploy_deb10:
extends: .deploy
variables:
OS_V: deb10
ARC_IMAGE: maikenp/arc-deploy-debian10
BUILD_VOL: /build
BUILD_DIR: $CI_PROJECT_DIR/*.deb
Maiken
committed
- deploy
needs:
- job: build_deb10
artifacts: true
##################
# DEBIAN 11
##################
deploy_deb11:
extends: .deploy
variables:
OS_V: deb11
ARC_IMAGE: maikenp/arc-deploy-debian11
BUILD_VOL: /build
BUILD_DIR: $CI_PROJECT_DIR/*.deb
tags:
- 158.39.75.5
- deploy
needs:
- job: build_deb11
artifacts: true
Maiken
committed
##################
# UBUNTU 18.04
##################
deploy_ubuntu1804:
extends: .deploy
variables:
OS_V: ubuntu1804
ARC_IMAGE: maikenp/arc-deploy-ubuntu1804
BUILD_VOL: /build
BUILD_DIR: $CI_PROJECT_DIR/*.deb
Maiken
committed
tags:
Maiken
committed
- 158.39.74.3
Maiken
committed
- deploy
needs:
- job: build_ubuntu1804
artifacts: true
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
##################
# UBUNTU 20.04
##################
deploy_ubuntu2004:
extends: .deploy
variables:
OS_V: ubuntu2004
ARC_IMAGE: maikenp/arc-deploy-ubuntu2004
BUILD_VOL: /build
BUILD_DIR: $CI_PROJECT_DIR/*.deb
tags:
- 158.39.201.198
- deploy
needs:
- job: build_ubuntu2004
artifacts: true
##################
# UBUNTU 22.04
##################
deploy_ubuntu2204:
extends: .deploy
variables:
OS_V: ubuntu2204
ARC_IMAGE: maikenp/arc-deploy-ubuntu2204
BUILD_VOL: /build
BUILD_DIR: $CI_PROJECT_DIR/*.deb
tags:
- deploy
needs:
- job: build_ubuntu2204
artifacts: true
#############################################################
## CHECK DEPLOY ##
#############################################################
.job_template_assert:
image: maikenp/arc-deploy-check
Maiken Pedersen
committed
stage: check_deploy
variables:
TESTTYPE: ''
script:
- ls $CI_PROJECT_DIR/arc-testlogs/
- cp $CI_PROJECT_DIR/arc-testlogs/testresults.txt /
- cat /testresults.txt
tags:
- generic
############################
##### EL7 DEPLOY CHECK
############################
arcrest_el7_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcrest'
needs:
- job: deploy_el7
artifacts: true
arcconf_el7_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcconf'
needs:
- job: deploy_el7
artifacts: true
############################
##### EL8 DEPLOY CHECK
############################
arcrest_el8_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcrest'
Maiken Pedersen
committed
needs:
- job: deploy_el8
artifacts: true
arcconf_el8_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcconf'
Maiken Pedersen
committed
needs:
- job: deploy_el8
artifacts: true
############################
##### EL9 DEPLOY CHECK
############################
arcrest_el9_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcrest'
needs:
- job: deploy_el9
artifacts: true
arcconf_el9_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcconf'
needs:
- job: deploy_el9
artifacts: true
############################
##### DEB10 DEPLOY CHECK
############################
arcrest_deb10_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcrest'
Maiken Pedersen
committed
needs:
- job: deploy_deb10
artifacts: true
arcconf_deb10_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcconf'
Maiken Pedersen
committed
needs:
- job: deploy_deb10
artifacts: true
############################
##### DEB11 DEPLOY CHECK
############################
arcrest_deb11_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcrest'
needs:
- job: deploy_deb11
artifacts: true
arcconf_deb11_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcconf'
needs:
- job: deploy_deb11
artifacts: true
############################
##### UBUNTU DEPLOY CHECK
############################
arcrest_ubuntu1804_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcrest'
Maiken Pedersen
committed
needs:
- job: deploy_ubuntu1804
artifacts: true
arcconf_ubuntu1804_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcconf'
Maiken Pedersen
committed
needs:
- job: deploy_ubuntu1804
artifacts: true
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
############################
##### UBUNTU DEPLOY CHECK
############################
arcrest_ubuntu2004_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcrest'
needs:
- job: deploy_ubuntu2004
artifacts: true
arcconf_ubuntu2004_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcconf'
needs:
- job: deploy_ubuntu2004
artifacts: true
############################
##### UBUNTU DEPLOY CHECK
############################
arcrest_ubuntu2204_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcrest'
needs:
- job: deploy_ubuntu2204
artifacts: true
arcconf_ubuntu2204_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcconf'
needs:
- job: deploy_ubuntu2204
artifacts: true