Skip to content

Commit baaeac0

Browse files
post test updates, conventions
1 parent 95fe2bc commit baaeac0

File tree

1 file changed

+17
-33
lines changed

1 file changed

+17
-33
lines changed

docker/.cico.pipeline

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
def c7arches = ["ppc64le", "x86_64", "aarch64"]
22

3-
def onmyduffynode(script)
4-
{
5-
ansiColor('xterm')
6-
{
7-
timestamps
8-
{
3+
4+
def onmyduffynode(script){
5+
ansiColor('xterm'){
6+
timestamps{
97
sh 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root ${DUFFY_NODE}.ci.centos.org -t \"export REPO=${REPO}; export BRANCH=${BRANCH};\" "' + script + '"'
108
}
119
}
1210
}
1311

14-
def syncfromduffynode(rsyncpath)
15-
{
12+
13+
def syncfromduffynode(rsyncpath){
1614
sh 'rsync -e "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root " -Ha --include=' + rsyncpath + " ${DUFFY_NODE}.ci.centos.org:~/ ./"
1715
}
1816

1917

20-
21-
def synctoduffynode(source)
22-
{
18+
def synctoduffynode(source){
2319
sh 'scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -r ' + source + " " + "root@" + "${DUFFY_NODE}.ci.centos.org:~/"
2420
}
2521

@@ -46,12 +42,9 @@ node('sig-cloudinstance'){
4642
}
4743

4844
c7arches.each { arch ->
49-
stage("c7-$arch")
50-
{
51-
try
52-
{
53-
stage ("Allocate node")
54-
{
45+
stage("c7-$arch") {
46+
try{
47+
stage ("Allocate node"){
5548
env.CICO_API_KEY = readFile("${env.HOME}/duffy.key").trim()
5649
duffy_rtn=sh(
5750
script: "cico --debug node get --arch ${arch} -f value -c hostname -c comment",
@@ -60,21 +53,17 @@ node('sig-cloudinstance'){
6053
env.DUFFY_NODE = duffy_rtn[0]
6154
env.DUFFY_SSID = duffy_rtn[1]
6255
}
63-
stage ("setup")
64-
{
56+
stage ("setup"){
6557
onmyduffynode "yum -y install rsync docker lorax anaconda-tui yum-langpacks virt-install libvirt-python"
6658
synctoduffynode "docker/centos-7-${arch}.ks"
6759
synctoduffynode "docker/containerbuild.sh"
68-
6960
}
7061

71-
stage("build boot.iso")
72-
{
62+
stage("build boot.iso"){
7363
onmyduffynode "./containerbuild.sh centos-7-${arch}.ks"
7464
}
7565

76-
stage("tag the container")
77-
{
66+
stage("tag the container"){
7867
env.time_stamp = sh(
7968
script: "date +%Y%m%d",
8069
returnStdout: true
@@ -87,8 +76,7 @@ node('sig-cloudinstance'){
8776
onmyduffynode "docker tag centos:7 centos:latest"
8877
}
8978

90-
stage("push to artifacts")
91-
{
79+
stage("push to artifacts"){
9280

9381
env.time_stamp = sh(
9482
script: "date +%y%m%d",
@@ -109,20 +97,16 @@ node('sig-cloudinstance'){
10997
}
11098
}
11199

112-
catch (e)
113-
{
100+
catch (e){
114101
currentBuild.result = "FAILURE"
115102
throw e
116103
}
117-
finally
118-
{
119-
stage("Cleanup")
120-
{
104+
finally{
105+
stage("Cleanup") {
121106
/*sh 'cico node done ${DUFFY_SSID}'*/
122107
}
123108
}
124109
}
125-
126110
}
127111
}
128112

0 commit comments

Comments
 (0)