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
- deploy
- check_deploy_centos
- check_deploy_debian
- check_deploy_ubuntu
variables:
OS_V: ''
ARC_IMAGE: ''
BUILD_VOL: ''
BROWSER: ''
BUILD_IMAGE: ''
Maiken
committed
#############################################################
## FORK BUILDS ##
#############################################################
.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_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
Maiken
committed
- echo Delete dbgsym debs to save space
- 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
###############
Maiken
committed
# CENTOS 8
###############
build_el8:
extends: .template_build_rhel
variables:
BUILD_IMAGE: maikenp/arc-build-centos8
Maiken
committed
# DEBIAN 9
###############
build_deb9:
extends: .template_build_deb
variables:
BUILD_IMAGE: maikenp/arc-build-debian9
Maiken
committed
Maiken
committed
# DEBIAN 10
###############
build_deb10:
extends: .template_build_deb
variables:
BUILD_IMAGE: maikenp/arc-build-debian10
Maiken
committed
##################
# UBUNTU 18.04
##################
variables:
BUILD_IMAGE: maikenp/arc-build-ubuntu1804
Maiken
committed
#############################################################
## MAIN REPO DEPLOY ##
#############################################################
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}')
- 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
only:
- branches@nordugrid/arc
- tags@nordugrid/arc
Maiken
committed
##################
Maiken
committed
##################
deploy_el7:
extends: .deploy
variables:
OS_V: el7
ARC_IMAGE: maikenp/arc-deploy-centos7
BUILD_VOL: /rpmbuild
- 158.39.201.67
- deploy
##################
# CENTOS 8
##################
deploy_el8:
extends: .deploy
variables:
OS_V: el8
ARC_IMAGE: maikenp/arc-deploy-centos8
BUILD_VOL: /rpmbuild
tags:
- 158.39.201.179
- deploy
Maiken
committed
##################
# DEBIAN 9
##################
deploy_deb9:
extends: .deploy
variables:
OS_V: deb9
ARC_IMAGE: maikenp/arc-deploy-debian9
BUILD_VOL: /build
tags:
Maiken
committed
- 158.37.63.83
- deploy
Maiken
committed
##################
# DEBIAN 10
##################
deploy_deb10:
extends: .deploy
variables:
OS_V: deb10
ARC_IMAGE: maikenp/arc-deploy-debian10
BUILD_VOL: /build
Maiken
committed
- deploy
Maiken
committed
##################
# UBUNTU 18.04
##################
deploy_ubuntu1804:
extends: .deploy
variables:
OS_V: ubuntu1804
ARC_IMAGE: maikenp/arc-deploy-ubuntu1804
BUILD_VOL: /build
Maiken
committed
tags:
Maiken
committed
- 158.39.74.3
Maiken
committed
- deploy
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
#############################################################
## CHECK DEPLOY ##
#############################################################
.job_template_assert:
image: python:3.7.6-alpine
variables:
TESTTYPE: ''
script:
- ls $CI_PROJECT_DIR/arc-testlogs/
- cp $CI_PROJECT_DIR/arc-testlogs/testresults.txt /
- cat /testresults.txt
- python3 asserttest.py $TESTTYPE
tags:
- generic
############################
##### EL7 DEPLOY CHECK
############################
gridftp_el7_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'gridftp'
stage: check_deploy_centos
needs: ["deploy_el7"]
emies_el7_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'emies'
stage: check_deploy_centos
needs: ["deploy_el7"]
arcrest_el7_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcrest'
stage: check_deploy_centos
needs: ["deploy_el7"]
arcconf_el7_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcconf'
stage: check_deploy_centos
needs: ["deploy_el7"]
############################
##### EL8 DEPLOY CHECK
############################
gridftp_el8_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'gridftp'
stage: check_deploy_centos
needs: ["deploy_el8"]
emies_el8_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'emies'
stage: check_deploy_centos
needs: ["deploy_el8"]
arcrest_el8_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcrest'
stage: check_deploy_centos
needs: ["deploy_el8"]
arcconf_el8_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcconf'
stage: check_deploy_centos
needs: ["deploy_el8"]
############################
##### DEB9 DEPLOY CHECK
############################
gridftp_deb9_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'gridftp'
stage: check_deploy_debian
needs: ["deploy_deb9"]
emies_deb9_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'emies'
stage: check_deploy_debian
needs: ["deploy_deb9"]
arcrest_deb9_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcrest'
stage: check_deploy_debian
needs: ["deploy_deb9"]
arcconf_deb9_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcconf'
stage: check_deploy_debian
needs: ["deploy_deb9"]
############################
##### DEB10 DEPLOY CHECK
############################
gridftp_deb10_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'gridftp'
stage: check_deploy_debian
needs: ["deploy_deb10"]
emies_deb10_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'emies'
stage: check_deploy_debian
needs: ["deploy_deb10"]
arcrest_deb10_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcrest'
stage: check_deploy_debian
needs: ["deploy_deb10"]
arcconf_deb10_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcconf'
stage: check_deploy_debian
needs: ["deploy_deb10"]
############################
##### UBUNTU DEPLOY CHECK
############################
gridftp_ubuntu1804_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'gridftp'
stage: check_deploy_ubuntu
needs: ["deploy_ubuntu1804"]
emies_ubuntu1804_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'emies'
stage: check_deploy_ubuntu
needs: ["deploy_ubuntu1804"]
arcrest_ubuntu1804_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcrest'
stage: check_deploy_ubuntu
needs: ["deploy_ubuntu1804"]
arcconf_ubuntu1804_deploytest:
extends: .job_template_assert
variables:
TESTTYPE: 'arcconf'
stage: check_deploy_ubuntu
needs: ["deploy_ubuntu1804"]
## note-to-self: can also download the rpms from latest job with (example for el7):
## wget 'https://source.coderefinery.org/nordugrid/arc/-/jobs/artifacts/master/download?job=packages_el7' -O artifacts.zip