-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
111 lines (107 loc) · 2.99 KB
/
Jenkinsfile
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
pipeline {
agent none
environment {
SVNCREDS = credentials('83601f39-7c4c-4a13-a0d3-59fcda340753')
}
stages {
stage('Parallel build') {
parallel {
stage('Build on Mac Intel') {
agent {
label 'mac && x86 && build && 20.0'
}
steps {
sh '''#!/bin/bash
set -e
echo "====== macOS: starting build"
export BITS=64
PLATFORM=mac ./mk_kafka.sh $BITS
echo "====== macOS: finished build"
'''
stash name: 'dist-mac', includes: 'distribution/mac/x64/'
}
}
stage('Build on Mac Arm') {
agent {
label 'mac && arm && build && 20.0'
}
steps {
sh '''#!/bin/bash
set -e
echo "====== macOS: starting build"
export BITS=64
PLATFORM=mac ./mk_kafka.sh $BITS
echo "====== macOS: finished build"
'''
stash name: 'dist-mac_arm', includes: 'distribution/mac/arm64/'
}
}
stage('Build on AIX') {
agent {
label 'p9-7217'
}
steps {
sh '''#!/bin/bash
set -e
echo "====== AIX: starting build"
export BITS=64
export PATH=/opt/freeware/bin:$PATH
PLATFORM=aix ./mk_kafka.sh $BITS
echo "====== AIX: finished build"
'''
stash name: 'dist-aix', includes: 'distribution/aix/'
}
}
stage('Build on Linux') {
agent {
docker {
image 'dyalogci/ubuntu:20.04-build'
registryCredentialsId '0435817a-5f0f-47e1-9dcc-800d85e5c335'
args '-v /devt:/devt'
}
}
steps {
sh '''#!/bin/bash
set -e
echo "====== Linux: starting build"
export BITS=64
PLATFORM=linux ./mk_kafka.sh $BITS
echo "====== Linux: finished build"
'''
stash name: 'dist-linux', includes: 'distribution/linux/x64/'
}
}
stage('Build on Windows') {
agent {
label 'win && build && 20.0'
}
steps {
bat 'kafkaBuild.bat'
stash name: 'dist-win', includes: 'distribution/win/'
}
}
}
}
stage('Publish') {
agent {
docker {
image 'dyalogci/node:lts'
registryCredentialsId '0435817a-5f0f-47e1-9dcc-800d85e5c335'
args '-v /devt:/devt'
}
}
environment {
GHTOKEN = credentials('250bdc45-ee69-451a-8783-30701df16935')
}
steps {
unstash 'dist-win'
unstash 'dist-mac'
unstash 'dist-mac_arm'
unstash 'dist-linux'
unstash 'dist-aix'
sh './CI/publish.sh'
sh './CI/gh-release.sh'
}
}
}
}