forked from The-OpenROAD-Project/OpenROAD-flow-scripts
-
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.
~ move most of the code logic to the backend Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
- Loading branch information
Vitor Bandeira
committed
Jul 3, 2024
1 parent
06469a8
commit 77e8501
Showing
2 changed files
with
11 additions
and
118 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,29 @@ | ||
@Library('utils@main') _ | ||
@Library('utils@orfs-v2.0.1') _ | ||
|
||
node { | ||
node('ubuntu22') { | ||
|
||
properties([ | ||
copyArtifactPermission('${JOB_NAME},'+env.BRANCH_NAME), | ||
]); | ||
properties([copyArtifactPermission('${JOB_NAME},'+env.BRANCH_NAME)]); | ||
|
||
stage('Checkout') { | ||
checkout scm; | ||
} | ||
|
||
def commitHash = "none"; | ||
def DOCKER_IMAGE_TAG = "latest"; | ||
def DOCKER_IMAGE; | ||
stage('Build and Push Docker Image') { | ||
if (isDependencyInstallerChanged(env.BRANCH_NAME)) { | ||
commitHash = sh(script: 'git rev-parse HEAD', returnStdout: true); | ||
commitHash = commitHash.replaceAll(/[^a-zA-Z0-9-]/, ''); | ||
DOCKER_IMAGE_TAG = pushCIImage(env.BRANCH_NAME, commitHash); | ||
} | ||
DOCKER_IMAGE = dockerPush('ubuntu22.04', 'orfs'); | ||
echo "Docker image is $DOCKER_IMAGE"; | ||
} | ||
def DOCKER_IMAGE = "openroad/flow-ubuntu22.04-dev:${DOCKER_IMAGE_TAG}"; | ||
|
||
docker.image("${DOCKER_IMAGE}").inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') { | ||
stage('Build ORFS and Stash bins') { | ||
sh "git config --system --add safe.directory '*'"; | ||
localBuild(); | ||
} | ||
stage('Build ORFS and Stash bins') { | ||
buildBins(DOCKER_IMAGE); | ||
} | ||
|
||
stage('Run Tests') { | ||
Map tasks = [failFast: false]; | ||
def test_slugs = getTestSlugs("all"); | ||
for (test in test_slugs) { | ||
def currentSlug = test; // copy needed to correctly pass args to runTests | ||
tasks["${test}"] = { | ||
node { | ||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { | ||
docker.image("${DOCKER_IMAGE}").inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') { | ||
sh "git config --system --add safe.directory '*'"; | ||
checkout scm; | ||
runTests(currentSlug); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
parallel(tasks); | ||
runTests(DOCKER_IMAGE, 'pr'); | ||
} | ||
|
||
docker.image("${DOCKER_IMAGE}").inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') { | ||
sh "git config --system --add safe.directory '*'"; | ||
stage('Report Summary') { | ||
generateReportShortSummary(); | ||
} | ||
stage("Report HTML Table") { | ||
generateReportHtmlTable(); | ||
} | ||
stage('Upload Metadata') { | ||
uploadMetadata(env.BRANCH_NAME, commitHash); | ||
} | ||
stage('Send Report') { | ||
def COMMIT_AUTHOR_EMAIL = sh(script: "git --no-pager show -s --format='%ae'", returnStdout: true).trim(); | ||
sendEmail(env.BRANCH_NAME, COMMIT_AUTHOR_EMAIL); | ||
} | ||
stage ('Cleanup and Reporting') { | ||
finalReport(DOCKER_IMAGE); | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.