diff --git a/Jenkinsfile b/Jenkinsfile index 1062634..e707dda 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,7 +25,7 @@ pipeline { steps { script { if (env.CHANGE_ID != null) { - def json = sh (script: "curl -s https://api.github.com/repos/crossplaneio/crossplane/pulls/${env.CHANGE_ID}", returnStdout: true).trim() + def json = sh (script: "curl -s https://api.github.com/repos/crossplaneio/crossplane-runtime/pulls/${env.CHANGE_ID}", returnStdout: true).trim() def body = evaluateJson(json,'${json.body}') if (body.contains("[skip ci]")) { echo ("'[skip ci]' spotted in PR body text.") @@ -119,40 +119,6 @@ pipeline { } } - stage('SonarQube Analysis') { - when { - expression { - return env.shouldBuild != "false" - } - } - steps { - script { - scannerHome = tool 'SonarQubeScanner' - scannerParams = '' - if (env.CHANGE_ID == null) { - scannerParams = "-Dsonar.branch.name=${BRANCH_NAME} " - if (BRANCH_NAME != 'master') { - scannerParams = "${scannerParams} -Dsonar.branch.target=master" - } - } else { - scannerParams = "-Dsonar.pullrequest.base=master " + - "-Dsonar.pullrequest.branch=${env.BRANCH_NAME} " + - "-Dsonar.pullrequest.key=${env.CHANGE_ID} " + - "-Dsonar.pullrequest.provider=github " + - "-Dsonar.pullrequest.github.repository=crossplaneio/${env.REPOSITORY_NAME}" - } - } - - withSonarQubeEnv('SonarQubeCrossplane') { - sh "${scannerHome}/bin/sonar-scanner " + - "-Dsonar.projectKey=crossplaneio_${env.REPOSITORY_NAME} " + - "-Dsonar.projectName=${env.REPOSITORY_NAME} " + - "-Dsonar.organization=crossplane " + - "-Dsonar.sources=. ${scannerParams} " - } - } - } - stage('Record Coverage') { when { allOf { @@ -185,25 +151,6 @@ pipeline { step([$class: 'CompareCoverageAction', publishResultAs: 'comment', scmVars: [GIT_URL: env.GIT_URL]]) } } - - stage('Publish') { - when { - expression { - return env.shouldBuild != "false" - } - } - steps { - sh 'docker login -u="${DOCKER_USR}" -p="${DOCKER_PSW}"' - sh "./build/run make -j\$(nproc) publish BRANCH_NAME=${BRANCH_NAME} AWS_ACCESS_KEY_ID=${AWS_USR} AWS_SECRET_ACCESS_KEY=${AWS_PSW} GIT_API_TOKEN=${GITHUB_UPBOUND_BOT}" - script { - if (BRANCH_NAME == 'master') { - lock('promote-job') { - sh "./build/run make -j\$(nproc) promote BRANCH_NAME=master CHANNEL=master AWS_ACCESS_KEY_ID=${AWS_USR} AWS_SECRET_ACCESS_KEY=${AWS_PSW}" - } - } - } - } - } } post { diff --git a/Makefile b/Makefile index 4039eeb..8e0e40f 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,14 @@ PLATFORMS ?= linux_amd64 linux_arm64 # to run a target until the include commands succeeded. -include build/makelib/common.mk +# ==================================================================================== +# Setup Images + +# even though this repo doesn't build images (note the no-op img.build target below), +# some of the init is needed for the cross build container, e.g. setting BUILD_REGISTRY +-include build/makelib/image.mk +img.build: + # ==================================================================================== # Setup Go