Skip to content

Commit

Permalink
Add Jenkinsfile to notarize MacOS dmgs separately
Browse files Browse the repository at this point in the history
Use tracecompass-test.Jenkinsfile for testing purposes for now. If
successful, then tracecompass-jdk17.Jenkinsfile and others will be
updated.

Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
bhufmann committed Mar 19, 2024
1 parent 498885f commit 1dbf60b
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 12 deletions.
40 changes: 40 additions & 0 deletions jenkins/pipelines/tracecompass-notarize.Jenkinsfile
@@ -0,0 +1,40 @@
/*******************************************************************************
* Copyright (c) 2024 Ericsson.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
pipeline {
agent {
kubernetes {
label 'tracecompass-notarize-build'
yamlFile 'jenkins/pod-templates/tracecompass-sonar-pod.yaml'
}
}
options {
timestamps()
timeout(time: 4, unit: 'HOURS')
disableConcurrentBuilds()
}
stages {
stage('Notarize macos RCP packages') {
when {
not { expression { return params.RCP_DESTINATION == null || params.RCP_DESTINATION.isEmpty() } }
}
steps {
sshagent (['projects-storage.eclipse.org-bot-ssh']) {
sh 'scripts/macosx-notarize.sh ${RCP_DESTINATION}'
}
}
post {
always {
archiveArtifacts artifacts: '*.log', allowEmptyArchive: true
}
}
}
}
}
35 changes: 23 additions & 12 deletions jenkins/pipelines/tracecompass-test.Jenkinsfile
Expand Up @@ -12,7 +12,7 @@ pipeline {
agent {
kubernetes {
label 'tracecompass-build'
yamlFile 'jenkins/pod-templates/tracecompass-test-pod.yaml'
yamlFile 'jenkins/pod-templates/tracecompass-sonar-pod.yaml'
}
}
options {
Expand Down Expand Up @@ -44,14 +44,12 @@ pipeline {
sh 'cp scripts/deploy-update-site.sh ${MAVEN_WORKSPACE_SCRIPTS}'
sh 'cp scripts/deploy-doc.sh ${MAVEN_WORKSPACE_SCRIPTS}'
sh 'cp scripts/deploy-javadoc.sh ${MAVEN_WORKSPACE_SCRIPTS}'
sh 'cp scripts/macosx-notarize.sh ${MAVEN_WORKSPACE_SCRIPTS}'
checkout([$class: 'GitSCM', branches: [[name: '$GERRIT_BRANCH_NAME']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'BuildChooserSetting', buildChooser: [$class: 'GerritTriggerBuildChooser']]], submoduleCfg: [], userRemoteConfigs: [[refspec: '$GERRIT_REFSPEC', url: '$GERRIT_REPOSITORY_URL']]])
sh 'mkdir -p ${WORKSPACE_SCRIPTS}'
sh 'cp ${MAVEN_WORKSPACE_SCRIPTS}/deploy-rcp.sh ${WORKSPACE_SCRIPTS}'
sh 'cp ${MAVEN_WORKSPACE_SCRIPTS}/deploy-update-site.sh ${WORKSPACE_SCRIPTS}'
sh 'cp ${MAVEN_WORKSPACE_SCRIPTS}/deploy-doc.sh ${WORKSPACE_SCRIPTS}'
sh 'cp ${MAVEN_WORKSPACE_SCRIPTS}/deploy-javadoc.sh ${WORKSPACE_SCRIPTS}'
sh 'cp ${MAVEN_WORKSPACE_SCRIPTS}/macosx-notarize.sh ${WORKSPACE_SCRIPTS}'
}
}
}
Expand All @@ -65,6 +63,26 @@ pipeline {
}
}
}
stage('RCP Feature File') {
when {
not { expression { return params.RCP_FEATURE_FILE == null || params.RCP_FEATURE_FILE.isEmpty() } }
}
steps {
container('tracecompass') {
sh "cp -f ${WORKSPACE}/rcp/org.eclipse.tracecompass.rcp/${params.RCP_FEATURE_FILE} ${WORKSPACE}/rcp/org.eclipse.tracecompass.rcp/feature.xml"
}
}
}
stage('SLF4J Properties Manifest') {
when {
not { expression { return params.SLF4J_PROPERTIES_MANIFEST == null || params.SLF4J_PROPERTIES_MANIFEST.isEmpty() } }
}
steps {
container('tracecompass') {
sh "cp -f ${WORKSPACE}/releng/org.eclipse.tracecompass.slf4j.binding.simple.properties/${params.SLF4J_PROPERTIES_MANIFEST} ${WORKSPACE}/releng/org.eclipse.tracecompass.slf4j.binding.simple.properties/META-INF/MANIFEST.MF"
}
}
}
stage('Build') {
steps {
container('tracecompass') {
Expand Down Expand Up @@ -126,7 +144,7 @@ pipeline {
}
steps {
container('tracecompass') {
sh 'mvn clean javadoc:aggregate -Pbuild-api-docs -Dmaven.repo.local=/home/jenkins/.m2/repository --settings /home/jenkins/.m2/settings.xml ${MAVEN_ARGS}'
sh 'mvn compile javadoc:aggregate -Pbuild-api-docs -Dmaven.repo.local=/home/jenkins/.m2/repository --settings /home/jenkins/.m2/settings.xml ${MAVEN_ARGS}'
}
}
}
Expand All @@ -145,14 +163,7 @@ pipeline {
expression { return params.NOTARIZE_MAC_RCP }
}
steps {
sshagent (['projects-storage.eclipse.org-bot-ssh']) {
sh '${WORKSPACE_SCRIPTS}/macosx-notarize.sh ${RCP_DESTINATION}'
}
}
post {
always {
archiveArtifacts artifacts: '*.log', allowEmptyArchive: true
}
build job:'notarize-tracecompass-dmgs' , parameters:[string(name: 'RCP_DESTINATION',value: ${RCP_DESTINATION})]
}
}
}
Expand Down

0 comments on commit 1dbf60b

Please sign in to comment.