From cd25cd1c4d807d2849461465d01cf77a92ec3ad7 Mon Sep 17 00:00:00 2001 From: Jie Lin Date: Sat, 29 Jun 2024 09:26:51 -0700 Subject: [PATCH] Remove Jenkins config (#109) --- .jenkins/Jenkinsfile | 105 ------------------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 .jenkins/Jenkinsfile diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile deleted file mode 100644 index d2ee0cc..0000000 --- a/.jenkins/Jenkinsfile +++ /dev/null @@ -1,105 +0,0 @@ -// Load Jenkins shared library -jenkinsBranch = 'v0.1.0' -sharedLib = library("shared-lib@${jenkinsBranch}") - -def siftJavaWorkflow = sharedLib.com.sift.ci.SiftJavaWorkflow.new() -def ciUtil = sharedLib.com.sift.ci.CIUtil.new() -def stackdriver = sharedLib.com.sift.ci.StackDriverMetrics.new() - -// Default GitHub status context for automatically triggered builds -def defaultStatusContext = 'Jenkins:auto' - -// Pod template file for Jenkins agent pod -// Pod template yaml file is defined in https://github.com/SiftScience/jenkins/tree/master/resources/jenkins-k8s-pod-templates -def podTemplateFile = 'jdk8-pod-template.yaml' -def podLabel = "jdk8-${BUILD_TAG}" - -// GitHub repo name -def repoName = 'sift-java' - -pipeline { - agent none - options { - timestamps() - skipDefaultCheckout() - disableConcurrentBuilds() - disableRestartFromStage() - parallelsAlwaysFailFast() - buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '30', numToKeepStr: '') - timeout(time: 1, unit: 'HOURS') - } - environment { - GIT_BRANCH = "${env.CHANGE_BRANCH != null? env.CHANGE_BRANCH : env.BRANCH_NAME}" - CACHE_VERSION = 'v1' - TERM = 'dumb' - GRADLE_OPTS = '-Dorg.gradle.project.sonatypeUsername=username -Dorg.gradle.project.sonatypePassword=password' - } - stages { - stage('Initialize') { - steps { - script { - statusContext = defaultStatusContext - // Get the commit sha for the build - commitSha = ciUtil.commitHashForBuild() - ciUtil.updateGithubCommitStatus(repoName, statusContext, 'Started', 'pending', commitSha) - } - } - } - stage ('Parallel workflows') { - steps { - script { - def workflows = [:] - def stage1 = 'Java Integration' - workflows[stage1] = { - stage(stage1) { - if (env.GIT_BRANCH.equals('master')) { - ciUtil.updateGithubCommitStatus(repoName, stage1, 'Started', 'pending', commitSha) - try { - siftJavaWorkflow.runSiftJavaIntegration(podTemplateFile, podLabel) - ciUtil.updateGithubCommitStatus(repoName, stage1, 'SUCCESS', 'success', commitSha) - } catch (Exception e) { - ciUtil.updateGithubCommitStatus(repoName, stage1, 'FAILURE', 'failure', commitSha) - print("${stage1} failed") - throw e - } - } - } - } - def stage2 = 'Build' - workflows[stage2] = { - stage(stage2) { - ciUtil.updateGithubCommitStatus(repoName, stage2, 'Started', 'pending', commitSha) - try { - siftJavaWorkflow.runSiftJavaBuild(podTemplateFile, podLabel) - ciUtil.updateGithubCommitStatus(repoName, stage2, 'SUCCESS', 'success', commitSha) - } catch (Exception e) { - ciUtil.updateGithubCommitStatus(repoName, stage2, 'FAILURE', 'failure', commitSha) - print("${stage2} failed") - throw e - } - } - } - parallel workflows - } - } - } - } - post { - success { - script { - ciUtil.updateGithubCommitStatus(repoName, statusContext, currentBuild.currentResult, 'success', commitSha) - } - } - unsuccessful { - script { - ciUtil.updateGithubCommitStatus(repoName, statusContext, currentBuild.currentResult, 'failure', commitSha) - ciUtil.notifySlack(repoName, commitSha) - } - } - always { - script { - stackdriver.updatePipelineStatistics(this) - } - } - } -}