From 1fd014bc55a584f6dc7b62bb0db4962dc2bc729f Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 25 Feb 2020 08:22:11 +0000 Subject: [PATCH] Squashed 'autobuild/Common_scripts/' changes from b68995a..44b189c 44b189c Add filtered copy 0285f04 Up the timeout protecting eclipse project opening 707f63a Merge commit '38db763aa82610cf5e09198bd6427a29bd8923ce' d48825b Use non-deprecated API d8b38d9 Make release script use new API 09154e9 Make release script use new API d7e2e11 Autobuilderscript definition is needed later b94b0cb Remove redundant parameter git-subtree-dir: autobuild/Common_scripts git-subtree-split: 44b189c724a028ac71da0ca1b5857ad672ac4094 --- compile/eclipsebuild/eclipseds5build.groovy | 2 +- copy/filtered.groovy | 70 +++++++++++++++++++++ publish/publish.groovy | 2 +- release/release.groovy | 3 +- 4 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 copy/filtered.groovy diff --git a/compile/eclipsebuild/eclipseds5build.groovy b/compile/eclipsebuild/eclipseds5build.groovy index 3e58e4f..9225100 100644 --- a/compile/eclipsebuild/eclipseds5build.groovy +++ b/compile/eclipsebuild/eclipseds5build.groovy @@ -227,7 +227,7 @@ def doBuild(apps, ds5folder, toolchainfolder, ds5shellcommand, buildcommand, sou // The lock is being used because it was being found that the doKillLeftovers was affecting other builds lock(resource: "eclipsebuild_${env.NODE_NAME}") { try { - timeout(time: 2, unit: 'MINUTES') { + timeout(time: 5, unit: 'MINUTES') { addToolchainPath(toolchainfolder) doImportProjects(ds5folder, toolchainfolder, ds5shellcommand, buildcommand, sourcefolder) } diff --git a/copy/filtered.groovy b/copy/filtered.groovy new file mode 100644 index 0000000..feaa2ab --- /dev/null +++ b/copy/filtered.groovy @@ -0,0 +1,70 @@ +pipeline { + agent { label AGENT_LABEL } + stages { + stage('Initial setup') { + steps { + script { + meta = load("${WORKSPACE}/autobuild/Common_scripts/autobuilder.groovy").startnonbuild(this) + + importer = load("${autobuilder.commonscripts()}/import/importer.groovy") + } + } + } + stage('Clean') { + steps { + script { + env.IMPORT = "${WORKSPACE}/import" + env.FILTEREDDEST = "${WORKSPACE}/filtered" + cleanfolders = [ + FILTEREDDEST, + IMPORT, + ] + cleaner = load("${autobuilder.commonscripts()}/clean/clean.groovy") + cleaner.clean(cleanfolders) + } + } + } + stage('Import artifacts') { + steps { + script { + importer.artifactimport(meta, ARTIFACT_LOCATION, ARTIFACT_PROJECT, ARTIFACT_BUILD_SELECTOR, RELEASE_REPO, RELEASE_REVISION, IMPORT) + } + } + } + stage('Filtered copy') { + steps { + script { + dir(IMPORT) { + fileOperations([ + fileCopyOperation(excludes: EXCLUDES, + flattenFiles: FLATTENOUTPUT, + includes: INCLUDES, + targetLocation: FILTEREDDEST)]) + } + } + } + } + stage('Archiving artifacts') { + steps { + script { + def artifactlist = meta.generateartifacts(["filtered/**"]) + archiveArtifacts "${artifactlist}" + } + } + } + } + post { + always { + echo 'Post-build' + } + failure { + echo 'Failed build' + } + unstable { + echo 'Unstable build' + } + success { + echo 'Succeeded build' + } + } +} diff --git a/publish/publish.groovy b/publish/publish.groovy index 5750275..7beb134 100644 --- a/publish/publish.groovy +++ b/publish/publish.groovy @@ -5,7 +5,7 @@ pipeline { steps { script { autobuilderscript = load("${WORKSPACE}/autobuild/Common_scripts/autobuilder.groovy") - meta = autobuilderscript.start(this, PRODUCT_NAME, SUBCOMPONENT_NAME, JIRA_KEY, RELEASE_REPO) + meta = autobuilderscript.startbuild(this, PRODUCT_NAME, SUBCOMPONENT_NAME, RELEASE_REPO) } } } diff --git a/release/release.groovy b/release/release.groovy index 79c0234..e51a174 100644 --- a/release/release.groovy +++ b/release/release.groovy @@ -5,7 +5,7 @@ pipeline { steps { script { autobuilderscript = load("${WORKSPACE}/autobuild/Common_scripts/autobuilder.groovy") - meta = autobuilderscript.start(this, PRODUCT_NAME, SUBCOMPONENT_NAME, JIRA_KEY, RELEASE_REPO) + meta = autobuilderscript.startbuild(this, PRODUCT_NAME, SUBCOMPONENT_NAME, RELEASE_REPO) } } } @@ -86,4 +86,3 @@ pipeline { } } } -