Skip to content

Commit

Permalink
add macOS Jenkinsfile (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdams authored May 7, 2024
1 parent fe6383f commit 7401160
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions pkgbuild/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
pipeline {
agent {
label 'mac&&xcode11.7'
}
options {
timeout(time: 1, unit: 'HOURS')
buildDiscarder(logRotator(numToKeepStr: '50', artifactNumToKeepStr: '20'))
copyArtifactPermission('*');
}
parameters {
string(name: 'UPSTREAM_JOB_NAME', description: 'e.g. build-scripts/openjdk11-pipeline')
string(name: 'UPSTREAM_JOB_NUMBER', description: 'e.g. 123')
string(name: 'CERTIFICATE', description: 'Certificate name to sign the installer')
string(name: 'FILTER', defaultValue: '**/OpenJDK*_mac_*.tar.gz', description: 'e.g. **/OpenJDK*_mac_*.tar.gz')
string(name: 'MAJOR_VERSION', description: 'e.g. 8')
string(name: 'FULL_VERSION', description: 'e.g 1.8.0_192 or 11+28')
}
// checkout git repo
stages {
stage('Checkout') {
steps {
step([$class: 'WsCleanup'])
checkout scm
}
}
stage('Copy Artifacts') {
steps {
copyArtifacts filter: '${FILTER}', fingerprintArtifacts: true, projectName: '${UPSTREAM_JOB_NAME}', selector: specific('${UPSTREAM_JOB_NUMBER}')
}
}
stage('Build Installer') {
steps {
sh '''
bash pkgbuild/create-installer-mac.sh
'''
}
}
stage('Archive Installer') {
steps {
archiveArtifacts artifacts: 'workspace/target/OpenJDK*.pkg', followSymlinks: true
}
}
}
}

0 comments on commit 7401160

Please sign in to comment.