From 19f7d0249ff7aac122f05413606d0e43abc9f8fd Mon Sep 17 00:00:00 2001 From: Taylor Steinberg Date: Thu, 2 Mar 2023 10:28:32 -0500 Subject: [PATCH] Delete Jenkinsfile --- Jenkinsfile | 198 ---------------------------------------------------- 1 file changed, 198 deletions(-) delete mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 7cafd894..00000000 --- a/Jenkinsfile +++ /dev/null @@ -1,198 +0,0 @@ -#!groovy - -def gitClean() { - // inspired by: https://issues.jenkins-ci.org/browse/JENKINS-31924 - // https://issues.jenkins-ci.org/browse/JENKINS-32540 - // The sequence of reset --hard and clean -fdx first - // in the root and then using submodule foreach - // is based on how the Jenkins Git SCM clean before checkout - // feature works. - sh 'git reset --hard' - sh 'git clean -ffdx' -} - -// Build the name:tag for a docker image where the tag is the checksum -// computed from a specified file. -def imageName(name, filenames) { - // If this is extended to support multiple files, be wary of: - // https://issues.jenkins-ci.org/browse/JENKINS-26481 - // closures don't really work. - - // Suck in the contents of the file and then hash the result. - def contents = ""; - for (int i=0; i" - - // Looking up the author also demands being in a `node`. - gitAuthor = sh(returnStdout: true, script: 'git --no-pager show -s --format="%aN" HEAD').trim() - - stage('Docker build and test') { - parallel( - 'python3.5': { - img = buildAndTest("3.5") - }, - 'python3.6': { - img = buildAndTest("3.6") - - img.inside("-v ${env.WORKSPACE}:/rsconnect_jupyter") { - sh "pip install --user --upgrade twine setuptools wheel" - print "building python wheel package" - sh 'make dist' - archiveArtifacts artifacts: 'dist/*.whl,dist/*.tar.gz' - stash includes: 'dist/*.whl,dist/*.tar.gz', name: 'wheel' - } - }, - 'python3.7': { - img = buildAndTest("3.7") - }, - 'code-quality': { - def uid = sh (script: 'id -u jenkins', returnStdout: true).trim() - def gid = sh (script: 'id -g jenkins', returnStdout: true).trim() - img = pullBuildPush( - image_name: 'jenkins/rsconnect-jupyter-yarn', - image_tag: 'latest', - docker_context: './tools/yarn', - build_arg_nb_uid: 'JENKINS_UID', - build_arg_nb_gid: 'JENKINS_GID', - build_args: "--build-arg NB_UID=${uid} --build-arg NB_GID=${gid}", - push: !isUserBranch - ) - img.inside("-v ${env.WORKSPACE}:/rsconnect_jupyter") { - sh 'make yarn' - sh 'make lint' - } - } - ) - } - stage('Docs build') { - docs_image = pullBuildPush( - image_name: 'jenkins/rsconnect-jupyter', - image_tag: 'docs', - docker_context: './docs', - push: !isUserBranch - ) - docs_image.inside("-v ${env.WORKSPACE}:/rsconnect_jupyter") { - sh 'make docs-build' - archiveArtifacts artifacts: 'dist/*.pdf,dist/*.html' - stash includes: 'dist/*.pdf,dist/*.html', name: 'docs' - } - } - stage('S3 upload') { - unstash 'wheel' - unstash 'docs' - publishArtifacts() - } - } - } - - // Slack message includes username information. - message = "${messagePrefix} by ${gitAuthor} passed" - slackSend channel: slackChannelPass, color: 'good', message: message -} catch(err) { - // Slack message includes username information. When master/release fails, - // CC the whole connect team. - slackNameFail = "unknown" - if (!isUserBranch) { - slackNameFail = "${gitAuthor} (cc @rsconnect_jupyter)" - } - - message = "${messagePrefix} by ${slackNameFail} failed: ${err}" - slackSend channel: slackChannelFail, color: 'bad', message: message - throw err -}