@@ -4,10 +4,12 @@ def CUSTOM_WORKSPACE = 'none'
4
4
def HOMEgfs = 'none'
5
5
def CI_CASES = ''
6
6
def GH = 'none'
7
+ //Trivial change
7
8
// Location of the custom workspaces for each machine in the CI system. They are persistent for each iteration of the PR.
8
- def NodeName = [hera: 'Hera-EMC', orion: 'Orion-EMC', hercules: 'Hercules-EMC', gaea: 'Gaea', noaacloud: 'awsepicglobalworkflow']
9
- def custom_workspace = [hera: '/scratch1/NCEPDEV/global/CI', orion: '/work2/noaa/stmp/CI/ORION', hercules: '/work2/noaa/global/CI/HERCULES', gaea: '/gpfs/f5/epic/proj-shared/global/CI', noaacloud: '/lustre/jenkins']
10
- def repo_url = '
[email protected] :NOAA-EMC/global-workflow.git'
9
+ def NodeName = [hera: 'Hera-EMC', orion: 'Orion-EMC', hercules: 'Hercules-EMC', gaea: 'Gaea', awsepicglobalworkflow: 'Awsepicglobalworkflow']
10
+ def custom_workspace = [hera: '/scratch1/NCEPDEV/global/CI', orion: '/work2/noaa/stmp/CI/ORION', hercules: '/work2/noaa/global/CI/HERCULES', gaea: '/gpfs/f5/epic/proj-shared/global/CI', awsepicglobalworkflow: '/lustre/jenkins']
11
+ def repo_url = 'https://github.com/NOAA-EMC/global-workflow.git'
12
+ def aws_gw_name = 'global-workflow'
11
13
def STATUS = 'Passed'
12
14
13
15
pipeline {
@@ -42,9 +44,12 @@ pipeline {
42
44
} else {
43
45
echo "This is parent job so getting list of nodes matching labels:"
44
46
for (label in pullRequest.labels) {
47
+ echo "Checking label: ${label}"
45
48
if (label.matches("CI-(.*?)-Ready")) {
46
49
def machine_name = label.split('-')[1].toString().toLowerCase()
50
+ print machine_name
47
51
jenkins.model.Jenkins.get().computers.each { c ->
52
+ print c.node.selfLabel.name
48
53
if (c.node.selfLabel.name == NodeName[machine_name]) {
49
54
run_nodes.add(c.node.selfLabel.name)
50
55
}
@@ -56,7 +61,7 @@ pipeline {
56
61
run_nodes.init().each { node ->
57
62
def machine_name = node.split('-')[0].toLowerCase()
58
63
echo "Spawning job on node: ${node} with machine name: ${machine_name}"
59
- build job: "/global-workflow/EMC- Global-Pipeline/PR-${env.CHANGE_ID}", parameters: [
64
+ build job: "/${aws_gw_name}/AWS-EPIC- Global-Workflow -Pipeline/PR-${env.CHANGE_ID}", parameters: [
60
65
string(name: 'machine', value: machine_name),
61
66
string(name: 'Node', value: node) ],
62
67
wait: false
@@ -79,11 +84,11 @@ pipeline {
79
84
Machine = machine[0].toUpperCase() + machine.substring(1)
80
85
echo "Getting Common Workspace for ${Machine}"
81
86
ws("${custom_workspace[machine]}/${env.CHANGE_ID}") {
82
- properties([parameters([[$class: 'NodeParameterDefinition', allowedSlaves: ['built-in', 'Hercules-EMC', 'Hera-EMC', 'Orion-EMC', 'Gaea', 'awsepicglobalworkflow '], defaultSlaves: ['built-in'], name: '', nodeEligibility: [$class: 'AllNodeEligibility'], triggerIfResult: 'allCases']])])
87
+ properties([parameters([[$class: 'NodeParameterDefinition', allowedSlaves: ['built-in', 'Hercules-EMC', 'Hera-EMC', 'Orion-EMC', 'Gaea', 'Awsepicglobalworkflow '], defaultSlaves: ['built-in'], name: '', nodeEligibility: [$class: 'AllNodeEligibility'], triggerIfResult: 'allCases']])])
83
88
GH = sh(script: "which gh || echo '~/bin/gh'", returnStdout: true).trim()
84
- CUSTOM_WORKSPACE = "${WORKSPACE }"
85
- HOMEgfs = "${CUSTOM_WORKSPACE}/global-workflow "
86
- sh(script: "rm -Rf ${CUSTOM_WORKSPACE}/global-workflow ; mkdir -p ${CUSTOM_WORKSPACE}/global-workflow ")
89
+ CUSTOM_WORKSPACE = "${custom_workspace[machine]}/${env.CHANGE_ID}/${aws_gw_name }"
90
+ HOMEgfs = "${CUSTOM_WORKSPACE}/${aws_gw_name} "
91
+ sh(script: "rm -Rf ${CUSTOM_WORKSPACE}; mkdir -p ${CUSTOM_WORKSPACE}/${aws_gw_name} ")
87
92
sh(script: "rm -Rf ${CUSTOM_WORKSPACE}/RUNTESTS; mkdir -p ${CUSTOM_WORKSPACE}/RUNTESTS")
88
93
sh(script: """${GH} pr edit ${env.CHANGE_ID} --repo ${repo_url} --add-label "CI-${Machine}-Building" --remove-label "CI-${Machine}-Ready" """)
89
94
}
@@ -95,17 +100,24 @@ pipeline {
95
100
stage('3. Build System') {
96
101
agent { label NodeName[machine].toLowerCase() }
97
102
steps {
103
+ dir("${HOMEgfs}") {
104
+ checkout scm
105
+ }
98
106
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
99
107
script {
100
108
ws(HOMEgfs) {
101
109
echo "Checking out the code on ${Machine} using scm in ${HOMEgfs}"
102
110
try {
103
- checkout scm
111
+ // checkout scm
112
+ // sh(script: "git clone --recursive ${repo_url}")
113
+ sh(script: "ls ${HOMEgfs}")
104
114
} catch (Exception e) {
105
115
echo "Failed to checkout the code on ${Machine} using scm in ${HOMEgfs}, try again ..."
106
116
sleep time: 45, unit: 'SECONDS'
107
117
try {
108
- checkout scm
118
+ // checkout scm
119
+ // sh(script: "git clone --recursive ${repo_url}")
120
+ sh(script: "ls ${HOMEgfs}/sorc")
109
121
} catch (Exception ee) {
110
122
echo "Failed to checkout the code on ${Machine} using scm in ${HOMEgfs}: ${ee.getMessage()}"
111
123
if (env.CHANGE_ID) {
@@ -120,7 +132,9 @@ pipeline {
120
132
def error_logs_message = ""
121
133
dir("${HOMEgfs}/sorc") {
122
134
try {
123
- sh(script: './build_compute.sh all') // build the global-workflow executables
135
+ sh(script: 'ls ./build_compute.sh') // list files here to make sure all files exist.
136
+ sh(script: './build_compute.sh gfs') // build the global-workflow executables
137
+ sh(script: './build_compute.sh gefs') // build the global-workflow executables
124
138
} catch (Exception error_build) {
125
139
echo "Failed to build global-workflow: ${error_build.getMessage()}"
126
140
if ( fileExists("logs/error.logs") ) {
0 commit comments