File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ workflow:
55 - if : $CI_PIPELINE_SOURCE == "merge_request_event"
66 auto_cancel :
77 on_new_commit : interruptible
8+ - if : $CI_PIPELINE_SOURCE == "schedule"
89 - if : $CI_COMMIT_BRANCH == "main"
910 auto_cancel :
1011 on_new_commit : conservative
@@ -20,15 +21,35 @@ default:
2021 - export PATH=$CLARA_HOME/plugins/clas12/bin:$PATH
2122 - export PATH=$CLARA_HOME/bin:$PATH
2223 - export PATH=$COATJAVA/bin:$PATH
23- - echo $PATH
2424
2525stages :
26+ - mirror
2627 - build
2728 - test
2829 - deploy
2930
31+ mirror :
32+ stage : mirror
33+ rules :
34+ - if : $CI_PIPELINE_SOURCE == "schedule"
35+ script :
36+ - git config --global --add safe.directory $CI_PROJECT_DIR
37+ - git config --global user.email "ci-bot@code.jlab.org"
38+ - git config --global user.name "GitLab CI"
39+ - git checkout development
40+ - git config pull.rebase true
41+ - git remote get-url origin
42+ - git remote set-url origin https://github.com/jeffersonlab/coatjava
43+ - git pull
44+ - git remote set-url origin https://gitlab-ci-token:${CI_JOB_TOKEN}@code.jlab.org/hallb/clas12/coatjava/coatjava.git
45+ # - git remote set-url origin git@code.jlab.org:hallb/clas12/coatjava/coatjava
46+ - git push
47+
3048build :
3149 stage : build
50+ needs :
51+ - job : mirror
52+ optional : true
3253 script :
3354 - ./build-coatjava.sh --clara -T$JL_RUNNER_AVAIL_CPU --quiet --no-progress
3455 - tar -czf coatjava.tar.gz coatjava
You can’t perform that action at this time.
0 commit comments