-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
60 lines (56 loc) · 1.26 KB
/
.gitlab-ci.yml
File metadata and controls
60 lines (56 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
variables:
WORK: "/tmp"
LMOD_REDIRECT: "yes"
MODULES_DIR: "/util/opt/hcc-modules"
LMOD_HOME: "/util/opt/lmod/lmod"
stages:
- test
- deploy
test-modules:
stage: test
image: unlhcc/crane-build-el8
except:
- master
tags:
- docker
before_script:
- source $LMOD_HOME/init/profile
script:
- module use $CI_PROJECT_DIR/Common
- module av > /dev/null
- module spider > /dev/null
test-swan-paths:
stage: test
image: unlhcc/swan-build
except:
- master
tags:
- swan
script:
- scripts/test_changed_modules.sh
deploy-swan:
stage: deploy
environment:
name: swan_production
url: https://swan.unl.edu
resource_group: production-swan
image: unlhcc/swan-build
only:
- master
tags:
- swan
before_script:
- eval $(ssh-agent -s) > /dev/null
- mkdir -p ~/.ssh
- chown 700 ~/.ssh
- echo $SSH_KNOWN_HOSTS > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- ssh-add <(echo "$SSH_PRIVATE_KEY" | base64 --decode)
- source $LMOD_HOME/init/profile
- module load lmod
script:
- cd $MODULES_DIR
- git checkout master
- git fetch
- git checkout $CI_COMMIT_SHA
- update_lmod_system_cache_files -d $MODULES_DIR/cacheDir -t $MODULES_DIR/cacheTS.txt $MODULES_DIR