forked from eclipse-openj9/openj9
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit for OMR-Acceptance build
- Launch Compile & Sanity X JDK8,10 X SPEC - Add params to workflow function - Change build stage name to match JOB_NAME - Add pipeline for Promote job - Move reusable functions to common file [ci skip] Issue eclipse-openj9#972 Signed-off-by: Adam Brousseau <adam.brousseau88@gmail.com>
- Loading branch information
1 parent
2316390
commit 2df1792
Showing
20 changed files
with
202 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
buildenv/jenkins/jobs/infrastructure/Promote-OpenJ9-OMR-master-to-openj9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2018, 2018 IBM Corp. and others | ||
* | ||
* This program and the accompanying materials are made available under | ||
* the terms of the Eclipse Public License 2.0 which accompanies this | ||
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* or the Apache License, Version 2.0 which accompanies this distribution and | ||
* is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* This Source Code may also be made available under the following | ||
* Secondary Licenses when the conditions for such availability set | ||
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU | ||
* General Public License, version 2 with the GNU Classpath | ||
* Exception [1] and GNU General Public License, version 2 with the | ||
* OpenJDK Assembly Exception [2]. | ||
* | ||
* [1] https://www.gnu.org/software/classpath/license.html | ||
* [2] http://openjdk.java.net/legal/assembly-exception.html | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception | ||
*******************************************************************************/ | ||
|
||
HTTP = "https://" | ||
REPO = 'github.com/eclipse/openj9-omr.git' | ||
TARGET_BRANCH = "openj9" | ||
|
||
timeout(time: 3, unit: 'HOURS') { | ||
node('worker') { | ||
stage('Promote') { | ||
timestamps { | ||
|
||
checkout scm | ||
buildfile = load 'buildenv/jenkins/common/pipeline-functions' | ||
variableFile = load 'buildenv/jenkins/common/variables-functions' | ||
variableFile.parse_variables_file() | ||
cleanWs() | ||
|
||
CRED_ID = variableFile.get_user_credentials_id('github') | ||
|
||
git branch: "${TARGET_BRANCH}", url: "${HTTP}${REPO}" | ||
|
||
OLD_SHA = buildfile.get_sha("${HTTP}${REPO}", TARGET_BRANCH) | ||
|
||
MERGE_DATE = buildfile.get_date() | ||
|
||
sh "git merge ${OMR_COMMIT} -m 'Merge ${OMR_COMMIT} into ${OLD_SHA}'" | ||
|
||
sh """git tag -a 'omr_merge_${MERGE_DATE}' \ | ||
-m 'OMR: ${OMR_COMMIT}' \ | ||
-m 'OpenJ9: ${OPENJ9_COMMIT}' \ | ||
-m 'OpenJDK8: ${OPENJDK8_COMMIT}' \ | ||
-m 'OpenJDK10: ${OPENJDK10_COMMIT}'""" | ||
|
||
buildfile.git_push_auth(REPO, TARGET_BRANCH, CRED_ID) | ||
buildfile.git_push_auth(REPO, '--tags', CRED_ID) | ||
|
||
currentBuild.description = sh ( | ||
script: 'git log --oneline -1', | ||
returnStdout: true | ||
).trim() | ||
|
||
cleanWs() | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2018, 2018 IBM Corp. and others | ||
* | ||
* This program and the accompanying materials are made available under | ||
* the terms of the Eclipse Public License 2.0 which accompanies this | ||
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* or the Apache License, Version 2.0 which accompanies this distribution and | ||
* is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* This Source Code may also be made available under the following | ||
* Secondary Licenses when the conditions for such availability set | ||
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU | ||
* General Public License, version 2 with the GNU Classpath | ||
* Exception [1] and GNU General Public License, version 2 with the | ||
* OpenJDK Assembly Exception [2]. | ||
* | ||
* [1] https://www.gnu.org/software/classpath/license.html | ||
* [2] http://openjdk.java.net/legal/assembly-exception.html | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception | ||
*******************************************************************************/ | ||
|
||
def SDK_VERSIONS = ['8', '10'] | ||
def SPECS = ['linux_ppc-64_cmprssptrs_le', 'linux_390-64_cmprssptrs', 'aix_ppc-64_cmprssptrs'] | ||
|
||
def OPENJDK_REPOS = [:] | ||
OPENJDK_REPOS['8'] = [repo: 'https://github.com/ibmruntimes/openj9-openjdk-jdk8.git', branch: 'openj9'] | ||
OPENJDK_REPOS['10'] = [repo: 'https://github.com/ibmruntimes/openj9-openjdk-jdk10.git', branch: 'openj9'] | ||
|
||
def OPENJ9_REPO = 'https://github.com/eclipse/openj9.git' | ||
def OPENJ9_BRANCH = 'master' | ||
|
||
def OMR_REPO = 'https://github.com/eclipse/openj9-omr.git' | ||
def OMR_BRANCH = 'master' | ||
|
||
TESTS_TARGETS = '_sanity' | ||
|
||
def JOBS = [:] | ||
def ALL_SHAS = [:] | ||
|
||
def SLACK_CHANNEL | ||
|
||
timeout(time: 6, unit: 'HOURS') { | ||
node('worker') { | ||
timestamps { | ||
checkout scm | ||
buildFile = load 'buildenv/jenkins/common/pipeline-functions' | ||
variableFile = load 'buildenv/jenkins/common/variables-functions' | ||
variableFile.parse_variables_file() | ||
variableFile.set_slack_channel() | ||
|
||
// fetch SHAs | ||
ALL_SHAS['OPENJ9'] = buildFile.get_sha(OPENJ9_REPO, OPENJ9_BRANCH) | ||
ALL_SHAS['OMR'] = buildFile.get_sha(OMR_REPO, OMR_BRANCH) | ||
|
||
// update build description | ||
currentBuild.description = "OpenJ9: ${ALL_SHAS['OPENJ9']}<br/>OMR: ${ALL_SHAS['OMR']}" | ||
|
||
SDK_VERSIONS.each { SDK_VERSION -> | ||
def OPENJDK_REPO = OPENJDK_REPOS["${SDK_VERSION}"].repo | ||
def OPENJDK_BRANCH = OPENJDK_REPOS["${SDK_VERSION}"].branch | ||
def SHAS = [:] | ||
SHAS['OPENJ9'] = ALL_SHAS['OPENJ9'] | ||
SHAS['OMR'] = ALL_SHAS['OMR'] | ||
SHAS['OPENJDK'] = buildFile.get_sha(OPENJDK_REPO, OPENJDK_BRANCH) | ||
ALL_SHAS["OPENJDK${SDK_VERSION}"] = SHAS['OPENJDK'] | ||
|
||
// append OpenJDK SHA to the build description | ||
currentBuild.description += "<br/>OpenJDK${SDK_VERSION}: ${SHAS['OPENJDK']}" | ||
|
||
echo "Building OpenJ9 extensions for OpenJDK${SDK_VERSION}" | ||
echo "OPENJDK_REPO = ${OPENJDK_REPO}" | ||
echo "OPENJDK_BRANCH = ${OPENJDK_BRANCH}" | ||
echo "OPENJDK_SHA:${SHAS['OPENJDK']}" | ||
echo "OPENJ9_SHA:${SHAS['OPENJ9']}" | ||
echo "OMR_SHA:${SHAS['OMR']}" | ||
|
||
SPECS.each { SPEC -> | ||
JOBS["Build-Test-JDK${SDK_VERSION}-${SPEC}"] = { buildFile.workflow(SDK_VERSION, SPEC, SHAS, OPENJDK_REPO, OPENJDK_BRANCH, OPENJ9_REPO, OPENJ9_BRANCH, OMR_REPO, OMR_BRANCH, TESTS_TARGETS) } | ||
} | ||
} | ||
|
||
cleanWs() | ||
} | ||
} | ||
|
||
timestamps { | ||
parallel JOBS | ||
stage('Promote') { | ||
PROMOTE_JOB = buildFile.build_with_slack('Promote-OpenJ9-OMR-master-to-openj9', | ||
[string(name: 'OMR_COMMIT', value: "${ALL_SHAS['OMR']}"), | ||
string(name: 'OPENJ9_COMMIT', value: "${ALL_SHAS['OPENJ9']}"), | ||
string(name: 'OPENJDK8_COMMIT', value: "${ALL_SHAS['OPENJDK8']}"), | ||
string(name: 'OPENJDK10_COMMIT', value: "${ALL_SHAS['OPENJDK10']}")]) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters