Skip to content

Commit

Permalink
Merge pull request rstudio#12551 from rstudio/feature/jenkins-pr-use-…
Browse files Browse the repository at this point in the history
…flower-image

Update PR Jenkinsfile to use flower image
  • Loading branch information
zachhannum authored Jan 11, 2023
2 parents c4f3450 + e641a1d commit 271d8a7
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Jenkinsfile.pull-request
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
os = 'jammy'
arch = 'amd64'
flavor = 'server'
type = 'DEB'
AWS_ACCOUNT_ID = '749683154838'
def utils

pipeline {
Expand All @@ -18,6 +13,12 @@ pipeline {

environment {
GITHUB_LOGIN = credentials('github-rstudio-jenkins')
OS = 'jammy'
ARCH = 'amd64'
FLAVOR = 'server'
TYPE = 'DEB'
AWS_ACCOUNT_ID = '749683154838'
RSTUDIO_VERSION_FLOWER = ''
}

stages {
Expand All @@ -28,6 +29,7 @@ pipeline {
sh "echo 'Loading utils from ${env.WORKSPACE}/utils.groovy'"
utils = load "${env.WORKSPACE}/utils.groovy"
utils.addRemoteRef("${env.CHANGE_TARGET}")
RSTUDIO_VERSION_FLOWER = readFile(file: 'version/RELEASE').replaceAll(" ", "-").toLowerCase().trim()
}
}
}
Expand All @@ -47,8 +49,8 @@ pipeline {
withAWS(role: 'build', roleAccount: AWS_ACCOUNT_ID) {
pullBuildPush(
image_name: 'jenkins/ide',
image_tag: "${os}-${arch}-${env.CHANGE_TARGET.replaceAll('/', '-')}",
dockerfile: "docker/jenkins/Dockerfile.${os}",
image_tag: "${OS}-${ARCH}-${RSTUDIO_VERSION_FLOWER}",
dockerfile: "docker/jenkins/Dockerfile.${OS}",
build_arg_jenkins_uid: 'JENKINS_UID',
build_arg_jenkins_gid: 'JENKINS_GID',
builds_args: "--build-arg GITHUB_LOGIN=${GITHUB_LOGIN}",
Expand All @@ -60,7 +62,7 @@ pipeline {
stage('Build Package and Test') {
agent {
docker {
image "jenkins/ide:${os}-${arch}-${env.CHANGE_TARGET.replaceAll('/', '-')}"
image "jenkins/ide:${OS}-${ARCH}-${RSTUDIO_VERSION_FLOWER}"
reuseNode true
}
}
Expand All @@ -72,15 +74,15 @@ pipeline {
// AWS is here for the S3 bucket that we use for sccache
withAWS(role: 'build', roleAccount: AWS_ACCOUNT_ID) {
// perform the compilation
sh "SCCACHE_ENABLED=1 PACKAGE_OS=${os} ./make-${flavor}-package ${type} clean"
sh "SCCACHE_ENABLED=1 PACKAGE_OS=${OS} ./make-${FLAVOR}-package ${type} clean"
}
}
}
}

stage('Run GWT Unit Tests') {
steps {
dir ("package/linux/build-${flavor.capitalize()}-${type}/src/gwt") {
dir ("package/linux/build-${FLAVOR.capitalize()}-${TYPE}/src/gwt") {
// attempt to run ant (gwt) unit tests
sh "./gwt-unit-tests.sh"
}
Expand All @@ -89,7 +91,7 @@ pipeline {

stage('Run C++ Unit Tests') {
steps {
dir ("package/linux/build-${flavor.capitalize()}-${type}/src/cpp") {
dir ("package/linux/build-${FLAVOR.capitalize()}-${type}/src/cpp") {
// attempt to run cpp unit tests
sh "./rstudio-tests"
}
Expand Down

0 comments on commit 271d8a7

Please sign in to comment.