diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index bf0200b1bcfb..000000000000 --- a/Jenkinsfile +++ /dev/null @@ -1,48 +0,0 @@ -pipeline { - agent none - stages { - stage('Build') { - parallel { - stage('electron-osx-x64') { - agent { - label 'osx' - } - steps { - timeout(60) { - sh 'script/bootstrap.py --target_arch=x64 --dev' - sh 'npm run lint' - sh 'script/build.py -c D' - sh 'script/test.py --ci --rebuild_native_modules' - } - } - post { - always { - cleanWs() - } - } - } - stage('electron-mas-x64') { - agent { - label 'osx' - } - environment { - MAS_BUILD = '1' - } - steps { - timeout(60) { - sh 'script/bootstrap.py --target_arch=x64 --dev' - sh 'npm run lint' - sh 'script/build.py -c D' - sh 'script/test.py --ci --rebuild_native_modules' - } - } - post { - always { - cleanWs() - } - } - } - } - } - } -} diff --git a/Jenkinsfile.arm64 b/Jenkinsfile.arm64 deleted file mode 100644 index c6d558f7f351..000000000000 --- a/Jenkinsfile.arm64 +++ /dev/null @@ -1,36 +0,0 @@ -pipeline { - agent { - docker { - image 'electronbuilds/arm64v8:0.0.2' - args '--privileged' - } - } - environment { - TARGET_ARCH='arm64' - DISPLAY=':99.0' - MOCHA_TIMEOUT='60000' - } - stages { - stage('Bootstrap') { - steps { - sh 'script/bootstrap.py -v --dev --target_arch=$TARGET_ARCH' - } - } - stage('Build') { - steps { - sh 'script/build.py -c D --ninja-path /usr/local/ninja/ninja' - } - } - stage('Test') { - steps { - sh '/etc/init.d/xvfb start' - sh 'script/test.py --ci' - } - } - } - post { - always { - cleanWs() - } - } -} diff --git a/README.md b/README.md index d5174d50d7e3..8da85159cc2a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ [![CircleCI Build Status](https://circleci.com/gh/electron/electron/tree/master.svg?style=shield)](https://circleci.com/gh/electron/electron/tree/master) [![AppVeyor Build Status](https://windows-ci.electronjs.org/api/projects/status/nilyf07hcef14dvj/branch/master?svg=true)](https://windows-ci.electronjs.org/project/AppVeyor/electron/branch/master) -[![Jenkins Build Status](https://mac-ci.electronjs.org/buildStatus/icon?job=Electron%20org/electron/master)](https://mac-ci.electronjs.org/blue/organizations/jenkins/Electron%20org%2Felectron/activity?branch=master) [![devDependency Status](https://david-dm.org/electron/electron/dev-status.svg)](https://david-dm.org/electron/electron?type=dev) [![Join the Electron Community on Slack](https://atom-slack.herokuapp.com/badge.svg)](https://atom-slack.herokuapp.com/) diff --git a/docs/development/releasing.md b/docs/development/releasing.md index 37bafd47640f..c321307df3f6 100644 --- a/docs/development/releasing.md +++ b/docs/development/releasing.md @@ -35,8 +35,6 @@ Create a token from https://windows-ci.electronjs.org/api-token If you don't have an account, ask a team member to add you. * `CIRCLE_TOKEN`: Create a token from "Personal API Tokens" at https://circleci.com/account/api -* `JENKINS_AUTH_TOKEN` and `JENKINS_BUILD_TOKEN`: -Are provided by a Jenkins admin ## Run the prepare-release script The prepare release script will do the following: @@ -86,9 +84,7 @@ $ ./script/bump-version.py --bump minor --dry-run The `prepare-release` script will trigger the builds via API calls. To monitor the build progress, see the following pages: -- [mac-ci.electronjs.org/blue/organizations/jenkins/electron-mas-x64-release/activity](https://mac-ci.electronjs.org/blue/organizations/jenkins/electron-mas-x64-release/activity) for Mac App Store -- [mac-ci.electronjs.org/blue/organizations/jenkins/electron-osx-x64-release/activity](https://mac-ci.electronjs.org/blue/organizations/jenkins/electron-osx-x64-release/activity) for OS X -- [circleci.com/gh/electron/electron](https://circleci.com/gh/electron) for Linux +- [circleci.com/gh/electron/electron](https://circleci.com/gh/electron) for OS X and Linux - [windows-ci.electronjs.org/project/AppVeyor/electron](https://windows-ci.electronjs.org/project/AppVeyor/electron) for Windows ## Compile release notes diff --git a/script/ci-release-build.js b/script/ci-release-build.js index ec2459198bf2..60c3682ac708 100644 --- a/script/ci-release-build.js +++ b/script/ci-release-build.js @@ -1,7 +1,6 @@ const assert = require('assert') const request = require('request') const buildAppVeyorURL = 'https://windows-ci.electronjs.org/api/builds' -const jenkinsServer = 'https://mac-ci.electronjs.org' const circleCIJobs = [ 'electron-linux-arm', @@ -11,11 +10,6 @@ const circleCIJobs = [ 'electron-linux-x64' ] -const jenkinsJobs = [ - 'electron-mas-x64-release', - 'electron-osx-x64-release' -] - async function makeRequest (requestOptions, parseResponse) { return new Promise((resolve, reject) => { request(requestOptions, (err, res, body) => { @@ -111,68 +105,6 @@ function buildCircleCI (targetBranch, ghRelease, job) { } } -async function buildJenkins (targetBranch, ghRelease, job) { - assert(process.env.JENKINS_AUTH_TOKEN, 'JENKINS_AUTH_TOKEN not found in environment') - assert(process.env.JENKINS_BUILD_TOKEN, 'JENKINS_BUILD_TOKEN not found in environment') - let jenkinsCrumb = await getJenkinsCrumb() - - if (job) { - assert(jenkinsJobs.includes(job), `Unknown CI job name: ${job}.`) - callJenkinsBuild(job, jenkinsCrumb, targetBranch, ghRelease) - } else { - jenkinsJobs.forEach((job) => { - callJenkinsBuild(job, jenkinsCrumb, targetBranch, ghRelease) - }) - } -} - -async function callJenkins (path, requestParameters, requestHeaders) { - let requestOptions = { - url: `${jenkinsServer}/${path}`, - auth: { - user: 'build', - pass: process.env.JENKINS_AUTH_TOKEN - }, - qs: requestParameters - } - if (requestHeaders) { - requestOptions.headers = requestHeaders - } - let jenkinsResponse = await makeRequest(requestOptions).catch(err => { - console.log(`Error calling Jenkins:`, err) - }) - return jenkinsResponse -} - -async function callJenkinsBuild (job, jenkinsCrumb, targetBranch, ghRelease) { - console.log(`Triggering Jenkins to run build job: ${job} on branch: ${targetBranch} with release flag.`) - let jenkinsParams = { - token: process.env.JENKINS_BUILD_TOKEN, - BRANCH: targetBranch - } - if (!ghRelease) { - jenkinsParams.RUN_RELEASE_BUILD = 1 - } - await callJenkins(`job/${job}/buildWithParameters`, jenkinsParams, jenkinsCrumb) - .catch(err => { - console.log(`Error calling Jenkins build`, err) - }) - let buildUrl = `${jenkinsServer}/job/${job}/lastBuild/` - console.log(`Jenkins build request successful. Check build status at ${buildUrl}.`) -} - -async function getJenkinsCrumb () { - let crumbResponse = await callJenkins('crumbIssuer/api/xml', { - xpath: 'concat(//crumbRequestField,":",//crumb)' - }).catch(err => { - console.log(`Error getting jenkins crumb:`, err) - }) - let crumbDetails = crumbResponse.split(':') - let crumbHeader = {} - crumbHeader[crumbDetails[0]] = crumbDetails[1] - return crumbHeader -} - function runRelease (targetBranch, options) { if (options.ci) { switch (options.ci) { @@ -184,15 +116,10 @@ function runRelease (targetBranch, options) { buildAppVeyor(targetBranch, options.ghRelease) break } - case 'Jenkins': { - buildJenkins(targetBranch, options.ghRelease, options.job) - break - } } } else { buildCircleCI(targetBranch, options.ghRelease, options.job) buildAppVeyor(targetBranch, options.ghRelease) - buildJenkins(targetBranch, options.ghRelease, options.job) } } @@ -203,7 +130,7 @@ if (require.main === module) { const targetBranch = args._[0] if (args._.length < 1) { console.log(`Trigger CI to build release builds of electron. - Usage: ci-release-build.js [--job=CI_JOB_NAME] [--ci=CircleCI|AppVeyor|Jenkins] [--ghRelease] TARGET_BRANCH + Usage: ci-release-build.js [--job=CI_JOB_NAME] [--ci=CircleCI|AppVeyor] [--ghRelease] TARGET_BRANCH `) process.exit(0) }