Skip to content

Commit

Permalink
Merge pull request #75 from rstudio/update-jenkins-credential
Browse files Browse the repository at this point in the history
update jenkins credential
  • Loading branch information
bschwedler authored Oct 6, 2023
2 parents 19171e7 + 801b09d commit 6c676dd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
36 changes: 24 additions & 12 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


properties([
disableConcurrentBuilds(),
disableConcurrentBuilds(abortPrevious: true),
buildDiscarder(logRotator(artifactDaysToKeepStr: '',
artifactNumToKeepStr: '',
daysToKeepStr: '',
Expand Down Expand Up @@ -77,14 +77,14 @@ def s3_upload() {

// copy installer to s3
sh "aws s3 cp ${buildFolder}/${packageFile} s3://rstudio-launcher-plugin-sdk/"

// copy documentation to s3
sh "aws s3 sync docs/ApiRefHtml s3://docs.rstudio.com/rlps/apiref/${version}/"
sh "aws s3 sync docs/ApiRefHtml s3://docs.rstudio.com/rlps/apiref/latest/"

sh "aws s3 sync docs/QuickStartHtml s3://docs.rstudio.com/rlps/quickstart/${version}/"
sh "aws s3 sync docs/QuickStartHtml s3://docs.rstudio.com/rlps/quickstart/latest/"

sh "aws s3 sync docs/DevGuideHtml s3://docs.rstudio.com/rlps/devguide/${version}/"
sh "aws s3 sync docs/DevGuideHtml s3://docs.rstudio.com/rlps/devguide/latest/"
}
Expand Down Expand Up @@ -120,7 +120,9 @@ try {
node('docker') {
stage('Prepare Versioning Container') {
prepareWorkspace()
container = pullBuildPush(image_name: 'jenkins/rlp-sdk', dockerfile: "docker/jenkins/Dockerfile.versioning", image_tag: "rlp-sdk-versioning", build_args: jenkins_user_build_args())
retry(1) {
container = pullBuildPush(image_name: 'jenkins/rlp-sdk', dockerfile: "docker/jenkins/Dockerfile.versioning", image_tag: "rlp-sdk-versioning", build_args: jenkins_user_build_args())
}
container.inside() {
stage('Bump Version') {
def rlpSdkVersion = sh (
Expand Down Expand Up @@ -154,15 +156,19 @@ try {
stage('Prepare B&T Container') {
prepareWorkspace()
def image_tag = "${current_container.os}-${current_container.arch}-${params.RLP_SDK_VERSION_MAJOR}.${params.RLP_SDK_VERSION_MINOR}"
withCredentials([usernameColonPassword(credentialsId: 'github-rstudio-jenkins', variable: "github_login")]) {
def github_args = "--build-arg GITHUB_LOGIN=${github_login}"
container = pullBuildPush(image_name: 'jenkins/rlp-sdk', dockerfile: "docker/jenkins/Dockerfile.${current_container.os}-${current_container.arch}", image_tag: image_tag, build_args: github_args + " " + jenkins_user_build_args())
retry(1) {
withCredentials([usernameColonPassword(credentialsId: 'posit-jenkins', variable: "github_login")]) {
def github_args = '--build-arg GITHUB_LOGIN=${github_login}'
container = pullBuildPush(image_name: 'jenkins/rlp-sdk', dockerfile: "docker/jenkins/Dockerfile.${current_container.os}-${current_container.arch}", image_tag: image_tag, build_args: github_args + " " + jenkins_user_build_args())
}
}
}
stage('Build and Test') {
container.inside("--privileged") {
stage('Compile Source') {
build_source("${current_container.flavor}")
retry(1) {
build_source("${current_container.flavor}")
}
}
stage('Run Tests') {
run_tests("${current_container.flavor}")
Expand All @@ -179,13 +185,19 @@ try {
node ('docker') {
stage('Prepare Packaging Container') {
prepareWorkspace()
container = pullBuildPush(image_name: 'jenkins/rlp-sdk', dockerfile: "docker/jenkins/Dockerfile.packaging", image_tag: "rlp-sdk-packaging", build_args: jenkins_user_build_args())
retry(1) {
container = pullBuildPush(image_name: 'jenkins/rlp-sdk', dockerfile: "docker/jenkins/Dockerfile.packaging", image_tag: "rlp-sdk-packaging", build_args: jenkins_user_build_args())
}
container.inside() {
stage('Generate Documentation') {
generate_documentation()
retry(1) {
generate_documentation()
}
}
stage('Create Package') {
create_package()
retry(1) {
create_package()
}
}
}
if (params.get('UPLOAD_PACKAGE') == true) {
Expand Down
2 changes: 1 addition & 1 deletion dependencies/install-bookdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if [[ $INSTALL_R -eq 1 ]]; then
sudo yum install -y R
else
sudo apt-get -y install apt-transport-https software-properties-common
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository -y 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
sudo apt update
sudo apt-get -y install r-base wget
Expand Down

0 comments on commit 6c676dd

Please sign in to comment.