From 8073420970773a084f2277544dd80114df854da9 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 11 Nov 2017 10:39:37 +0000 Subject: [PATCH 001/122] add README --- README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 From 744ee5f3d0d0fb0b9e873fba5c3e72105c962266 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 11 Nov 2017 10:50:17 +0000 Subject: [PATCH 002/122] GIS-1621 - Add first jenkins groovy script --- ScriptTest/script_test_1.gsh | 75 ++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 ScriptTest/script_test_1.gsh diff --git a/ScriptTest/script_test_1.gsh b/ScriptTest/script_test_1.gsh new file mode 100644 index 0000000..6b3e988 --- /dev/null +++ b/ScriptTest/script_test_1.gsh @@ -0,0 +1,75 @@ +pipeline { + // agent { label 'Pemba' } + // agent { label 'floreana' } + agent { label 'tiger' } + // agent any + + stages { + stage('Checkout') { + steps { + checkout([$class: 'GitSCM', + branches: [[name: 'refs/heads/master']], + doGenerateSubmoduleConfigurations: false, + extensions: [[$class: 'RelativeTargetDirectory', + relativeTargetDir: 'arepo'], + [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false, timeout: 60], + [$class: 'CleanBeforeCheckout'], + [$class: 'CheckoutOption', timeout: 60]], + submoduleCfg: [], + userRemoteConfigs: [[url: 'git@hydra:danhawkins/testproject.git']]]) + script { + if (isUnix()) { + sh 'echo $WORKSPACE' + sh 'ls -lsR $WORKSPACE' + } + else { + bat 'echo %WORKSPACE%' + bat 'dir "%WORKSPACE%"' + } + } + } + } + stage('Build') { + steps { + script { + if (isUnix()) { + sh 'echo make $APARAMETER' + sh 'echo $WORKSPACE' + sh 'cat $WORKSPACE/arepo/README2.md' + } + else { + bat 'echo make "%APARAMETER%"' + bat 'echo %WORKSPACE%' + bat 'type "%WORKSPACE%\\arepo\\README2.md"' + } + } + } + } + stage('Test'){ + steps { + script { + if (isUnix()) { + sh 'echo make check' + sh 'echo do test' + } + else { + bat 'echo make check' + bat 'echo do test' + } + } + } + } + stage('Deploy') { + steps { + script { + if (isUnix()) { + sh 'echo make publish' + } + else { + bat 'echo make publish' + } + } + } + } + } +} From 8d0a7bbd170fef8f97021fa24b6ee7c307effa49 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 11 Nov 2017 17:22:37 +0000 Subject: [PATCH 003/122] GIS-1621 - Now working --- ScriptTest/script_test_1.gsh | 75 ------------ build/build.gsh | 222 +++++++++++++++++++++++++++++++++++ 2 files changed, 222 insertions(+), 75 deletions(-) delete mode 100644 ScriptTest/script_test_1.gsh create mode 100644 build/build.gsh diff --git a/ScriptTest/script_test_1.gsh b/ScriptTest/script_test_1.gsh deleted file mode 100644 index 6b3e988..0000000 --- a/ScriptTest/script_test_1.gsh +++ /dev/null @@ -1,75 +0,0 @@ -pipeline { - // agent { label 'Pemba' } - // agent { label 'floreana' } - agent { label 'tiger' } - // agent any - - stages { - stage('Checkout') { - steps { - checkout([$class: 'GitSCM', - branches: [[name: 'refs/heads/master']], - doGenerateSubmoduleConfigurations: false, - extensions: [[$class: 'RelativeTargetDirectory', - relativeTargetDir: 'arepo'], - [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false, timeout: 60], - [$class: 'CleanBeforeCheckout'], - [$class: 'CheckoutOption', timeout: 60]], - submoduleCfg: [], - userRemoteConfigs: [[url: 'git@hydra:danhawkins/testproject.git']]]) - script { - if (isUnix()) { - sh 'echo $WORKSPACE' - sh 'ls -lsR $WORKSPACE' - } - else { - bat 'echo %WORKSPACE%' - bat 'dir "%WORKSPACE%"' - } - } - } - } - stage('Build') { - steps { - script { - if (isUnix()) { - sh 'echo make $APARAMETER' - sh 'echo $WORKSPACE' - sh 'cat $WORKSPACE/arepo/README2.md' - } - else { - bat 'echo make "%APARAMETER%"' - bat 'echo %WORKSPACE%' - bat 'type "%WORKSPACE%\\arepo\\README2.md"' - } - } - } - } - stage('Test'){ - steps { - script { - if (isUnix()) { - sh 'echo make check' - sh 'echo do test' - } - else { - bat 'echo make check' - bat 'echo do test' - } - } - } - } - stage('Deploy') { - steps { - script { - if (isUnix()) { - sh 'echo make publish' - } - else { - bat 'echo make publish' - } - } - } - } - } -} diff --git a/build/build.gsh b/build/build.gsh new file mode 100644 index 0000000..500f20b --- /dev/null +++ b/build/build.gsh @@ -0,0 +1,222 @@ +pipeline { + // agent { label 'Pemba' } + // agent { label 'floreana' } + agent { label 'build' } + // agent any + stages { + stage('Checkout source') { + steps { + checkout([$class: 'GitSCM', + branches: [ + [name: 'origin/${BRANCH_NAME}'] + ], + doGenerateSubmoduleConfigurations: false, + extensions: [ + [$class: 'CleanBeforeCheckout'], + [$class: 'CloneOption', depth: 0, noTags: false, reference: '${REPO_ROOT}/newsw', shallow: false, timeout: 60], + [$class: 'CheckoutOption', timeout: 60], + [$class: 'RelativeTargetDirectory', relativeTargetDir: 'GitRepository'], + [$class: 'PathRestriction', excludedRegions: '', includedRegions: '''src/.* autobuild/.*'''] + ], + submoduleCfg: [ + ], + userRemoteConfigs: [ + [url: 'git@hydra:gis/newsw.git'] + ] + ]) + } + } + stage('Checkout dependencies') { + steps { + checkout([$class: 'GitSCM', + branches: [ + [name: 'refs/tags/${FD1200_FIRMWARE_RELEASE_VERSION}'] + ], + doGenerateSubmoduleConfigurations: false, + extensions: [ + [$class: 'CleanBeforeCheckout'], + [$class: 'CloneOption', depth: 0, noTags: false, reference: '${REPO_ROOT}/samba_fw_releases', shallow: true, timeout: 60], + [$class: 'CheckoutOption', timeout: 60], + [$class: 'RelativeTargetDirectory', relativeTargetDir: 'samba_fw'] + ], + submoduleCfg: [ + ], + userRemoteConfigs: [ + [url: 'git@hydra:gis/samba_fw_releases.git'] + ] + ]) + checkout([$class: 'GitSCM', + branches: [ + [name: 'refs/tags/${XR_1003_EMBEDDED_LOGIC_RELEASE_VERSION}'] + ], + doGenerateSubmoduleConfigurations: false, + extensions: [ + [$class: 'CleanBeforeCheckout'], + [$class: 'CloneOption', depth: 0, noTags: false, reference: '${REPO_ROOT}/HMB_XR_1003_Embeddded_Logic.git', shallow: true, timeout: 60], + [$class: 'CheckoutOption', timeout: 60], + [$class: 'RelativeTargetDirectory', relativeTargetDir: 'xr1003_el'] + ], + submoduleCfg: [ + ], + userRemoteConfigs: [ + [url: 'git@hydra:releases/HMB_XR_1003_Embeddded_Logic.git'] + ] + ]) + checkout([$class: 'GitSCM', + branches: [ + [name: 'refs/tags/${VERSION_STAMPING_VERSION}'] + ], + doGenerateSubmoduleConfigurations: false, + extensions: [ + [$class: 'CleanBeforeCheckout'], + [$class: 'CloneOption', noTags: false, reference: '${REPO_ROOT}\\ver_stamping_releases', shallow: true, timeout: 60], + [$class: 'CheckoutOption', timeout: 60], + [$class: 'RelativeTargetDirectory', relativeTargetDir: 'ver_stamping'] + ], + submoduleCfg: [], + userRemoteConfigs: [ + [url: 'git@hydra:releases/ver_stamping_releases.git'] + ] + ]) + checkout([$class: 'GitSCM', + branches: [ + [name: 'origin/master'] + ], + doGenerateSubmoduleConfigurations: false, + extensions: [ + [$class: 'CleanBeforeCheckout'], + [$class: 'CloneOption', noTags: false, reference: '${REPO_ROOT}\\print_release_difference', shallow: true, timeout: 60], + [$class: 'CheckoutOption', timeout: 60], + [$class: 'RelativeTargetDirectory', relativeTargetDir: 'print_release_difference'] + ], + submoduleCfg: [ + ], + userRemoteConfigs: [ + [url: 'git@hydra:gis/print_release_difference.git'] + ] + ]) + + } + } + stage('Setup links') { + steps { + bat ''' + @echo on' + rmdir jobscripts + mklink /J jobscripts GitRepository\\autobuild\\build + rmdir jobscripts_common + mklink /J jobscripts_common "GitRepository\\autobuild\\common" + rmdir security + mklink /J security "GitRepository\\autobuild\\security" + rmdir src + mklink /J src GitRepository\\src + if errorlevel 1 exit /b 1 + ''' + } + } + stage('Imports and exports') { + steps { + bat ''' + call jobscripts\\reset_imports_and_exports.bat + if errorlevel 1 exit /b 1 + ''' + } + } + stage('Clean') { + steps { + bat ''' + call jobscripts\\clean.bat + if errorlevel 1 exit /b 1 + ''' + } + } + stage('Generating version number') { + steps { + bat ''' + call jobscripts\\versioning.bat + if errorlevel 1 exit /b 1 + ''' + script { + env.BUILD_STAMP = readFile('version/buildstamp.txt').trim() + env.SRC_REVISION = readFile('version/revision.txt').trim() + } + } + } + stage('Generating version differences lists') { + steps { + bat ''' + set CURRENT_RELEASE=origin/%BRANCH_NAME% + set PREVIOUS_RELEASE=%PREVIOUS_RELEASE_BRANCH_NAME% + set WORKING_PATH=%WORKSPACE%/GitRepository + set DIFFERENCE_OPTIONS="opposite notcommon" + "%PYTHON34%" "%WORKSPACE%/print_release_difference/show_release_differences.py" > "%WORKSPACE%\\version\\differences.txt" + if errorlevel 1 exit /b 1 + ''' + } + } + stage('Inherit version imports') { + steps { + bat ''' + call jobscripts\\version_imports.bat + if errorlevel 1 exit /b 1 + ''' + } + } + stage('Version stamp files') { + steps { + bat ''' + call jobscripts\\versionrcfiles.bat + if errorlevel 1 exit /b 1 + ''' + } + } + stage('Compile') { + steps { + bat ''' + call jobscripts\\autobuild.bat + if errorlevel 1 exit /b 1 + ''' + } + } + stage('Make SDK source') { + steps { + bat ''' + call jobscripts\\make_src_sdk.bat + if errorlevel 1 exit /b 1 + ''' + } + } + stage('Build SDK source') { + steps { + bat ''' + call jobscripts\\build_sdk.bat + if errorlevel 1 exit /b 1 + ''' + } + } + stage('Prepare exports') { + steps { + bat ''' + call jobscripts\\export.bat + if errorlevel 1 exit /b 1 + ''' + } + } + stage('Scan for warnings') { + steps { + warnings canComputeNew: false, canResolveRelativePaths: false, categoriesPattern: '', consoleParsers: [[parserName: 'MSBuild']], defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', unHealthy: '' + } + } + stage('Archiving artifacts') { + steps { + archiveArtifacts 'bin/**,scripts/**,version/**,pipeline/**,sdk_source/**,sdk_source_tree_built.txt,ildasm/**' + } + } + } + post { + success { + echo 'Succeeded build' + } + } +} + From 43beb78946205895782c057a1fb3ca7cb02d05a1 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 11 Nov 2017 17:42:40 +0000 Subject: [PATCH 004/122] GIS-1621 - Try to parse output --- build/build.gsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/build.gsh b/build/build.gsh index 500f20b..ffc9773 100644 --- a/build/build.gsh +++ b/build/build.gsh @@ -217,6 +217,9 @@ pipeline { success { echo 'Succeeded build' } + always { + step([$class: 'LogParserPublisher', parsingRulesPath: 'GitRepository/autobuild/build/log parsing rules/vs.txt', useProjectRule: true]) + } } } From 9814e14fb56a609bccaeaa3ee7e4b078153af419 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 12 Nov 2017 09:54:04 +0000 Subject: [PATCH 005/122] GIS-1621 - Try to parse output --- build/build.gsh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/build/build.gsh b/build/build.gsh index ffc9773..8e49430 100644 --- a/build/build.gsh +++ b/build/build.gsh @@ -214,12 +214,13 @@ pipeline { } } post { - success { + always { + echo 'Post-build' + //step([$class: 'LogParserPublisher', parsingRulesPath: 'GitRepository/autobuild/build/log parsing rules/vs.txt', useProjectRule: true]) + } + success { echo 'Succeeded build' } - always { - step([$class: 'LogParserPublisher', parsingRulesPath: 'GitRepository/autobuild/build/log parsing rules/vs.txt', useProjectRule: true]) - } - } + } } From 4b7d20c01db5e2d5af7607d5cf7535c34e30a0bd Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 12 Nov 2017 10:17:37 +0000 Subject: [PATCH 006/122] GIS-1621 - Try to parse output --- build/build.gsh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/build/build.gsh b/build/build.gsh index 8e49430..499af4c 100644 --- a/build/build.gsh +++ b/build/build.gsh @@ -218,8 +218,19 @@ pipeline { echo 'Post-build' //step([$class: 'LogParserPublisher', parsingRulesPath: 'GitRepository/autobuild/build/log parsing rules/vs.txt', useProjectRule: true]) } - success { - echo 'Succeeded build' + success { + echo 'Succeeded build' + build job: '2.0.x_test', + parameters: [ + string(name: 'TEST_PORT', value: '2016'), + booleanParam(name: 'PIPELINE_NO_TEST', value: false), + booleanParam(name: 'USING_GIT', value: true), + string(name: 'REPEAT_COUNT', value: '0'), + booleanParam(name: 'QUICK_TEST', value: true), + booleanParam(name: 'LIST_TESTS', value: false), + string(name: 'BRANCH', value: 'master') + ], + propagate: false } } } From e84879a84501c56ed7c3e8acbfc5ad0efb5af4e3 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 12 Nov 2017 15:09:03 +0000 Subject: [PATCH 007/122] GIS-1621 - Try to parse output --- build/build.gsh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/build/build.gsh b/build/build.gsh index 499af4c..3781d3c 100644 --- a/build/build.gsh +++ b/build/build.gsh @@ -204,7 +204,18 @@ pipeline { } stage('Scan for warnings') { steps { - warnings canComputeNew: false, canResolveRelativePaths: false, categoriesPattern: '', consoleParsers: [[parserName: 'MSBuild']], defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', unHealthy: '' + warnings canComputeNew: false, + canResolveRelativePaths: false, + categoriesPattern: '', + consoleParsers: [ + [parserName: 'MSBuild'] + ], + defaultEncoding: '', + excludePattern: '', + healthy: '', + includePattern: '', + messagesPattern: '', + unHealthy: '' } } stage('Archiving artifacts') { @@ -216,11 +227,13 @@ pipeline { post { always { echo 'Post-build' - //step([$class: 'LogParserPublisher', parsingRulesPath: 'GitRepository/autobuild/build/log parsing rules/vs.txt', useProjectRule: true]) + } + failure { + step([$class: 'LogParserPublisher', parsingRulesPath: 'GitRepository/autobuild/build/log parsing rules/vs.txt', useProjectRule: true]) } success { echo 'Succeeded build' - build job: '2.0.x_test', + build job: '${BRANCH_NAME}_test', parameters: [ string(name: 'TEST_PORT', value: '2016'), booleanParam(name: 'PIPELINE_NO_TEST', value: false), From 60127bfce18e7379930e07fa686996b77c8c1a76 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 12 Nov 2017 15:10:54 +0000 Subject: [PATCH 008/122] GIS-1621 - Try to parse output --- build/build.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.gsh b/build/build.gsh index 3781d3c..8065b13 100644 --- a/build/build.gsh +++ b/build/build.gsh @@ -243,7 +243,7 @@ pipeline { booleanParam(name: 'LIST_TESTS', value: false), string(name: 'BRANCH', value: 'master') ], - propagate: false + propagate: true } } } From dafdaa9a08e43a9d5368fbd13faa22f4ff32c987 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 12 Nov 2017 15:44:17 +0000 Subject: [PATCH 009/122] GIS-1621 - Expand variables properly; Format script --- build/build.gsh | 99 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 76 insertions(+), 23 deletions(-) diff --git a/build/build.gsh b/build/build.gsh index 8065b13..922899c 100644 --- a/build/build.gsh +++ b/build/build.gsh @@ -8,15 +8,28 @@ pipeline { steps { checkout([$class: 'GitSCM', branches: [ - [name: 'origin/${BRANCH_NAME}'] + [name: "origin/${BRANCH_NAME}"] ], doGenerateSubmoduleConfigurations: false, extensions: [ [$class: 'CleanBeforeCheckout'], - [$class: 'CloneOption', depth: 0, noTags: false, reference: '${REPO_ROOT}/newsw', shallow: false, timeout: 60], - [$class: 'CheckoutOption', timeout: 60], - [$class: 'RelativeTargetDirectory', relativeTargetDir: 'GitRepository'], - [$class: 'PathRestriction', excludedRegions: '', includedRegions: '''src/.* autobuild/.*'''] + [$class: 'CloneOption', + depth: 0, + noTags: false, + reference: "${REPO_ROOT}/newsw", + shallow: false, + timeout: 60 + ], + [$class: 'CheckoutOption', + timeout: 60 + ], + [$class: 'RelativeTargetDirectory', + relativeTargetDir: 'GitRepository' + ], + [$class: 'PathRestriction', + excludedRegions: '', + includedRegions: '''src/.* autobuild/.*''' + ] ], submoduleCfg: [ ], @@ -30,14 +43,24 @@ pipeline { steps { checkout([$class: 'GitSCM', branches: [ - [name: 'refs/tags/${FD1200_FIRMWARE_RELEASE_VERSION}'] + [name: "refs/tags/${FD1200_FIRMWARE_RELEASE_VERSION}"] ], doGenerateSubmoduleConfigurations: false, extensions: [ [$class: 'CleanBeforeCheckout'], - [$class: 'CloneOption', depth: 0, noTags: false, reference: '${REPO_ROOT}/samba_fw_releases', shallow: true, timeout: 60], - [$class: 'CheckoutOption', timeout: 60], - [$class: 'RelativeTargetDirectory', relativeTargetDir: 'samba_fw'] + [$class: 'CloneOption', + depth: 0, + noTags: false, + reference: "${REPO_ROOT}/samba_fw_releases", + shallow: true, + timeout: 60 + ], + [$class: 'CheckoutOption', + timeout: 60 + ], + [$class: 'RelativeTargetDirectory', + relativeTargetDir: 'samba_fw' + ] ], submoduleCfg: [ ], @@ -47,14 +70,24 @@ pipeline { ]) checkout([$class: 'GitSCM', branches: [ - [name: 'refs/tags/${XR_1003_EMBEDDED_LOGIC_RELEASE_VERSION}'] + [name: "refs/tags/${XR_1003_EMBEDDED_LOGIC_RELEASE_VERSION}"] ], doGenerateSubmoduleConfigurations: false, extensions: [ [$class: 'CleanBeforeCheckout'], - [$class: 'CloneOption', depth: 0, noTags: false, reference: '${REPO_ROOT}/HMB_XR_1003_Embeddded_Logic.git', shallow: true, timeout: 60], - [$class: 'CheckoutOption', timeout: 60], - [$class: 'RelativeTargetDirectory', relativeTargetDir: 'xr1003_el'] + [$class: 'CloneOption', + depth: 0, + noTags: false, + reference: "${REPO_ROOT}/HMB_XR_1003_Embeddded_Logic.git", + shallow: true, + timeout: 60 + ], + [$class: 'CheckoutOption', + timeout: 60 + ], + [$class: 'RelativeTargetDirectory', + relativeTargetDir: 'xr1003_el' + ] ], submoduleCfg: [ ], @@ -64,14 +97,23 @@ pipeline { ]) checkout([$class: 'GitSCM', branches: [ - [name: 'refs/tags/${VERSION_STAMPING_VERSION}'] + [name: "refs/tags/${VERSION_STAMPING_VERSION}"] ], doGenerateSubmoduleConfigurations: false, extensions: [ [$class: 'CleanBeforeCheckout'], - [$class: 'CloneOption', noTags: false, reference: '${REPO_ROOT}\\ver_stamping_releases', shallow: true, timeout: 60], - [$class: 'CheckoutOption', timeout: 60], - [$class: 'RelativeTargetDirectory', relativeTargetDir: 'ver_stamping'] + [$class: 'CloneOption', + noTags: false, + reference: "${REPO_ROOT}/ver_stamping_releases", + shallow: true, + timeout: 60 + ], + [$class: 'CheckoutOption', + timeout: 60 + ], + [$class: 'RelativeTargetDirectory', + relativeTargetDir: 'ver_stamping' + ] ], submoduleCfg: [], userRemoteConfigs: [ @@ -85,9 +127,18 @@ pipeline { doGenerateSubmoduleConfigurations: false, extensions: [ [$class: 'CleanBeforeCheckout'], - [$class: 'CloneOption', noTags: false, reference: '${REPO_ROOT}\\print_release_difference', shallow: true, timeout: 60], - [$class: 'CheckoutOption', timeout: 60], - [$class: 'RelativeTargetDirectory', relativeTargetDir: 'print_release_difference'] + [$class: 'CloneOption', + noTags: false, + reference: "${REPO_ROOT}/print_release_difference", + shallow: true, + timeout: 60 + ], + [$class: 'CheckoutOption', + timeout: 60 + ], + [$class: 'RelativeTargetDirectory', + relativeTargetDir: 'print_release_difference' + ] ], submoduleCfg: [ ], @@ -229,11 +280,14 @@ pipeline { echo 'Post-build' } failure { - step([$class: 'LogParserPublisher', parsingRulesPath: 'GitRepository/autobuild/build/log parsing rules/vs.txt', useProjectRule: true]) + step([$class: 'LogParserPublisher', + parsingRulesPath: 'GitRepository/autobuild/build/log parsing rules/vs.txt', + useProjectRule: true + ]) } success { echo 'Succeeded build' - build job: '${BRANCH_NAME}_test', + build job: "${BRANCH_NAME}_test", parameters: [ string(name: 'TEST_PORT', value: '2016'), booleanParam(name: 'PIPELINE_NO_TEST', value: false), @@ -247,4 +301,3 @@ pipeline { } } } - From b86e13a3690e13d90d451a683d1ed8ef5ca42d8d Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 12 Nov 2017 16:06:51 +0000 Subject: [PATCH 010/122] GIS-1621 - Don't trigger subsequent builds; Let them trigger of this build --- build/build.gsh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/build/build.gsh b/build/build.gsh index 922899c..e284106 100644 --- a/build/build.gsh +++ b/build/build.gsh @@ -280,6 +280,7 @@ pipeline { echo 'Post-build' } failure { + echo 'Failed build' step([$class: 'LogParserPublisher', parsingRulesPath: 'GitRepository/autobuild/build/log parsing rules/vs.txt', useProjectRule: true @@ -287,17 +288,6 @@ pipeline { } success { echo 'Succeeded build' - build job: "${BRANCH_NAME}_test", - parameters: [ - string(name: 'TEST_PORT', value: '2016'), - booleanParam(name: 'PIPELINE_NO_TEST', value: false), - booleanParam(name: 'USING_GIT', value: true), - string(name: 'REPEAT_COUNT', value: '0'), - booleanParam(name: 'QUICK_TEST', value: true), - booleanParam(name: 'LIST_TESTS', value: false), - string(name: 'BRANCH', value: 'master') - ], - propagate: true } } } From 8f30453ca6903922f740b404039a1632c59eb8e4 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 28 Nov 2017 11:42:56 +0000 Subject: [PATCH 011/122] add README --- README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 From c62d2d3096fe786680a89f3f0d92b0689bb48515 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 28 Nov 2017 16:51:58 +0000 Subject: [PATCH 012/122] Put a newline in the git included regions filter --- build/build.gsh | 141 ++++++++++++++++++++++++------------------------ 1 file changed, 71 insertions(+), 70 deletions(-) diff --git a/build/build.gsh b/build/build.gsh index e284106..a398a96 100644 --- a/build/build.gsh +++ b/build/build.gsh @@ -14,22 +14,23 @@ pipeline { extensions: [ [$class: 'CleanBeforeCheckout'], [$class: 'CloneOption', - depth: 0, - noTags: false, - reference: "${REPO_ROOT}/newsw", - shallow: false, - timeout: 60 - ], + depth: 0, + noTags: false, + reference: "${REPO_ROOT}/newsw", + shallow: false, + timeout: 60 + ], [$class: 'CheckoutOption', - timeout: 60 - ], + timeout: 60 + ], [$class: 'RelativeTargetDirectory', - relativeTargetDir: 'GitRepository' - ], + relativeTargetDir: 'GitRepository' + ], [$class: 'PathRestriction', - excludedRegions: '', - includedRegions: '''src/.* autobuild/.*''' - ] + excludedRegions: '', + includedRegions: '''src/.* + autobuild/.*''' + ] ], submoduleCfg: [ ], @@ -49,18 +50,18 @@ pipeline { extensions: [ [$class: 'CleanBeforeCheckout'], [$class: 'CloneOption', - depth: 0, - noTags: false, - reference: "${REPO_ROOT}/samba_fw_releases", - shallow: true, - timeout: 60 - ], + depth: 0, + noTags: false, + reference: "${REPO_ROOT}/samba_fw_releases", + shallow: true, + timeout: 60 + ], [$class: 'CheckoutOption', - timeout: 60 - ], + timeout: 60 + ], [$class: 'RelativeTargetDirectory', - relativeTargetDir: 'samba_fw' - ] + relativeTargetDir: 'samba_fw' + ] ], submoduleCfg: [ ], @@ -76,18 +77,18 @@ pipeline { extensions: [ [$class: 'CleanBeforeCheckout'], [$class: 'CloneOption', - depth: 0, - noTags: false, - reference: "${REPO_ROOT}/HMB_XR_1003_Embeddded_Logic.git", - shallow: true, - timeout: 60 - ], + depth: 0, + noTags: false, + reference: "${REPO_ROOT}/HMB_XR_1003_Embeddded_Logic.git", + shallow: true, + timeout: 60 + ], [$class: 'CheckoutOption', - timeout: 60 - ], + timeout: 60 + ], [$class: 'RelativeTargetDirectory', - relativeTargetDir: 'xr1003_el' - ] + relativeTargetDir: 'xr1003_el' + ] ], submoduleCfg: [ ], @@ -103,17 +104,17 @@ pipeline { extensions: [ [$class: 'CleanBeforeCheckout'], [$class: 'CloneOption', - noTags: false, - reference: "${REPO_ROOT}/ver_stamping_releases", - shallow: true, - timeout: 60 - ], + noTags: false, + reference: "${REPO_ROOT}/ver_stamping_releases", + shallow: true, + timeout: 60 + ], [$class: 'CheckoutOption', - timeout: 60 - ], + timeout: 60 + ], [$class: 'RelativeTargetDirectory', - relativeTargetDir: 'ver_stamping' - ] + relativeTargetDir: 'ver_stamping' + ] ], submoduleCfg: [], userRemoteConfigs: [ @@ -128,17 +129,17 @@ pipeline { extensions: [ [$class: 'CleanBeforeCheckout'], [$class: 'CloneOption', - noTags: false, - reference: "${REPO_ROOT}/print_release_difference", - shallow: true, - timeout: 60 - ], + noTags: false, + reference: "${REPO_ROOT}/print_release_difference", + shallow: true, + timeout: 60 + ], [$class: 'CheckoutOption', - timeout: 60 - ], + timeout: 60 + ], [$class: 'RelativeTargetDirectory', - relativeTargetDir: 'print_release_difference' - ] + relativeTargetDir: 'print_release_difference' + ] ], submoduleCfg: [ ], @@ -256,17 +257,17 @@ pipeline { stage('Scan for warnings') { steps { warnings canComputeNew: false, - canResolveRelativePaths: false, - categoriesPattern: '', - consoleParsers: [ - [parserName: 'MSBuild'] - ], - defaultEncoding: '', - excludePattern: '', - healthy: '', - includePattern: '', - messagesPattern: '', - unHealthy: '' + canResolveRelativePaths: false, + categoriesPattern: '', + consoleParsers: [ + [parserName: 'MSBuild'] + ], + defaultEncoding: '', + excludePattern: '', + healthy: '', + includePattern: '', + messagesPattern: '', + unHealthy: '' } } stage('Archiving artifacts') { @@ -276,16 +277,16 @@ pipeline { } } post { - always { + always { echo 'Post-build' - } - failure { + } + failure { echo 'Failed build' - step([$class: 'LogParserPublisher', - parsingRulesPath: 'GitRepository/autobuild/build/log parsing rules/vs.txt', - useProjectRule: true - ]) - } + step([$class: 'LogParserPublisher', + parsingRulesPath: 'GitRepository/autobuild/build/log parsing rules/vs.txt', + useProjectRule: true + ]) + } success { echo 'Succeeded build' } From 3f2f2851681b8aa77c4cac08e1dd5593ec6e4ab7 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 28 Nov 2017 17:04:43 +0000 Subject: [PATCH 013/122] Directory filtering doesn't seem to be working - resulting in no build triggers - so removing it --- build/build.gsh | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/build/build.gsh b/build/build.gsh index a398a96..1051f40 100644 --- a/build/build.gsh +++ b/build/build.gsh @@ -14,23 +14,18 @@ pipeline { extensions: [ [$class: 'CleanBeforeCheckout'], [$class: 'CloneOption', - depth: 0, - noTags: false, - reference: "${REPO_ROOT}/newsw", - shallow: false, - timeout: 60 - ], + depth: 0, + noTags: false, + reference: "${REPO_ROOT}/newsw", + shallow: false, + timeout: 60 + ], [$class: 'CheckoutOption', - timeout: 60 - ], + timeout: 60 + ], [$class: 'RelativeTargetDirectory', - relativeTargetDir: 'GitRepository' - ], - [$class: 'PathRestriction', - excludedRegions: '', - includedRegions: '''src/.* - autobuild/.*''' - ] + relativeTargetDir: 'GitRepository' + ], ], submoduleCfg: [ ], From 20dd451bc8bc4f36957147469141f0c50d5fb7ed Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 28 Nov 2017 20:59:01 +0000 Subject: [PATCH 014/122] Add a second test file --- README2.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 README2.md diff --git a/README2.md b/README2.md new file mode 100644 index 0000000..e69de29 From f671337ae8d333c94ee648d85d53ab91e64be610 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 28 Nov 2017 21:00:04 +0000 Subject: [PATCH 015/122] Merge commit '20dd451bc8bc4f36957147469141f0c50d5fb7ed' --- README2.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 README2.md diff --git a/README2.md b/README2.md new file mode 100644 index 0000000..e69de29 From 18be423194cddea3e9f72ae71dccca2d817f316e Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 28 Nov 2017 21:35:34 +0000 Subject: [PATCH 016/122] Add a test groovy script --- test.gsh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test.gsh diff --git a/test.gsh b/test.gsh new file mode 100644 index 0000000..a38bfaf --- /dev/null +++ b/test.gsh @@ -0,0 +1,6 @@ +// Methods in this file will end up as object methods on the object that load returns. +def lookAtThis(String whoAreYou) { + echo "Look at this, ${whoAreYou}! You loaded this from another file!" +} + +return this; From a9b77d0d121b0c27ea7e50458b040df820c15fd0 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 28 Nov 2017 21:35:34 +0000 Subject: [PATCH 017/122] Add a test groovy script --- test.gsh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test.gsh diff --git a/test.gsh b/test.gsh new file mode 100644 index 0000000..a38bfaf --- /dev/null +++ b/test.gsh @@ -0,0 +1,6 @@ +// Methods in this file will end up as object methods on the object that load returns. +def lookAtThis(String whoAreYou) { + echo "Look at this, ${whoAreYou}! You loaded this from another file!" +} + +return this; From 51b4b03be8bc3eb71be393c527a34e7819766023 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 28 Nov 2017 21:57:56 +0000 Subject: [PATCH 018/122] Add a test groovy script --- test.gsh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test.gsh diff --git a/test.gsh b/test.gsh new file mode 100644 index 0000000..23fcfc0 --- /dev/null +++ b/test.gsh @@ -0,0 +1,7 @@ +// Methods in this file will end up as object methods on the object that load returns. +def lookAtThis(String whoAreYou) { + echo "Look at this, ${whoAreYou}! You loaded this from another file!" +} + +return this; + From 61a6840f7c6de1def6be97283bd131c934af4a8b Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 28 Nov 2017 23:58:55 +0000 Subject: [PATCH 019/122] Start of versioning script --- versionnumbering/versioninfo.gsh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 versionnumbering/versioninfo.gsh diff --git a/versionnumbering/versioninfo.gsh b/versionnumbering/versioninfo.gsh new file mode 100644 index 0000000..579b976 --- /dev/null +++ b/versionnumbering/versioninfo.gsh @@ -0,0 +1,29 @@ +// Methods in this file will end up as object methods on the object that load returns. + +def makeVersionFolder(String versionFolder) { + dir("${versionFolder}") { + + + + + + + +def generateVersionFiles(String versionFolder, + Integer BaseGitNumber, + String SrcFolder, + String SrcBranch) { + echo """Building version folder at: ${versionFolder} + base git number: ${BaseGitNumber} + source folder: ${SrcFolder} + source branch: ${SrcBranch}""" + + dir + + + +def lookAtThis(String whoAreYou) { + echo "Look at this, ${whoAreYou}! You loaded this from another file!" +} + +return this; From 76339b9b91f4bc895e05dd134f5234c389456a4f Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 28 Nov 2017 23:58:55 +0000 Subject: [PATCH 020/122] Start of versioning script --- versionnumbering/versioninfo.gsh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 versionnumbering/versioninfo.gsh diff --git a/versionnumbering/versioninfo.gsh b/versionnumbering/versioninfo.gsh new file mode 100644 index 0000000..579b976 --- /dev/null +++ b/versionnumbering/versioninfo.gsh @@ -0,0 +1,29 @@ +// Methods in this file will end up as object methods on the object that load returns. + +def makeVersionFolder(String versionFolder) { + dir("${versionFolder}") { + + + + + + + +def generateVersionFiles(String versionFolder, + Integer BaseGitNumber, + String SrcFolder, + String SrcBranch) { + echo """Building version folder at: ${versionFolder} + base git number: ${BaseGitNumber} + source folder: ${SrcFolder} + source branch: ${SrcBranch}""" + + dir + + + +def lookAtThis(String whoAreYou) { + echo "Look at this, ${whoAreYou}! You loaded this from another file!" +} + +return this; From 9f307dd502323554587e129f7235eccfe2ea8970 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 30 Nov 2017 18:25:01 +0000 Subject: [PATCH 021/122] Add python script and eclipse project files for version numbering --- .project | 17 +++ .pydevproject | 8 ++ versionnumbering/versioninfo.py | 192 ++++++++++++++++++++++++++++++++ 3 files changed, 217 insertions(+) create mode 100644 .project create mode 100644 .pydevproject create mode 100644 versionnumbering/versioninfo.py diff --git a/.project b/.project new file mode 100644 index 0000000..e329c3f --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + Common Build Scripts + + + + + + org.python.pydev.PyDevBuilder + + + + + + org.python.pydev.pythonNature + + diff --git a/.pydevproject b/.pydevproject new file mode 100644 index 0000000..d111c07 --- /dev/null +++ b/.pydevproject @@ -0,0 +1,8 @@ + + + +/${PROJECT_DIR_NAME} + +python interpreter +python35 + diff --git a/versionnumbering/versioninfo.py b/versionnumbering/versioninfo.py new file mode 100644 index 0000000..0567097 --- /dev/null +++ b/versionnumbering/versioninfo.py @@ -0,0 +1,192 @@ +# encoding: utf-8 +''' +versionnumbering -- shortdesc + +versionnumbering generates a version folder with a common set of version information files in it + +@author: dan + +@copyright: 2017 Global Inkjet Systems Ltd. All rights reserved. +''' +import os +import sys +import shutil +import subprocess + +from argparse import ArgumentParser +from argparse import RawDescriptionHelpFormatter + +__all__ = [] +__version__ = 0.1 +__date__ = '2017-11-29' +__updated__ = '2017-11-29' + +def resetFolder(versionfolder): + print("Removing folders and contents of: {0}".format(versionfolder)) + try: + shutil.rmtree(versionfolder) + except FileNotFoundError: + pass + + print("Creating folder: {0}".format(versionfolder)) + os.makedirs(versionfolder) + +def getGitRevision(gitrootpath, basenumber): + cwd = os.getcwd() + + path = os.path.expanduser(gitrootpath) + print("Changing current working directory to: {0}".format(path)) + os.chdir(path) + + gitvar = "GIT_EXECUTABLE" + if gitvar in os.environ and os.environ[gitvar]: + gitexecutable = os.environ[gitvar] + else: + print("Expecting GIT_EXECUTABLE environment variable to have path to git. Defaulting to 'git'") + gitexecutable = "git" + + print("Determining revision info using git command: {0}".format(gitexecutable)) + completed = subprocess.run([gitexecutable, "rev-list", "HEAD", "--count"], stdout=subprocess.PIPE) + print("Command {0} returned: {1}".format(completed.args, completed.returncode)) + changecount = completed.stdout.decode("utf-8").strip() + print("Change count: {0}".format(changecount)) + adjustedchangecount = int(changecount) + int(basenumber) + print("Adjusted change count: {0}".format(adjustedchangecount)) + + print("Determining current revision info using git command: {0}".format(gitexecutable)) + completed = subprocess.run([gitexecutable, "rev-parse", "HEAD"], stdout=subprocess.PIPE) + print("Command {0} returned: {1}".format(completed.args, completed.returncode)) + revision = completed.stdout.decode("utf-8").strip() + print("Revision: {0}".format(revision)) + + os.chdir(cwd) + print("Restored current working directory to: {0}".format(cwd)) + + return (adjustedchangecount, revision) + +def getVersionPrefix(sourcebranch): + print("Determining version number prefix from source branch name: {0}".format(sourcebranch)) + + defaultversionprefix = "1.30000.0" + splits = sourcebranch.split('/') + if len(splits) < 1: + print("Source branch name is invalid. Defaulting to: {0}".format(defaultversionprefix)) + return defaultversionprefix + + sourcebranch = splits[-1] + + if sourcebranch.lower().endswith("master"): # Special case + return "1.20000.0." + + splits = sourcebranch.split('.') + versionprefix = "" + if len(splits) < 1: + print("This source branch name has no decimal points in its name so defaulting to: {0}".format(defaultversionprefix)) + versionprefix = defaultversionprefix + else: + splitnumbercount = 0 + for split in splits: + if split.isdigit(): + versionprefix += split + "." + splitnumbercount += 1 + else: + break + if splitnumbercount > 2: + break + if splitnumbercount == 0: + print("No leading numbers were found in source branch name so defaulting to: {0}".format(defaultversionprefix)) + versionprefix = defaultversionprefix + elif splitnumbercount == 1: + versionprefix += "0.0." + elif splitnumbercount == 2: + versionprefix += "0." + + print("Determined version prefix to be: {0}".format(versionprefix)) + return versionprefix + +def writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevision, buildnumber, buildstamp): + with open(os.path.join(versionfolder, "buildjobname.txt"), 'w') as f: + f.write(buildjobname) + + with open(os.path.join(versionfolder, "prefix.txt"), 'w') as f: + f.write(versionprefix) + + with open(os.path.join(versionfolder, "revision.txt"), 'w') as f: + f.write(gitrevision) + + with open(os.path.join(versionfolder, "buildnumber.txt"), 'w') as f: + f.write(buildnumber) + + with open(os.path.join(versionfolder, "buildstamp.txt"), 'w') as f: + f.write(buildstamp) + +def main(argv=None): # IGNORE:C0111 + '''Command line options.''' + + if argv is None: + argv = sys.argv + else: + sys.argv.extend(argv) + + program_name = os.path.basename(sys.argv[0]) + program_version = "v%s" % __version__ + program_build_date = str(__updated__) + program_version_message = '%%(prog)s %s (%s)' % (program_version, program_build_date) + program_shortdesc = __import__('__main__').__doc__.split("\n")[1] + program_license = '''%s + + Created by dan on %s. + Copyright 2017 Global Inkjet Systems Ltd. All rights reserved. + + Distributed on an "AS IS" basis without warranties + or conditions of any kind, either express or implied. + +USAGE +''' % (program_shortdesc, str(__date__)) + + try: + # Setup argument parser + parser = ArgumentParser(description=program_license, formatter_class=RawDescriptionHelpFormatter) + parser.add_argument("-s", "--sourcebranch", dest="sourcebranch", action="store", default="origin/master", help="source branch name to discover version number [default: %(default)s]") + parser.add_argument("-v", "--versionfolder", dest="versionfolder", action="store", default="version", help="version folder to be created [default: %(default)s]") + parser.add_argument("-g", "--gitroot", dest="gitrootfolder", action="store", default="GitRepository", help="root path of source files [default: %(default)s]") + parser.add_argument("-b", "--baseversionnumber", dest="baseversionnumber", action="store", default=int(1000), help="base git version number [default: %(default)s]") + parser.add_argument("-j", "--buildjobname", dest="buildjobname", action="store", default="-", help="build job name [default: %(default)s]") + parser.add_argument("-n", "--buildnumber", dest="buildnumber", action="store", default="1", help="build number [default: %(default)s]") + + # Process arguments + args = parser.parse_args() + + sourcebranch = args.sourcebranch + versionfolder = args.versionfolder + gitrootfolder = args.gitrootfolder + baseversionnumber = args.baseversionnumber + buildjobname = args.buildjobname + buildnumber = args.buildnumber + + print("Source branch:", sourcebranch, "version folder:", versionfolder, "Git root:", gitrootfolder) + print("Base version number:", baseversionnumber, "Build job name:", buildjobname, "Build number:", buildnumber) + + resetFolder(versionfolder) + + (gitrevisioncount, gitrevision) = getGitRevision(gitrootfolder, baseversionnumber) + + versionprefix = getVersionPrefix(sourcebranch) + + buildstamp = versionprefix + str(gitrevisioncount) + print("Build stamp is: {0}".format(buildstamp)) + + writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevision, buildnumber, buildstamp) + + return 0 + except Exception as e: + print("Error while creating version info:", e.__repr__()) + return 1 + except Exception as e: + indent = len(program_name) * " " + print(program_name + ": " + repr(e) + "\n") + print(indent + " for help use --help") + return 2 + +if __name__ == "__main__": + sys.exit(main()) From a63889509d3e7ba0961051d2618bba51840deb8f Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 30 Nov 2017 18:25:01 +0000 Subject: [PATCH 022/122] Add python script and eclipse project files for version numbering --- .project | 17 +++ .pydevproject | 8 ++ versionnumbering/versioninfo.py | 192 ++++++++++++++++++++++++++++++++ 3 files changed, 217 insertions(+) create mode 100644 .project create mode 100644 .pydevproject create mode 100644 versionnumbering/versioninfo.py diff --git a/.project b/.project new file mode 100644 index 0000000..e329c3f --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + Common Build Scripts + + + + + + org.python.pydev.PyDevBuilder + + + + + + org.python.pydev.pythonNature + + diff --git a/.pydevproject b/.pydevproject new file mode 100644 index 0000000..d111c07 --- /dev/null +++ b/.pydevproject @@ -0,0 +1,8 @@ + + + +/${PROJECT_DIR_NAME} + +python interpreter +python35 + diff --git a/versionnumbering/versioninfo.py b/versionnumbering/versioninfo.py new file mode 100644 index 0000000..0567097 --- /dev/null +++ b/versionnumbering/versioninfo.py @@ -0,0 +1,192 @@ +# encoding: utf-8 +''' +versionnumbering -- shortdesc + +versionnumbering generates a version folder with a common set of version information files in it + +@author: dan + +@copyright: 2017 Global Inkjet Systems Ltd. All rights reserved. +''' +import os +import sys +import shutil +import subprocess + +from argparse import ArgumentParser +from argparse import RawDescriptionHelpFormatter + +__all__ = [] +__version__ = 0.1 +__date__ = '2017-11-29' +__updated__ = '2017-11-29' + +def resetFolder(versionfolder): + print("Removing folders and contents of: {0}".format(versionfolder)) + try: + shutil.rmtree(versionfolder) + except FileNotFoundError: + pass + + print("Creating folder: {0}".format(versionfolder)) + os.makedirs(versionfolder) + +def getGitRevision(gitrootpath, basenumber): + cwd = os.getcwd() + + path = os.path.expanduser(gitrootpath) + print("Changing current working directory to: {0}".format(path)) + os.chdir(path) + + gitvar = "GIT_EXECUTABLE" + if gitvar in os.environ and os.environ[gitvar]: + gitexecutable = os.environ[gitvar] + else: + print("Expecting GIT_EXECUTABLE environment variable to have path to git. Defaulting to 'git'") + gitexecutable = "git" + + print("Determining revision info using git command: {0}".format(gitexecutable)) + completed = subprocess.run([gitexecutable, "rev-list", "HEAD", "--count"], stdout=subprocess.PIPE) + print("Command {0} returned: {1}".format(completed.args, completed.returncode)) + changecount = completed.stdout.decode("utf-8").strip() + print("Change count: {0}".format(changecount)) + adjustedchangecount = int(changecount) + int(basenumber) + print("Adjusted change count: {0}".format(adjustedchangecount)) + + print("Determining current revision info using git command: {0}".format(gitexecutable)) + completed = subprocess.run([gitexecutable, "rev-parse", "HEAD"], stdout=subprocess.PIPE) + print("Command {0} returned: {1}".format(completed.args, completed.returncode)) + revision = completed.stdout.decode("utf-8").strip() + print("Revision: {0}".format(revision)) + + os.chdir(cwd) + print("Restored current working directory to: {0}".format(cwd)) + + return (adjustedchangecount, revision) + +def getVersionPrefix(sourcebranch): + print("Determining version number prefix from source branch name: {0}".format(sourcebranch)) + + defaultversionprefix = "1.30000.0" + splits = sourcebranch.split('/') + if len(splits) < 1: + print("Source branch name is invalid. Defaulting to: {0}".format(defaultversionprefix)) + return defaultversionprefix + + sourcebranch = splits[-1] + + if sourcebranch.lower().endswith("master"): # Special case + return "1.20000.0." + + splits = sourcebranch.split('.') + versionprefix = "" + if len(splits) < 1: + print("This source branch name has no decimal points in its name so defaulting to: {0}".format(defaultversionprefix)) + versionprefix = defaultversionprefix + else: + splitnumbercount = 0 + for split in splits: + if split.isdigit(): + versionprefix += split + "." + splitnumbercount += 1 + else: + break + if splitnumbercount > 2: + break + if splitnumbercount == 0: + print("No leading numbers were found in source branch name so defaulting to: {0}".format(defaultversionprefix)) + versionprefix = defaultversionprefix + elif splitnumbercount == 1: + versionprefix += "0.0." + elif splitnumbercount == 2: + versionprefix += "0." + + print("Determined version prefix to be: {0}".format(versionprefix)) + return versionprefix + +def writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevision, buildnumber, buildstamp): + with open(os.path.join(versionfolder, "buildjobname.txt"), 'w') as f: + f.write(buildjobname) + + with open(os.path.join(versionfolder, "prefix.txt"), 'w') as f: + f.write(versionprefix) + + with open(os.path.join(versionfolder, "revision.txt"), 'w') as f: + f.write(gitrevision) + + with open(os.path.join(versionfolder, "buildnumber.txt"), 'w') as f: + f.write(buildnumber) + + with open(os.path.join(versionfolder, "buildstamp.txt"), 'w') as f: + f.write(buildstamp) + +def main(argv=None): # IGNORE:C0111 + '''Command line options.''' + + if argv is None: + argv = sys.argv + else: + sys.argv.extend(argv) + + program_name = os.path.basename(sys.argv[0]) + program_version = "v%s" % __version__ + program_build_date = str(__updated__) + program_version_message = '%%(prog)s %s (%s)' % (program_version, program_build_date) + program_shortdesc = __import__('__main__').__doc__.split("\n")[1] + program_license = '''%s + + Created by dan on %s. + Copyright 2017 Global Inkjet Systems Ltd. All rights reserved. + + Distributed on an "AS IS" basis without warranties + or conditions of any kind, either express or implied. + +USAGE +''' % (program_shortdesc, str(__date__)) + + try: + # Setup argument parser + parser = ArgumentParser(description=program_license, formatter_class=RawDescriptionHelpFormatter) + parser.add_argument("-s", "--sourcebranch", dest="sourcebranch", action="store", default="origin/master", help="source branch name to discover version number [default: %(default)s]") + parser.add_argument("-v", "--versionfolder", dest="versionfolder", action="store", default="version", help="version folder to be created [default: %(default)s]") + parser.add_argument("-g", "--gitroot", dest="gitrootfolder", action="store", default="GitRepository", help="root path of source files [default: %(default)s]") + parser.add_argument("-b", "--baseversionnumber", dest="baseversionnumber", action="store", default=int(1000), help="base git version number [default: %(default)s]") + parser.add_argument("-j", "--buildjobname", dest="buildjobname", action="store", default="-", help="build job name [default: %(default)s]") + parser.add_argument("-n", "--buildnumber", dest="buildnumber", action="store", default="1", help="build number [default: %(default)s]") + + # Process arguments + args = parser.parse_args() + + sourcebranch = args.sourcebranch + versionfolder = args.versionfolder + gitrootfolder = args.gitrootfolder + baseversionnumber = args.baseversionnumber + buildjobname = args.buildjobname + buildnumber = args.buildnumber + + print("Source branch:", sourcebranch, "version folder:", versionfolder, "Git root:", gitrootfolder) + print("Base version number:", baseversionnumber, "Build job name:", buildjobname, "Build number:", buildnumber) + + resetFolder(versionfolder) + + (gitrevisioncount, gitrevision) = getGitRevision(gitrootfolder, baseversionnumber) + + versionprefix = getVersionPrefix(sourcebranch) + + buildstamp = versionprefix + str(gitrevisioncount) + print("Build stamp is: {0}".format(buildstamp)) + + writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevision, buildnumber, buildstamp) + + return 0 + except Exception as e: + print("Error while creating version info:", e.__repr__()) + return 1 + except Exception as e: + indent = len(program_name) * " " + print(program_name + ": " + repr(e) + "\n") + print(indent + " for help use --help") + return 2 + +if __name__ == "__main__": + sys.exit(main()) From 93caaec49afb99a61b6f324212cb24f557eb5c48 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 30 Nov 2017 18:39:49 +0000 Subject: [PATCH 023/122] Remove redundant file --- versionnumbering/versioninfo.gsh | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 versionnumbering/versioninfo.gsh diff --git a/versionnumbering/versioninfo.gsh b/versionnumbering/versioninfo.gsh deleted file mode 100644 index 579b976..0000000 --- a/versionnumbering/versioninfo.gsh +++ /dev/null @@ -1,29 +0,0 @@ -// Methods in this file will end up as object methods on the object that load returns. - -def makeVersionFolder(String versionFolder) { - dir("${versionFolder}") { - - - - - - - -def generateVersionFiles(String versionFolder, - Integer BaseGitNumber, - String SrcFolder, - String SrcBranch) { - echo """Building version folder at: ${versionFolder} - base git number: ${BaseGitNumber} - source folder: ${SrcFolder} - source branch: ${SrcBranch}""" - - dir - - - -def lookAtThis(String whoAreYou) { - echo "Look at this, ${whoAreYou}! You loaded this from another file!" -} - -return this; From 7a553a6f9e8c038fbe15120191b0969216e2aee4 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 30 Nov 2017 18:39:49 +0000 Subject: [PATCH 024/122] Remove redundant file --- versionnumbering/versioninfo.gsh | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 versionnumbering/versioninfo.gsh diff --git a/versionnumbering/versioninfo.gsh b/versionnumbering/versioninfo.gsh deleted file mode 100644 index 579b976..0000000 --- a/versionnumbering/versioninfo.gsh +++ /dev/null @@ -1,29 +0,0 @@ -// Methods in this file will end up as object methods on the object that load returns. - -def makeVersionFolder(String versionFolder) { - dir("${versionFolder}") { - - - - - - - -def generateVersionFiles(String versionFolder, - Integer BaseGitNumber, - String SrcFolder, - String SrcBranch) { - echo """Building version folder at: ${versionFolder} - base git number: ${BaseGitNumber} - source folder: ${SrcFolder} - source branch: ${SrcBranch}""" - - dir - - - -def lookAtThis(String whoAreYou) { - echo "Look at this, ${whoAreYou}! You loaded this from another file!" -} - -return this; From d347fd921fc36354143f48b49434f89090d500ad Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 1 Dec 2017 17:03:09 +0000 Subject: [PATCH 025/122] Output git remote info into version folder --- versionnumbering/versioninfo.py | 51 ++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/versionnumbering/versioninfo.py b/versionnumbering/versioninfo.py index 0567097..35e91cd 100644 --- a/versionnumbering/versioninfo.py +++ b/versionnumbering/versioninfo.py @@ -59,10 +59,16 @@ def getGitRevision(gitrootpath, basenumber): revision = completed.stdout.decode("utf-8").strip() print("Revision: {0}".format(revision)) + print("Determining remote info using git command: {0}".format(gitexecutable)) + completed = subprocess.run([gitexecutable, "remote", "show", "origin"], stdout=subprocess.PIPE) + print("Command {0} returned: {1}".format(completed.args, completed.returncode)) + remoteinfo = completed.stdout.decode("utf-8") + print("Remote info: {0}".format(remoteinfo)) + os.chdir(cwd) print("Restored current working directory to: {0}".format(cwd)) - return (adjustedchangecount, revision) + return (adjustedchangecount, revision, remoteinfo) def getVersionPrefix(sourcebranch): print("Determining version number prefix from source branch name: {0}".format(sourcebranch)) @@ -104,7 +110,7 @@ def getVersionPrefix(sourcebranch): print("Determined version prefix to be: {0}".format(versionprefix)) return versionprefix -def writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevision, buildnumber, buildstamp): +def writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevision, remoteinfo, buildnumber, buildstamp): with open(os.path.join(versionfolder, "buildjobname.txt"), 'w') as f: f.write(buildjobname) @@ -114,6 +120,9 @@ def writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevision, b with open(os.path.join(versionfolder, "revision.txt"), 'w') as f: f.write(gitrevision) + with open(os.path.join(versionfolder, "remoteinfo.txt"), 'w') as f: + f.write(remoteinfo) + with open(os.path.join(versionfolder, "buildnumber.txt"), 'w') as f: f.write(buildnumber) @@ -157,31 +166,33 @@ USAGE # Process arguments args = parser.parse_args() - sourcebranch = args.sourcebranch - versionfolder = args.versionfolder - gitrootfolder = args.gitrootfolder - baseversionnumber = args.baseversionnumber - buildjobname = args.buildjobname - buildnumber = args.buildnumber + try: + sourcebranch = args.sourcebranch + versionfolder = args.versionfolder + gitrootfolder = args.gitrootfolder + baseversionnumber = args.baseversionnumber + buildjobname = args.buildjobname + buildnumber = args.buildnumber - print("Source branch:", sourcebranch, "version folder:", versionfolder, "Git root:", gitrootfolder) - print("Base version number:", baseversionnumber, "Build job name:", buildjobname, "Build number:", buildnumber) + print("Source branch:", sourcebranch, "version folder:", versionfolder, "Git root:", gitrootfolder) + print("Base version number:", baseversionnumber, "Build job name:", buildjobname, "Build number:", buildnumber) - resetFolder(versionfolder) + resetFolder(versionfolder) - (gitrevisioncount, gitrevision) = getGitRevision(gitrootfolder, baseversionnumber) + (gitrevisioncount, gitrevision, remoteinfo) = getGitRevision(gitrootfolder, baseversionnumber) - versionprefix = getVersionPrefix(sourcebranch) + versionprefix = getVersionPrefix(sourcebranch) - buildstamp = versionprefix + str(gitrevisioncount) - print("Build stamp is: {0}".format(buildstamp)) + buildstamp = versionprefix + str(gitrevisioncount) + print("Build stamp is: {0}".format(buildstamp)) - writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevision, buildnumber, buildstamp) + writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevision, remoteinfo, buildnumber, buildstamp) + + return 0 + except Exception as e: + print("Error while creating version info:", e.__repr__()) + return 1 - return 0 - except Exception as e: - print("Error while creating version info:", e.__repr__()) - return 1 except Exception as e: indent = len(program_name) * " " print(program_name + ": " + repr(e) + "\n") From d33f6828a4e6a95abcaf4884b0d14ea9b1fad018 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 2 Dec 2017 10:43:53 +0000 Subject: [PATCH 026/122] Add differences folder --- differences/.project | 17 +++ differences/.pydevproject | 8 ++ differences/show_release_differences.py | 151 ++++++++++++++++++++++++ 3 files changed, 176 insertions(+) create mode 100644 differences/.project create mode 100644 differences/.pydevproject create mode 100644 differences/show_release_differences.py diff --git a/differences/.project b/differences/.project new file mode 100644 index 0000000..75af0fc --- /dev/null +++ b/differences/.project @@ -0,0 +1,17 @@ + + + Release_difference + + + + + + org.python.pydev.PyDevBuilder + + + + + + org.python.pydev.pythonNature + + diff --git a/differences/.pydevproject b/differences/.pydevproject new file mode 100644 index 0000000..c3434da --- /dev/null +++ b/differences/.pydevproject @@ -0,0 +1,8 @@ + + + +/${PROJECT_DIR_NAME} + +python 3.0 +Default + diff --git a/differences/show_release_differences.py b/differences/show_release_differences.py new file mode 100644 index 0000000..1d525b9 --- /dev/null +++ b/differences/show_release_differences.py @@ -0,0 +1,151 @@ +''' +Created on 2 Mar 2017 + +@author: Dan +''' +import subprocess +import os +import sys +import re + +GIT_EXECUTABLE = os.getenv("GIT_EXECUTABLE") +if GIT_EXECUTABLE == None: + print("Please define the GIT_EXECUTABLE environment variable to the git executable path") + sys.exit(1) + +WORKING_PATH = os.getenv("WORKING_PATH") +if WORKING_PATH == None: + print("Please define the WORKING_PATH environment variable to the git repository path to use") + sys.exit(1) + +CURRENT_RELEASE = os.getenv("CURRENT_RELEASE") +if CURRENT_RELEASE == None: + print("Please define the CURRENT_RELEASE version") + sys.exit(1) + +PREVIOUS_RELEASE = os.getenv("PREVIOUS_RELEASE") +if PREVIOUS_RELEASE == None: + print("Please define the PREVIOUS_RELEASE version") + sys.exit(1) + +DIFFERENCE_OPTIONS = os.getenv("DIFFERENCE_OPTIONS") +if DIFFERENCE_OPTIONS == None: + DIFFERENCE_OPTIONS = "" + +class GitException(Exception): + def __init__(self, message): + self.message = message + + def __repr__(self): + return self.message + +def printDivider(times = 1, length = 100): + for _ in range(times): + print("*" * length) + +TABSIZE = 4 +def printTabbed(string, tabs = 0): + print("{0}{1}".format(" " * (TABSIZE * tabs), string)) + +def getGitLogDifferences(workingPath, previousRelease, currentRelease, tripledot = False): + gitExecutable = GIT_EXECUTABLE + if tripledot: + releaseExpression = previousRelease + "..." + currentRelease + else: + releaseExpression = previousRelease + ".." + currentRelease + currentdir = os.getcwd() + os.chdir(workingPath) + gitlog = [] + printTabbed("Executing: {0} {1} {2} {3}".format(gitExecutable, "log", "--oneline", releaseExpression)) + proc = subprocess.Popen([gitExecutable, "log", "--oneline", releaseExpression], stdout=subprocess.PIPE) + while True: + line = proc.stdout.readline() + if line: + linestring = line.decode('utf-8').rstrip() + gitlog.append(linestring) + #printTabbed(linestring, 1) + else: + break + proc.wait() + if proc.returncode > 0: + raise GitException("Git executable returned an error") + os.chdir(currentdir) + return gitlog + +expectedpattern = re.compile("^.* +(?:[gG][iI][sS][ _-]*|[tT]rac \#*|\#\s*)(\d+):*(.*)$") +revertpattern = re.compile('^(\S*) Revert " *GIS-(\d+):* (.*)"$') +mergepattern = re.compile("^(.*)((?:Merge branch '.*'|Merge remote-tracking branch '.*'|Merge commit '.*'|Add '.*' from commit).*)$") + +def processLog(gitlog): + reverts = [] + merges = {} + other = [] + numbered = {} + for line in gitlog: + expectedmatch = expectedpattern.match(line) + revertmatch = revertpattern.match(line) + mergematch = mergepattern.match(line) + if expectedmatch == None and revertmatch == None and mergematch == None: + other.append(line) + if revertmatch: + gisnumber = "GIS-" + revertmatch.group(2) + description = revertmatch.group(3) + reverts.append("Revert: {0} {1}".format(gisnumber, description)) + if mergematch: + merge = mergematch.group(2) + if not merge in merges: + merges[merge] = 1 + else: + merges[merge] += 1 + if expectedmatch: + gisnumber = "GIS-" + expectedmatch.group(1) + description = expectedmatch.group(2) + if not gisnumber in numbered: + numbered[gisnumber] = [] + numbered[gisnumber].append(description) + return (reverts, merges, other, numbered) + +def showDifferences(differences): + (revertslog, mergeslog, otherlog, numberedlog) = differences + printDivider() + printTabbed("GIS-Numbers Log:") + for (gisnumber, descriptions) in sorted(numberedlog.items()): + printTabbed(gisnumber, 1) + descriptions = numberedlog[gisnumber]; + for description in descriptions: + printTabbed(description, 2) + printDivider() + printTabbed("Revert log:") + for reversion in sorted(revertslog): + printTabbed(reversion, 1) + printDivider() + printTabbed("Merges log:") + for merge in sorted(mergeslog): + printTabbed(merge, 1) + printDivider() + printTabbed("Other log:") + for other in sorted(otherlog): + printTabbed(other, 1) + +def main(): + workingPath = WORKING_PATH + previous = PREVIOUS_RELEASE + now = CURRENT_RELEASE + printDivider(times = 4) + printTabbed("Looking for changes in {2} that are not in {1} of the repository at path: {0}".format(workingPath, previous, now)) + gitlog = getGitLogDifferences(workingPath, previous, now) + showDifferences(processLog(gitlog)) + if 'opposite' in DIFFERENCE_OPTIONS.lower(): + printDivider(times = 4) + printTabbed("Looking for changes in {2} that are not in {1} of the repository at path: {0}".format(workingPath, now, previous)) + gitlog = getGitLogDifferences(workingPath, now, previous) + showDifferences(processLog(gitlog)) + if 'notcommon' in DIFFERENCE_OPTIONS.lower(): + printDivider(times = 4) + printTabbed("Looking for changes that are not common to {1} or {2} at path: {0}".format(workingPath, now, previous)) + gitlog = getGitLogDifferences(workingPath, now, previous, tripledot = True) + showDifferences(processLog(gitlog)) + sys.exit(0) + +if __name__ == '__main__': + main() \ No newline at end of file From e58acae19d89d804ca1bfc9b9426fe91d7f9f010 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 2 Dec 2017 21:46:11 +0000 Subject: [PATCH 027/122] Tested version of differences generation --- .settings/org.eclipse.core.resources.prefs | 2 + differences/show_release_differences.py | 207 ++++++++++++------- version/differences.txt | 230 +++++++++++++++++++++ versionnumbering/versioninfo.py | 21 +- 4 files changed, 375 insertions(+), 85 deletions(-) create mode 100644 .settings/org.eclipse.core.resources.prefs create mode 100644 version/differences.txt diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..1174a06 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding//versionnumbering/versioninfo.py=utf-8 diff --git a/differences/show_release_differences.py b/differences/show_release_differences.py index 1d525b9..a778892 100644 --- a/differences/show_release_differences.py +++ b/differences/show_release_differences.py @@ -1,36 +1,26 @@ ''' -Created on 2 Mar 2017 +showreleasedifferences -- shortdesc -@author: Dan +showreleasedifferences generates a version folder with a common set of version information files in it + +@author: dan + +@copyright: 2017 Global Inkjet Systems Ltd. All rights reserved. ''' import subprocess import os import sys import re -GIT_EXECUTABLE = os.getenv("GIT_EXECUTABLE") -if GIT_EXECUTABLE == None: - print("Please define the GIT_EXECUTABLE environment variable to the git executable path") - sys.exit(1) +from argparse import ArgumentParser +from argparse import RawDescriptionHelpFormatter -WORKING_PATH = os.getenv("WORKING_PATH") -if WORKING_PATH == None: - print("Please define the WORKING_PATH environment variable to the git repository path to use") - sys.exit(1) +__all__ = [] +__version__ = 0.1 +__date__ = '2017-11-29' +__updated__ = '2017-11-29' -CURRENT_RELEASE = os.getenv("CURRENT_RELEASE") -if CURRENT_RELEASE == None: - print("Please define the CURRENT_RELEASE version") - sys.exit(1) - -PREVIOUS_RELEASE = os.getenv("PREVIOUS_RELEASE") -if PREVIOUS_RELEASE == None: - print("Please define the PREVIOUS_RELEASE version") - sys.exit(1) - -DIFFERENCE_OPTIONS = os.getenv("DIFFERENCE_OPTIONS") -if DIFFERENCE_OPTIONS == None: - DIFFERENCE_OPTIONS = "" +gitExecutable = os.getenv("GIT_EXECUTABLE", default="git") class GitException(Exception): def __init__(self, message): @@ -39,31 +29,34 @@ class GitException(Exception): def __repr__(self): return self.message -def printDivider(times = 1, length = 100): +def makeFolder(versionfolder): + print("Creating folder (if not already there): {0}".format(versionfolder)) + os.makedirs(versionfolder, exist_ok = True) + +def printDivider(outfh, times = 1, length = 100): for _ in range(times): - print("*" * length) + outfh.write("{0}\n".format("*" * length)) TABSIZE = 4 -def printTabbed(string, tabs = 0): - print("{0}{1}".format(" " * (TABSIZE * tabs), string)) +def printTabbed(outfh, string, tabs = 0): + outfh.write("{0}{1}\n".format(" " * (TABSIZE * tabs), string)) -def getGitLogDifferences(workingPath, previousRelease, currentRelease, tripledot = False): - gitExecutable = GIT_EXECUTABLE +def getGitLogDifferences(outfh, gitrootfolder, previousRelease, currentRelease, tripledot = False): if tripledot: releaseExpression = previousRelease + "..." + currentRelease else: releaseExpression = previousRelease + ".." + currentRelease currentdir = os.getcwd() - os.chdir(workingPath) + os.chdir(gitrootfolder) gitlog = [] - printTabbed("Executing: {0} {1} {2} {3}".format(gitExecutable, "log", "--oneline", releaseExpression)) + printTabbed(outfh, "Executing: {0} {1} {2} {3}".format(gitExecutable, "log", "--oneline", releaseExpression)) proc = subprocess.Popen([gitExecutable, "log", "--oneline", releaseExpression], stdout=subprocess.PIPE) while True: line = proc.stdout.readline() if line: linestring = line.decode('utf-8').rstrip() gitlog.append(linestring) - #printTabbed(linestring, 1) + #printTabbed(outfh, linestring, 1) else: break proc.wait() @@ -72,15 +65,23 @@ def getGitLogDifferences(workingPath, previousRelease, currentRelease, tripledot os.chdir(currentdir) return gitlog -expectedpattern = re.compile("^.* +(?:[gG][iI][sS][ _-]*|[tT]rac \#*|\#\s*)(\d+):*(.*)$") -revertpattern = re.compile('^(\S*) Revert " *GIS-(\d+):* (.*)"$') +jiraprojectpattern = { + 'GIS' : ( re.compile("^.* +(?:[gG][iI][sS][ _-]*|[tT]rac \#*|\#\s*)(\d+):*(.*)$"), + re.compile('^(\S*) Revert " *GIS-(\d+):* (.*)"$'), + ), + 'IMB': ( re.compile("^.* +(?:[Ii][Mm][Bb][ _-]*|\#\s*)(\d+):*(.*)$"), + re.compile('^(\S*) Revert " *IMB-(\d+):* (.*)"$'), + ), + } + mergepattern = re.compile("^(.*)((?:Merge branch '.*'|Merge remote-tracking branch '.*'|Merge commit '.*'|Add '.*' from commit).*)$") -def processLog(gitlog): +def processLog(gitlog, jirakeyprefix): reverts = [] merges = {} other = [] numbered = {} + (expectedpattern, revertpattern) = jiraprojectpattern[jirakeyprefix] for line in gitlog: expectedmatch = expectedpattern.match(line) revertmatch = revertpattern.match(line) @@ -88,7 +89,7 @@ def processLog(gitlog): if expectedmatch == None and revertmatch == None and mergematch == None: other.append(line) if revertmatch: - gisnumber = "GIS-" + revertmatch.group(2) + gisnumber = jirakeyprefix + "-" + revertmatch.group(2) description = revertmatch.group(3) reverts.append("Revert: {0} {1}".format(gisnumber, description)) if mergematch: @@ -98,54 +99,116 @@ def processLog(gitlog): else: merges[merge] += 1 if expectedmatch: - gisnumber = "GIS-" + expectedmatch.group(1) + gisnumber = jirakeyprefix + "-" + expectedmatch.group(1) description = expectedmatch.group(2) if not gisnumber in numbered: numbered[gisnumber] = [] numbered[gisnumber].append(description) return (reverts, merges, other, numbered) -def showDifferences(differences): +def showDifferences(differences, jirakeyprefix, outfh): (revertslog, mergeslog, otherlog, numberedlog) = differences - printDivider() - printTabbed("GIS-Numbers Log:") + printDivider(outfh) + printTabbed(outfh, jirakeyprefix + "-Numbers Log:") for (gisnumber, descriptions) in sorted(numberedlog.items()): - printTabbed(gisnumber, 1) + printTabbed(outfh, gisnumber, 1) descriptions = numberedlog[gisnumber]; for description in descriptions: - printTabbed(description, 2) - printDivider() - printTabbed("Revert log:") + printTabbed(outfh, description, 2) + printDivider(outfh) + printTabbed(outfh, "Revert log:") for reversion in sorted(revertslog): - printTabbed(reversion, 1) - printDivider() - printTabbed("Merges log:") + printTabbed(outfh, reversion, 1) + printDivider(outfh) + printTabbed(outfh, "Merges log:") for merge in sorted(mergeslog): - printTabbed(merge, 1) - printDivider() - printTabbed("Other log:") + printTabbed(outfh, merge, 1) + printDivider(outfh) + printTabbed(outfh, "Other log:") for other in sorted(otherlog): - printTabbed(other, 1) + printTabbed(outfh, other, 1) -def main(): - workingPath = WORKING_PATH - previous = PREVIOUS_RELEASE - now = CURRENT_RELEASE - printDivider(times = 4) - printTabbed("Looking for changes in {2} that are not in {1} of the repository at path: {0}".format(workingPath, previous, now)) - gitlog = getGitLogDifferences(workingPath, previous, now) - showDifferences(processLog(gitlog)) - if 'opposite' in DIFFERENCE_OPTIONS.lower(): - printDivider(times = 4) - printTabbed("Looking for changes in {2} that are not in {1} of the repository at path: {0}".format(workingPath, now, previous)) - gitlog = getGitLogDifferences(workingPath, now, previous) - showDifferences(processLog(gitlog)) - if 'notcommon' in DIFFERENCE_OPTIONS.lower(): - printDivider(times = 4) - printTabbed("Looking for changes that are not common to {1} or {2} at path: {0}".format(workingPath, now, previous)) - gitlog = getGitLogDifferences(workingPath, now, previous, tripledot = True) - showDifferences(processLog(gitlog)) - sys.exit(0) +def main(argv=None): # IGNORE:C0111 + '''Command line options.''' -if __name__ == '__main__': - main() \ No newline at end of file + if argv is None: + argv = sys.argv + else: + sys.argv.extend(argv) + + program_name = os.path.basename(sys.argv[0]) + program_version = "v%s" % __version__ + program_build_date = str(__updated__) + program_version_message = '%%(prog)s %s (%s)' % (program_version, program_build_date) + program_shortdesc = __import__('__main__').__doc__.split("\n")[1] + program_license = '''%s + + Created by dan on %s. + Copyright 2017 Global Inkjet Systems Ltd. All rights reserved. + + Distributed on an "AS IS" basis without warranties + or conditions of any kind, either express or implied. + +USAGE +''' % (program_shortdesc, str(__date__)) + + try: + # Setup argument parser + parser = ArgumentParser(description=program_license, formatter_class=RawDescriptionHelpFormatter) + parser.add_argument("-g", "--gitroot", dest="gitrootfolder", action="store", default="GitRepository", help="root path of source files [default: %(default)s]") + parser.add_argument("-s", "--sourceversion", dest="sourceversion", action="store", default="origin/master", help="source version branch or tag to discover compare against [default: %(default)s]") + parser.add_argument("-p", "--previousversion", dest="previousversion", action="store", default="origin/master", help="source branch or tag to compare with [default: %(default)s]") + parser.add_argument("-j", "--jirakeyprefix", dest="jirakeyprefix", action="store", default="GIS", help="jira key prefix [default: %(default)s]") + parser.add_argument("-o", "--outputoptions", dest="outputoptions", action="store", default="", help="output options: Can be: opposite notcommon [default: %(default)s]") + parser.add_argument("-v", "--versionfolder", dest="versionfolder", action="store", default="", help="version folder where differences file stored [default: %(default)s]") + + # Process arguments + args = parser.parse_args() + + try: + gitrootfolder = args.gitrootfolder + sourceversion = args.sourceversion + previousversion = args.previousversion + jirakeyprefix = args.jirakeyprefix + outputoptions = args.outputoptions + versionfolder = args.versionfolder + + print("Git root:", gitrootfolder, "Source version:", sourceversion, "Previous source version:", previousversion) + print("Jira key prefix:", jirakeyprefix, "Output options:", outputoptions, "Version folder:", versionfolder) + + if versionfolder: + makeFolder(versionfolder) + outfh = open(os.path.join(versionfolder, "differences.txt"), 'w') + else: + outfh = sys.stdout + + printDivider(outfh, times = 4) + printTabbed(outfh, "Looking for changes in {2} that are not in {1} of the repository at path: {0}".format(gitrootfolder, previousversion, sourceversion)) + gitlog = getGitLogDifferences(outfh, gitrootfolder, previousversion, sourceversion) + showDifferences(processLog(gitlog, jirakeyprefix), jirakeyprefix, outfh) + if 'opposite' in outputoptions.lower(): + printDivider(outfh, times = 4) + printTabbed(outfh, "Looking for changes in {2} that are not in {1} of the repository at path: {0}".format(gitrootfolder, sourceversion, previousversion)) + gitlog = getGitLogDifferences(outfh, gitrootfolder, sourceversion, previousversion) + showDifferences(processLog(gitlog, jirakeyprefix), jirakeyprefix, outfh) + if 'notcommon' in outputoptions.lower(): + printDivider(outfh, times = 4) + printTabbed(outfh, "Looking for changes that are not common to {1} or {2} at path: {0}".format(gitrootfolder, sourceversion, previousversion)) + gitlog = getGitLogDifferences(outfh, gitrootfolder, sourceversion, previousversion, tripledot = True) + showDifferences(processLog(gitlog, jirakeyprefix), jirakeyprefix, outfh) + + if versionfolder: + outfh.close() + return 0 + except Exception as e: + print("Error while determining differences:", e.__repr__()) + return 1 + + except Exception as e: + indent = len(program_name) * " " + print(program_name + ": " + repr(e) + "\n") + print(indent + " for help use --help") + return 2 + +if __name__ == "__main__": + sys.exit(main()) diff --git a/version/differences.txt b/version/differences.txt new file mode 100644 index 0000000..7ec3ad6 --- /dev/null +++ b/version/differences.txt @@ -0,0 +1,230 @@ +**************************************************************************************************** +**************************************************************************************************** +**************************************************************************************************** +**************************************************************************************************** +Looking for changes in origin/master that are not in origin/1.5.4 of the repository at path: /home/dan/home2/Development/inksystem +Executing: git log --oneline origin/1.5.4..origin/master +**************************************************************************************************** +IMB-Numbers Log: + IMB-11 + Further minor change to tooltip + Changed tooltip for PWN Frequency on ink pumps + Changed the Tooltips for PWM frequency and duty cycle + IMB-12 + Changed the order the events are generated in to prevent master from resetting slave + When a vent command is sent to a slave, it will demand a vent from its master + IMB-14 + Fixed state transition in Controlled Flow Master where it could get stuck in pre-flow + IMB-4 + - Add more logging + IMB-42 + Master sets the slaves to dormant when pre-idling + IMB-43 + Added purge abort for HP Type 2 + Fixed shared controlled flow transition for purge all slaves + Added Idle transitions from Purge + Added missing definition + Added explicit transitions for standby for all states for flowmode 1-3 + IMB-47 + - Tidied up checkStateR to be consistent with setValueR + - The thermistor will only generate an event if a threshold has been crossed, or when "timeToSendAnotherEvent" is true. + - The thermistor will only generate an event if a threshold has been crossed, or when "timeToSendAnotherEvent" is true. + IMB-50 + Temperature setpoint set when entering flow configuration to ensure correct heater operation + IMB-6 + Removed a white-space in the output + IMB-7 + Changed the formatting of the output + IMB-8 + When returning from a purge it now calls the same code as when going into idle, as they effectively were identical. + Added pre-flow to post-flow transitions and vice-versa + In gravity mode: removed the activation of the vacuum pump which speeds up ramps. This caused vent and pump to "fight" each other +**************************************************************************************************** +Revert log: +**************************************************************************************************** +Merges log: + Merge branch '1.10023.j6221-Type2_Pneumatic' of hydra:gis/inksystem into 1.10023.j6221-Type2_Pneumatic + Merge branch 'master' of hydra:gis/inksystem + Merge remote-tracking branch 'remotes/origin/1.10025.j6416-EthernetCongestion' into 1.10023.j6221-Type2_Pneumatic + Merge remote-tracking branch 'remotes/origin/1.5.2' into 1.10023.j6221-Type2_Pneumatic + Merge remote-tracking branch 'remotes/origin/1.5.5' + Merge remote-tracking branch 'remotes/origin/master' into 1.10023.j6221-Type2_Pneumatic +**************************************************************************************************** +Other log: + 095290c GIS-1621 - Make compilation work in case-sensitive linux + 0a8505d GIS-1621 - Remove test code + 0e8ccce GIS-6380 Removed ambiguous "absolute pressure" terminology + 149e0bf GIS 6221: Added logging for gravity mode + 169125b GIS-6221: Corrected Typo + 23c37d0 GIS 43: System will abort purge in a safe manner if standby command is issued + 37dd24b GIS 6479: Controlled flow master now goes through pre-flow. Fixed ordering in controlevent.c and .h + 41ac373 GIS-6253: Fixed bugs + 45cdfbe GIS 6591: Fixed if statement which outputs ITPD and OTPD + 468798e Update release notes whitespace + 4c2badc GIS-1621 - 16 bit integer is not printing correctly + 4c9a1aa GIS-6221 Vent the outlet bottle when purging to prevent "kick" on return from idle + 541c3bb GIS-6253: Added gravity flowmode + 5562461 GIS-6570 - Handle 0 length buffers being sent for TCP transmission; Add some logging for diagnosis + 577444e Update release notes for 1.5.5 + 5c6416b GIS-6416 - Instrument number of buffers on socket transmit queue and grapher empty buffer queue + 603de5a GIS-6221: Fixed more typos + 628b57d GIS 6221: Fixed typo + 6526df4 GIS-6221 Corrected behaviour at idle. When idling, the pressure is now only vacuum pump driven in one direction. + 6da6243 GIS-6221 Changed purge configuration, return from purge still to do + 7d263d0 GIS 6591: Change the output of the settings command on Telnet for clarity + 83f5517 Update 1.5.5 release notes with known issues + 85fc901 GIS-6570 - Handle condition when no bytes are consumed by sck_send (because the connection has died) for TCP transmission; Add some logging for diagnosis + 8a2db28 GIS-6221 Corrected behaviour at idle. When idling, the pressure is now only vacuum pump driven in one direction. + 8df4c1b GIS-1621 - Settings BSP files have changed unexpectedly from 1.5.4 - maybe causing a slow down + 92c135e GIS 6462 Fixed typo + 9400923 GIS-6516: Slave resets from vent when master is reset + 9964521 GIS 6253: Added methods for gravity mode logging in inkchannelinterface.cpp/h + a1f0025 GIS 43: Added PreIdle with slaves in controlled flow master + a900a24 GIS-6221: Changed Idle to be driven from Inlet Side + b2f4383 GIS-1620 - Correct string print + b42ea46 GIS-1621 - Handle version prefix + b498cd5 GIS 6462 Added on the fly idle pressure change in shared pressure controlled flow + b4e1b8c GIS 6221: Resolved merge conflicts and applied fixes from 1.5.3 to the Type 2 High Pressure mode + bbc5e45 GIS 6221 - Changed High Pressure Type 2 to flowmode 6 + bd69b60 GIS-6253: Fixed typos + c568789 GIS 6221 - Bug fixes High Pressure Type 2 Flow mode + c666970 GIS-6570 - Add some logging for diagnosis + c7bbf29 Fixed shared controlled flow transition for purge all slaves to standby + c962c65 GIS-6221 Added Purge Return via Idle + ca1e7b5 GIS-6253: Added the files for gravity flowmode + ca4473b GIS-1621 - Only send pressure updates if there is a 4 point difference in value + cb06440 GIS 6221: Changed descriptions of Flowmodes. Changed output of settings to show purge pressure for flowmode 5 and 6 + d4dd54d GIS 6462: Added on-the-fly pressure change for Shared Pressure Controlled Flow systems + da69186 GIS 6492: Dumpconfig now outputs the software version + df64abd Revert "GIS-1621 - Only send pressure updates if there is a 4 point difference in value" + e51971f GIS 6379: The purge pressure is only shown on High Pressure systems (flowmode 4 and 5) + e6b0227 GIS-6221 Corrected vent operation for outlet bottle + ec13b60 GIS-6416 - Handle multiple writes to a TCP stream until it becomes busy + f018a86 GIS 6479: Added an applysettings command to allow on the fly pressure and temperature changes + f7109ff GIS 43: Added purge to idle transitions for Gravity Mode + f87280b GIS 43: Fixed transition in cfm + f999765 GIS-6253: Removed redundant function + ff37df8 GIS-6253: Fixed typos + ff92b79 GIS 6591: Added statement on Master settings +**************************************************************************************************** +**************************************************************************************************** +**************************************************************************************************** +**************************************************************************************************** +Looking for changes in origin/1.5.4 that are not in origin/master of the repository at path: /home/dan/home2/Development/inksystem +Executing: git log --oneline origin/master..origin/1.5.4 +**************************************************************************************************** +IMB-Numbers Log: +**************************************************************************************************** +Revert log: +**************************************************************************************************** +Merges log: +**************************************************************************************************** +Other log: +**************************************************************************************************** +**************************************************************************************************** +**************************************************************************************************** +**************************************************************************************************** +Looking for changes that are not common to origin/master or origin/1.5.4 at path: /home/dan/home2/Development/inksystem +Executing: git log --oneline origin/master...origin/1.5.4 +**************************************************************************************************** +IMB-Numbers Log: + IMB-11 + Further minor change to tooltip + Changed tooltip for PWN Frequency on ink pumps + Changed the Tooltips for PWM frequency and duty cycle + IMB-12 + Changed the order the events are generated in to prevent master from resetting slave + When a vent command is sent to a slave, it will demand a vent from its master + IMB-14 + Fixed state transition in Controlled Flow Master where it could get stuck in pre-flow + IMB-4 + - Add more logging + IMB-42 + Master sets the slaves to dormant when pre-idling + IMB-43 + Added purge abort for HP Type 2 + Fixed shared controlled flow transition for purge all slaves + Added Idle transitions from Purge + Added missing definition + Added explicit transitions for standby for all states for flowmode 1-3 + IMB-47 + - Tidied up checkStateR to be consistent with setValueR + - The thermistor will only generate an event if a threshold has been crossed, or when "timeToSendAnotherEvent" is true. + - The thermistor will only generate an event if a threshold has been crossed, or when "timeToSendAnotherEvent" is true. + IMB-50 + Temperature setpoint set when entering flow configuration to ensure correct heater operation + IMB-6 + Removed a white-space in the output + IMB-7 + Changed the formatting of the output + IMB-8 + When returning from a purge it now calls the same code as when going into idle, as they effectively were identical. + Added pre-flow to post-flow transitions and vice-versa + In gravity mode: removed the activation of the vacuum pump which speeds up ramps. This caused vent and pump to "fight" each other +**************************************************************************************************** +Revert log: +**************************************************************************************************** +Merges log: + Merge branch '1.10023.j6221-Type2_Pneumatic' of hydra:gis/inksystem into 1.10023.j6221-Type2_Pneumatic + Merge branch 'master' of hydra:gis/inksystem + Merge remote-tracking branch 'remotes/origin/1.10025.j6416-EthernetCongestion' into 1.10023.j6221-Type2_Pneumatic + Merge remote-tracking branch 'remotes/origin/1.5.2' into 1.10023.j6221-Type2_Pneumatic + Merge remote-tracking branch 'remotes/origin/1.5.5' + Merge remote-tracking branch 'remotes/origin/master' into 1.10023.j6221-Type2_Pneumatic +**************************************************************************************************** +Other log: + 095290c GIS-1621 - Make compilation work in case-sensitive linux + 0a8505d GIS-1621 - Remove test code + 0e8ccce GIS-6380 Removed ambiguous "absolute pressure" terminology + 149e0bf GIS 6221: Added logging for gravity mode + 169125b GIS-6221: Corrected Typo + 23c37d0 GIS 43: System will abort purge in a safe manner if standby command is issued + 37dd24b GIS 6479: Controlled flow master now goes through pre-flow. Fixed ordering in controlevent.c and .h + 41ac373 GIS-6253: Fixed bugs + 45cdfbe GIS 6591: Fixed if statement which outputs ITPD and OTPD + 468798e Update release notes whitespace + 4c2badc GIS-1621 - 16 bit integer is not printing correctly + 4c9a1aa GIS-6221 Vent the outlet bottle when purging to prevent "kick" on return from idle + 541c3bb GIS-6253: Added gravity flowmode + 5562461 GIS-6570 - Handle 0 length buffers being sent for TCP transmission; Add some logging for diagnosis + 577444e Update release notes for 1.5.5 + 5c6416b GIS-6416 - Instrument number of buffers on socket transmit queue and grapher empty buffer queue + 603de5a GIS-6221: Fixed more typos + 628b57d GIS 6221: Fixed typo + 6526df4 GIS-6221 Corrected behaviour at idle. When idling, the pressure is now only vacuum pump driven in one direction. + 6da6243 GIS-6221 Changed purge configuration, return from purge still to do + 7d263d0 GIS 6591: Change the output of the settings command on Telnet for clarity + 83f5517 Update 1.5.5 release notes with known issues + 85fc901 GIS-6570 - Handle condition when no bytes are consumed by sck_send (because the connection has died) for TCP transmission; Add some logging for diagnosis + 8a2db28 GIS-6221 Corrected behaviour at idle. When idling, the pressure is now only vacuum pump driven in one direction. + 8df4c1b GIS-1621 - Settings BSP files have changed unexpectedly from 1.5.4 - maybe causing a slow down + 92c135e GIS 6462 Fixed typo + 9400923 GIS-6516: Slave resets from vent when master is reset + 9964521 GIS 6253: Added methods for gravity mode logging in inkchannelinterface.cpp/h + a1f0025 GIS 43: Added PreIdle with slaves in controlled flow master + a900a24 GIS-6221: Changed Idle to be driven from Inlet Side + b2f4383 GIS-1620 - Correct string print + b42ea46 GIS-1621 - Handle version prefix + b498cd5 GIS 6462 Added on the fly idle pressure change in shared pressure controlled flow + b4e1b8c GIS 6221: Resolved merge conflicts and applied fixes from 1.5.3 to the Type 2 High Pressure mode + bbc5e45 GIS 6221 - Changed High Pressure Type 2 to flowmode 6 + bd69b60 GIS-6253: Fixed typos + c568789 GIS 6221 - Bug fixes High Pressure Type 2 Flow mode + c666970 GIS-6570 - Add some logging for diagnosis + c7bbf29 Fixed shared controlled flow transition for purge all slaves to standby + c962c65 GIS-6221 Added Purge Return via Idle + ca1e7b5 GIS-6253: Added the files for gravity flowmode + ca4473b GIS-1621 - Only send pressure updates if there is a 4 point difference in value + cb06440 GIS 6221: Changed descriptions of Flowmodes. Changed output of settings to show purge pressure for flowmode 5 and 6 + d4dd54d GIS 6462: Added on-the-fly pressure change for Shared Pressure Controlled Flow systems + da69186 GIS 6492: Dumpconfig now outputs the software version + df64abd Revert "GIS-1621 - Only send pressure updates if there is a 4 point difference in value" + e51971f GIS 6379: The purge pressure is only shown on High Pressure systems (flowmode 4 and 5) + e6b0227 GIS-6221 Corrected vent operation for outlet bottle + ec13b60 GIS-6416 - Handle multiple writes to a TCP stream until it becomes busy + f018a86 GIS 6479: Added an applysettings command to allow on the fly pressure and temperature changes + f7109ff GIS 43: Added purge to idle transitions for Gravity Mode + f87280b GIS 43: Fixed transition in cfm + f999765 GIS-6253: Removed redundant function + ff37df8 GIS-6253: Fixed typos + ff92b79 GIS 6591: Added statement on Master settings diff --git a/versionnumbering/versioninfo.py b/versionnumbering/versioninfo.py index 35e91cd..c8c79fe 100644 --- a/versionnumbering/versioninfo.py +++ b/versionnumbering/versioninfo.py @@ -21,6 +21,8 @@ __version__ = 0.1 __date__ = '2017-11-29' __updated__ = '2017-11-29' +gitExecutable = os.getenv("GIT_EXECUTABLE", default="git") + def resetFolder(versionfolder): print("Removing folders and contents of: {0}".format(versionfolder)) try: @@ -38,29 +40,22 @@ def getGitRevision(gitrootpath, basenumber): print("Changing current working directory to: {0}".format(path)) os.chdir(path) - gitvar = "GIT_EXECUTABLE" - if gitvar in os.environ and os.environ[gitvar]: - gitexecutable = os.environ[gitvar] - else: - print("Expecting GIT_EXECUTABLE environment variable to have path to git. Defaulting to 'git'") - gitexecutable = "git" - - print("Determining revision info using git command: {0}".format(gitexecutable)) - completed = subprocess.run([gitexecutable, "rev-list", "HEAD", "--count"], stdout=subprocess.PIPE) + print("Determining revision info using git command: {0}".format(gitExecutable)) + completed = subprocess.run([gitExecutable, "rev-list", "HEAD", "--count"], stdout=subprocess.PIPE) print("Command {0} returned: {1}".format(completed.args, completed.returncode)) changecount = completed.stdout.decode("utf-8").strip() print("Change count: {0}".format(changecount)) adjustedchangecount = int(changecount) + int(basenumber) print("Adjusted change count: {0}".format(adjustedchangecount)) - print("Determining current revision info using git command: {0}".format(gitexecutable)) - completed = subprocess.run([gitexecutable, "rev-parse", "HEAD"], stdout=subprocess.PIPE) + print("Determining current revision info using git command: {0}".format(gitExecutable)) + completed = subprocess.run([gitExecutable, "rev-parse", "HEAD"], stdout=subprocess.PIPE) print("Command {0} returned: {1}".format(completed.args, completed.returncode)) revision = completed.stdout.decode("utf-8").strip() print("Revision: {0}".format(revision)) - print("Determining remote info using git command: {0}".format(gitexecutable)) - completed = subprocess.run([gitexecutable, "remote", "show", "origin"], stdout=subprocess.PIPE) + print("Determining remote info using git command: {0}".format(gitExecutable)) + completed = subprocess.run([gitExecutable, "remote", "show", "origin"], stdout=subprocess.PIPE) print("Command {0} returned: {1}".format(completed.args, completed.returncode)) remoteinfo = completed.stdout.decode("utf-8") print("Remote info: {0}".format(remoteinfo)) From 2fab1a566ec16460835b4aefda492ad56b435490 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 2 Dec 2017 21:48:37 +0000 Subject: [PATCH 028/122] Remove redundant files --- README.md | 0 README2.md | 0 version/differences.txt | 230 ---------------------------------------- 3 files changed, 230 deletions(-) delete mode 100644 README.md delete mode 100644 README2.md delete mode 100644 version/differences.txt diff --git a/README.md b/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/README2.md b/README2.md deleted file mode 100644 index e69de29..0000000 diff --git a/version/differences.txt b/version/differences.txt deleted file mode 100644 index 7ec3ad6..0000000 --- a/version/differences.txt +++ /dev/null @@ -1,230 +0,0 @@ -**************************************************************************************************** -**************************************************************************************************** -**************************************************************************************************** -**************************************************************************************************** -Looking for changes in origin/master that are not in origin/1.5.4 of the repository at path: /home/dan/home2/Development/inksystem -Executing: git log --oneline origin/1.5.4..origin/master -**************************************************************************************************** -IMB-Numbers Log: - IMB-11 - Further minor change to tooltip - Changed tooltip for PWN Frequency on ink pumps - Changed the Tooltips for PWM frequency and duty cycle - IMB-12 - Changed the order the events are generated in to prevent master from resetting slave - When a vent command is sent to a slave, it will demand a vent from its master - IMB-14 - Fixed state transition in Controlled Flow Master where it could get stuck in pre-flow - IMB-4 - - Add more logging - IMB-42 - Master sets the slaves to dormant when pre-idling - IMB-43 - Added purge abort for HP Type 2 - Fixed shared controlled flow transition for purge all slaves - Added Idle transitions from Purge - Added missing definition - Added explicit transitions for standby for all states for flowmode 1-3 - IMB-47 - - Tidied up checkStateR to be consistent with setValueR - - The thermistor will only generate an event if a threshold has been crossed, or when "timeToSendAnotherEvent" is true. - - The thermistor will only generate an event if a threshold has been crossed, or when "timeToSendAnotherEvent" is true. - IMB-50 - Temperature setpoint set when entering flow configuration to ensure correct heater operation - IMB-6 - Removed a white-space in the output - IMB-7 - Changed the formatting of the output - IMB-8 - When returning from a purge it now calls the same code as when going into idle, as they effectively were identical. - Added pre-flow to post-flow transitions and vice-versa - In gravity mode: removed the activation of the vacuum pump which speeds up ramps. This caused vent and pump to "fight" each other -**************************************************************************************************** -Revert log: -**************************************************************************************************** -Merges log: - Merge branch '1.10023.j6221-Type2_Pneumatic' of hydra:gis/inksystem into 1.10023.j6221-Type2_Pneumatic - Merge branch 'master' of hydra:gis/inksystem - Merge remote-tracking branch 'remotes/origin/1.10025.j6416-EthernetCongestion' into 1.10023.j6221-Type2_Pneumatic - Merge remote-tracking branch 'remotes/origin/1.5.2' into 1.10023.j6221-Type2_Pneumatic - Merge remote-tracking branch 'remotes/origin/1.5.5' - Merge remote-tracking branch 'remotes/origin/master' into 1.10023.j6221-Type2_Pneumatic -**************************************************************************************************** -Other log: - 095290c GIS-1621 - Make compilation work in case-sensitive linux - 0a8505d GIS-1621 - Remove test code - 0e8ccce GIS-6380 Removed ambiguous "absolute pressure" terminology - 149e0bf GIS 6221: Added logging for gravity mode - 169125b GIS-6221: Corrected Typo - 23c37d0 GIS 43: System will abort purge in a safe manner if standby command is issued - 37dd24b GIS 6479: Controlled flow master now goes through pre-flow. Fixed ordering in controlevent.c and .h - 41ac373 GIS-6253: Fixed bugs - 45cdfbe GIS 6591: Fixed if statement which outputs ITPD and OTPD - 468798e Update release notes whitespace - 4c2badc GIS-1621 - 16 bit integer is not printing correctly - 4c9a1aa GIS-6221 Vent the outlet bottle when purging to prevent "kick" on return from idle - 541c3bb GIS-6253: Added gravity flowmode - 5562461 GIS-6570 - Handle 0 length buffers being sent for TCP transmission; Add some logging for diagnosis - 577444e Update release notes for 1.5.5 - 5c6416b GIS-6416 - Instrument number of buffers on socket transmit queue and grapher empty buffer queue - 603de5a GIS-6221: Fixed more typos - 628b57d GIS 6221: Fixed typo - 6526df4 GIS-6221 Corrected behaviour at idle. When idling, the pressure is now only vacuum pump driven in one direction. - 6da6243 GIS-6221 Changed purge configuration, return from purge still to do - 7d263d0 GIS 6591: Change the output of the settings command on Telnet for clarity - 83f5517 Update 1.5.5 release notes with known issues - 85fc901 GIS-6570 - Handle condition when no bytes are consumed by sck_send (because the connection has died) for TCP transmission; Add some logging for diagnosis - 8a2db28 GIS-6221 Corrected behaviour at idle. When idling, the pressure is now only vacuum pump driven in one direction. - 8df4c1b GIS-1621 - Settings BSP files have changed unexpectedly from 1.5.4 - maybe causing a slow down - 92c135e GIS 6462 Fixed typo - 9400923 GIS-6516: Slave resets from vent when master is reset - 9964521 GIS 6253: Added methods for gravity mode logging in inkchannelinterface.cpp/h - a1f0025 GIS 43: Added PreIdle with slaves in controlled flow master - a900a24 GIS-6221: Changed Idle to be driven from Inlet Side - b2f4383 GIS-1620 - Correct string print - b42ea46 GIS-1621 - Handle version prefix - b498cd5 GIS 6462 Added on the fly idle pressure change in shared pressure controlled flow - b4e1b8c GIS 6221: Resolved merge conflicts and applied fixes from 1.5.3 to the Type 2 High Pressure mode - bbc5e45 GIS 6221 - Changed High Pressure Type 2 to flowmode 6 - bd69b60 GIS-6253: Fixed typos - c568789 GIS 6221 - Bug fixes High Pressure Type 2 Flow mode - c666970 GIS-6570 - Add some logging for diagnosis - c7bbf29 Fixed shared controlled flow transition for purge all slaves to standby - c962c65 GIS-6221 Added Purge Return via Idle - ca1e7b5 GIS-6253: Added the files for gravity flowmode - ca4473b GIS-1621 - Only send pressure updates if there is a 4 point difference in value - cb06440 GIS 6221: Changed descriptions of Flowmodes. Changed output of settings to show purge pressure for flowmode 5 and 6 - d4dd54d GIS 6462: Added on-the-fly pressure change for Shared Pressure Controlled Flow systems - da69186 GIS 6492: Dumpconfig now outputs the software version - df64abd Revert "GIS-1621 - Only send pressure updates if there is a 4 point difference in value" - e51971f GIS 6379: The purge pressure is only shown on High Pressure systems (flowmode 4 and 5) - e6b0227 GIS-6221 Corrected vent operation for outlet bottle - ec13b60 GIS-6416 - Handle multiple writes to a TCP stream until it becomes busy - f018a86 GIS 6479: Added an applysettings command to allow on the fly pressure and temperature changes - f7109ff GIS 43: Added purge to idle transitions for Gravity Mode - f87280b GIS 43: Fixed transition in cfm - f999765 GIS-6253: Removed redundant function - ff37df8 GIS-6253: Fixed typos - ff92b79 GIS 6591: Added statement on Master settings -**************************************************************************************************** -**************************************************************************************************** -**************************************************************************************************** -**************************************************************************************************** -Looking for changes in origin/1.5.4 that are not in origin/master of the repository at path: /home/dan/home2/Development/inksystem -Executing: git log --oneline origin/master..origin/1.5.4 -**************************************************************************************************** -IMB-Numbers Log: -**************************************************************************************************** -Revert log: -**************************************************************************************************** -Merges log: -**************************************************************************************************** -Other log: -**************************************************************************************************** -**************************************************************************************************** -**************************************************************************************************** -**************************************************************************************************** -Looking for changes that are not common to origin/master or origin/1.5.4 at path: /home/dan/home2/Development/inksystem -Executing: git log --oneline origin/master...origin/1.5.4 -**************************************************************************************************** -IMB-Numbers Log: - IMB-11 - Further minor change to tooltip - Changed tooltip for PWN Frequency on ink pumps - Changed the Tooltips for PWM frequency and duty cycle - IMB-12 - Changed the order the events are generated in to prevent master from resetting slave - When a vent command is sent to a slave, it will demand a vent from its master - IMB-14 - Fixed state transition in Controlled Flow Master where it could get stuck in pre-flow - IMB-4 - - Add more logging - IMB-42 - Master sets the slaves to dormant when pre-idling - IMB-43 - Added purge abort for HP Type 2 - Fixed shared controlled flow transition for purge all slaves - Added Idle transitions from Purge - Added missing definition - Added explicit transitions for standby for all states for flowmode 1-3 - IMB-47 - - Tidied up checkStateR to be consistent with setValueR - - The thermistor will only generate an event if a threshold has been crossed, or when "timeToSendAnotherEvent" is true. - - The thermistor will only generate an event if a threshold has been crossed, or when "timeToSendAnotherEvent" is true. - IMB-50 - Temperature setpoint set when entering flow configuration to ensure correct heater operation - IMB-6 - Removed a white-space in the output - IMB-7 - Changed the formatting of the output - IMB-8 - When returning from a purge it now calls the same code as when going into idle, as they effectively were identical. - Added pre-flow to post-flow transitions and vice-versa - In gravity mode: removed the activation of the vacuum pump which speeds up ramps. This caused vent and pump to "fight" each other -**************************************************************************************************** -Revert log: -**************************************************************************************************** -Merges log: - Merge branch '1.10023.j6221-Type2_Pneumatic' of hydra:gis/inksystem into 1.10023.j6221-Type2_Pneumatic - Merge branch 'master' of hydra:gis/inksystem - Merge remote-tracking branch 'remotes/origin/1.10025.j6416-EthernetCongestion' into 1.10023.j6221-Type2_Pneumatic - Merge remote-tracking branch 'remotes/origin/1.5.2' into 1.10023.j6221-Type2_Pneumatic - Merge remote-tracking branch 'remotes/origin/1.5.5' - Merge remote-tracking branch 'remotes/origin/master' into 1.10023.j6221-Type2_Pneumatic -**************************************************************************************************** -Other log: - 095290c GIS-1621 - Make compilation work in case-sensitive linux - 0a8505d GIS-1621 - Remove test code - 0e8ccce GIS-6380 Removed ambiguous "absolute pressure" terminology - 149e0bf GIS 6221: Added logging for gravity mode - 169125b GIS-6221: Corrected Typo - 23c37d0 GIS 43: System will abort purge in a safe manner if standby command is issued - 37dd24b GIS 6479: Controlled flow master now goes through pre-flow. Fixed ordering in controlevent.c and .h - 41ac373 GIS-6253: Fixed bugs - 45cdfbe GIS 6591: Fixed if statement which outputs ITPD and OTPD - 468798e Update release notes whitespace - 4c2badc GIS-1621 - 16 bit integer is not printing correctly - 4c9a1aa GIS-6221 Vent the outlet bottle when purging to prevent "kick" on return from idle - 541c3bb GIS-6253: Added gravity flowmode - 5562461 GIS-6570 - Handle 0 length buffers being sent for TCP transmission; Add some logging for diagnosis - 577444e Update release notes for 1.5.5 - 5c6416b GIS-6416 - Instrument number of buffers on socket transmit queue and grapher empty buffer queue - 603de5a GIS-6221: Fixed more typos - 628b57d GIS 6221: Fixed typo - 6526df4 GIS-6221 Corrected behaviour at idle. When idling, the pressure is now only vacuum pump driven in one direction. - 6da6243 GIS-6221 Changed purge configuration, return from purge still to do - 7d263d0 GIS 6591: Change the output of the settings command on Telnet for clarity - 83f5517 Update 1.5.5 release notes with known issues - 85fc901 GIS-6570 - Handle condition when no bytes are consumed by sck_send (because the connection has died) for TCP transmission; Add some logging for diagnosis - 8a2db28 GIS-6221 Corrected behaviour at idle. When idling, the pressure is now only vacuum pump driven in one direction. - 8df4c1b GIS-1621 - Settings BSP files have changed unexpectedly from 1.5.4 - maybe causing a slow down - 92c135e GIS 6462 Fixed typo - 9400923 GIS-6516: Slave resets from vent when master is reset - 9964521 GIS 6253: Added methods for gravity mode logging in inkchannelinterface.cpp/h - a1f0025 GIS 43: Added PreIdle with slaves in controlled flow master - a900a24 GIS-6221: Changed Idle to be driven from Inlet Side - b2f4383 GIS-1620 - Correct string print - b42ea46 GIS-1621 - Handle version prefix - b498cd5 GIS 6462 Added on the fly idle pressure change in shared pressure controlled flow - b4e1b8c GIS 6221: Resolved merge conflicts and applied fixes from 1.5.3 to the Type 2 High Pressure mode - bbc5e45 GIS 6221 - Changed High Pressure Type 2 to flowmode 6 - bd69b60 GIS-6253: Fixed typos - c568789 GIS 6221 - Bug fixes High Pressure Type 2 Flow mode - c666970 GIS-6570 - Add some logging for diagnosis - c7bbf29 Fixed shared controlled flow transition for purge all slaves to standby - c962c65 GIS-6221 Added Purge Return via Idle - ca1e7b5 GIS-6253: Added the files for gravity flowmode - ca4473b GIS-1621 - Only send pressure updates if there is a 4 point difference in value - cb06440 GIS 6221: Changed descriptions of Flowmodes. Changed output of settings to show purge pressure for flowmode 5 and 6 - d4dd54d GIS 6462: Added on-the-fly pressure change for Shared Pressure Controlled Flow systems - da69186 GIS 6492: Dumpconfig now outputs the software version - df64abd Revert "GIS-1621 - Only send pressure updates if there is a 4 point difference in value" - e51971f GIS 6379: The purge pressure is only shown on High Pressure systems (flowmode 4 and 5) - e6b0227 GIS-6221 Corrected vent operation for outlet bottle - ec13b60 GIS-6416 - Handle multiple writes to a TCP stream until it becomes busy - f018a86 GIS 6479: Added an applysettings command to allow on the fly pressure and temperature changes - f7109ff GIS 43: Added purge to idle transitions for Gravity Mode - f87280b GIS 43: Fixed transition in cfm - f999765 GIS-6253: Removed redundant function - ff37df8 GIS-6253: Fixed typos - ff92b79 GIS 6591: Added statement on Master settings From 4dbbbf2b4247eb39770d2c9f4d4498ed1f4a8c0d Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 7 Dec 2017 13:13:23 +0000 Subject: [PATCH 029/122] Provide a comma seperated build stamp --- versionnumbering/versioninfo.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/versionnumbering/versioninfo.py b/versionnumbering/versioninfo.py index c8c79fe..a4162e0 100644 --- a/versionnumbering/versioninfo.py +++ b/versionnumbering/versioninfo.py @@ -124,6 +124,10 @@ def writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevision, r with open(os.path.join(versionfolder, "buildstamp.txt"), 'w') as f: f.write(buildstamp) + buildstampcommasep = buildstamp.replace(".", ",") + with open(os.path.join(versionfolder, "buildstampcommasep.txt"), 'w') as f: + f.write(buildstampcommasep) + def main(argv=None): # IGNORE:C0111 '''Command line options.''' From 584a016c493000ae456182f37b4c50bdf739f9c9 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 7 Dec 2017 13:33:27 +0000 Subject: [PATCH 030/122] Move code to common position --- build/eclipsebuild/eclipsebuild.gsh | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 build/eclipsebuild/eclipsebuild.gsh diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh new file mode 100644 index 0000000..e7dcd09 --- /dev/null +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -0,0 +1,34 @@ +// Build and export files +def doBuild(apps) { + for (appInfo in apps ) { + if (appInfo[0]) + { + retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) + if (isUnix()) { + sh "${BUILD_COMMAND} -build ${appInfo[1]}/${BUILD_VARIANT}" + } + else { + bat "%BUILD_COMMAND% -build ${appInfo[1]}/${BUILD_VARIANT}" + } + } + echo "Looking at: ${appInfo[2]}" + script { + env.destFolder = "${WORKSPACE}/export/${appInfo[1]}" + env.srcFile = "${WORKSPACE}/${appInfo[2]}" + } + dir (env.destFolder) { + if (appInfo[2]) { + echo "Copy ${srcFile} to ${destFolder}" + if (isUnix()) { + sh 'cp \"${srcFile}\" ${destFolder}' + } + else { + bat 'copy \"%srcFile%\" %destFolder%' + } + } + } + } + } +} + +return this; \ No newline at end of file From aeb712f07339a59e87b47703c71e9e4444313871 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 19 Dec 2017 13:24:11 +0000 Subject: [PATCH 031/122] Make variants of build all in one run --- build/eclipsebuild/eclipsebuild.gsh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index e7dcd09..579a413 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -1,23 +1,28 @@ // Build and export files def doBuild(apps) { for (appInfo in apps ) { - if (appInfo[0]) + env.build = appInfo[0] + env.project = appInfo[1] + env.variants = appInfo[2] + env.exportpath = appInfo[3] + if (build) { - retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) + for (build_variant in variants) { + retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) if (isUnix()) { - sh "${BUILD_COMMAND} -build ${appInfo[1]}/${BUILD_VARIANT}" + sh "${BUILD_COMMAND} -build ${project}/${build_variant}" } else { - bat "%BUILD_COMMAND% -build ${appInfo[1]}/${BUILD_VARIANT}" + bat "%BUILD_COMMAND% -build ${project}/${build_variant}" } } - echo "Looking at: ${appInfo[2]}" + echo "Export path at: ${exportpath}" script { - env.destFolder = "${WORKSPACE}/export/${appInfo[1]}" - env.srcFile = "${WORKSPACE}/${appInfo[2]}" + env.destFolder = "${WORKSPACE}/export/${project}" + env.srcFile = "${WORKSPACE}/${exportpath}" } dir (env.destFolder) { - if (appInfo[2]) { + if (exportpath) { echo "Copy ${srcFile} to ${destFolder}" if (isUnix()) { sh 'cp \"${srcFile}\" ${destFolder}' From 12a002f5a5dbe22a22255019d5ea27364005c179 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 19 Dec 2017 15:35:20 +0000 Subject: [PATCH 032/122] Make variants of build all in one run --- build/eclipsebuild/eclipsebuild.gsh | 1 + 1 file changed, 1 insertion(+) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index 579a413..c7876d2 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -20,6 +20,7 @@ def doBuild(apps) { script { env.destFolder = "${WORKSPACE}/export/${project}" env.srcFile = "${WORKSPACE}/${exportpath}" + env.srcFileExpanded = "${srcFile}" } dir (env.destFolder) { if (exportpath) { From ff5b8f515e7514a31e5aecbb7022c8344b81f9a5 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 19 Dec 2017 15:43:11 +0000 Subject: [PATCH 033/122] Make variants of build all in one run --- build/eclipsebuild/eclipsebuild.gsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index c7876d2..a4ee79a 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -20,16 +20,16 @@ def doBuild(apps) { script { env.destFolder = "${WORKSPACE}/export/${project}" env.srcFile = "${WORKSPACE}/${exportpath}" - env.srcFileExpanded = "${srcFile}" + env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") } dir (env.destFolder) { if (exportpath) { - echo "Copy ${srcFile} to ${destFolder}" + echo "Copy ${srcFileExpanded} to ${destFolder}" if (isUnix()) { - sh 'cp \"${srcFile}\" ${destFolder}' + sh 'cp \"${srcFileExpanded}\" ${destFolder}' } else { - bat 'copy \"%srcFile%\" %destFolder%' + bat 'copy \"%srcFileExpanded%\" %destFolder%' } } } From c21c6348a423654bb9a9d863863877b2bf4ba371 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 19 Dec 2017 16:16:09 +0000 Subject: [PATCH 034/122] Make variants of build all in one run --- build/eclipsebuild/eclipsebuild.gsh | 50 ++++++++++++++--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index a4ee79a..6e24393 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -1,38 +1,38 @@ // Build and export files def doBuild(apps) { for (appInfo in apps ) { - env.build = appInfo[0] - env.project = appInfo[1] - env.variants = appInfo[2] - env.exportpath = appInfo[3] - if (build) - { + build = appInfo[0] + project = appInfo[1] + variants = appInfo[2] + exportpath = appInfo[3] + if (build) { for (build_variant in variants) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) - if (isUnix()) { - sh "${BUILD_COMMAND} -build ${project}/${build_variant}" - } - else { - bat "%BUILD_COMMAND% -build ${project}/${build_variant}" - } - } - echo "Export path at: ${exportpath}" - script { - env.destFolder = "${WORKSPACE}/export/${project}" - env.srcFile = "${WORKSPACE}/${exportpath}" - env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") - } - dir (env.destFolder) { - if (exportpath) { - echo "Copy ${srcFileExpanded} to ${destFolder}" if (isUnix()) { - sh 'cp \"${srcFileExpanded}\" ${destFolder}' + sh "${BUILD_COMMAND} -build ${project}/${build_variant}" } else { - bat 'copy \"%srcFileExpanded%\" %destFolder%' + bat "%BUILD_COMMAND% -build ${project}/${build_variant}" } } - } + echo "Export path at: ${exportpath}" + script { + env.destFolder = "${WORKSPACE}/export/${project}" + env.srcFile = "${WORKSPACE}/${exportpath}" + env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") + } + dir (env.destFolder) { + if (exportpath) { + echo "Copy ${srcFileExpanded} to ${destFolder}" + if (isUnix()) { + sh 'cp \"${srcFileExpanded}\" ${destFolder}' + } + else { + bat 'copy \"%srcFileExpanded%\" %destFolder%' + } + } + } + } } } } From e76809830b161294c1c832747423df3728ac033e Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 19 Dec 2017 16:26:19 +0000 Subject: [PATCH 035/122] Make variants of build all in one run --- build/eclipsebuild/eclipsebuild.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index 6e24393..351f9d5 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -17,7 +17,7 @@ def doBuild(apps) { } echo "Export path at: ${exportpath}" script { - env.destFolder = "${WORKSPACE}/export/${project}" + env.destFolder = "${WORKSPACE}/export/${build_variant}/${project}" env.srcFile = "${WORKSPACE}/${exportpath}" env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") } From 75d8716a0a6ceb1e53a64984fd9765b5323cb8f8 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 19 Dec 2017 16:30:18 +0000 Subject: [PATCH 036/122] Make variants of build all in one run --- build/eclipsebuild/eclipsebuild.gsh | 30 +++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index 351f9d5..26ed411 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -15,20 +15,22 @@ def doBuild(apps) { bat "%BUILD_COMMAND% -build ${project}/${build_variant}" } } - echo "Export path at: ${exportpath}" - script { - env.destFolder = "${WORKSPACE}/export/${build_variant}/${project}" - env.srcFile = "${WORKSPACE}/${exportpath}" - env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") - } - dir (env.destFolder) { - if (exportpath) { - echo "Copy ${srcFileExpanded} to ${destFolder}" - if (isUnix()) { - sh 'cp \"${srcFileExpanded}\" ${destFolder}' - } - else { - bat 'copy \"%srcFileExpanded%\" %destFolder%' + if (exportpath) { + echo "Export path at: ${exportpath}" + script { + env.destFolder = "${WORKSPACE}/export/${build_variant}/${project}" + env.srcFile = "${WORKSPACE}/${exportpath}" + env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") + } + dir (env.destFolder) { + if (exportpath) { + echo "Copy ${srcFileExpanded} to ${destFolder}" + if (isUnix()) { + sh 'cp \"${srcFileExpanded}\" ${destFolder}' + } + else { + bat 'copy \"%srcFileExpanded%\" %destFolder%' + } } } } From cfbc3e70c58f182d0eefd7e70f58cbc2ec5a9186 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 19 Dec 2017 18:17:15 +0000 Subject: [PATCH 037/122] Add version stamping --- versionstamping/.project | 17 ++++++++++++++ versionstamping/.pydevproject | 8 +++++++ versionstamping/versionstamper.py | 37 +++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 versionstamping/.project create mode 100644 versionstamping/.pydevproject create mode 100644 versionstamping/versionstamper.py diff --git a/versionstamping/.project b/versionstamping/.project new file mode 100644 index 0000000..74928d6 --- /dev/null +++ b/versionstamping/.project @@ -0,0 +1,17 @@ + + + versionstamping + + + + + + org.python.pydev.PyDevBuilder + + + + + + org.python.pydev.pythonNature + + diff --git a/versionstamping/.pydevproject b/versionstamping/.pydevproject new file mode 100644 index 0000000..746d0f0 --- /dev/null +++ b/versionstamping/.pydevproject @@ -0,0 +1,8 @@ + + + +/${PROJECT_DIR_NAME} + +python 3.0 +python35 + diff --git a/versionstamping/versionstamper.py b/versionstamping/versionstamper.py new file mode 100644 index 0000000..45c94e2 --- /dev/null +++ b/versionstamping/versionstamper.py @@ -0,0 +1,37 @@ +import argparse +import sys +import shutil +from builtins import FileNotFoundError + +def main(argv): + parser = argparse.ArgumentParser(description="Look for version number pattern in file and replace with autobuild version number") + + # Call once arguments to allow or disallow something + parser.add_argument('-f', '--filetoconvert', help='The file to convert') + parser.add_argument('-p', '--pattern', default='1.30000.0.0', help='The pattern to search for and replace') + parser.add_argument('-s', '--substitute', help='The new version number that will substitute the pattern') + + args = parser.parse_args(argv) + + filetoconvert = args.filetoconvert + pattern = args.pattern + substitute = args.substitute + + print("Converting incidences of {0} with {1} in file: {2}\n".format(pattern, substitute, filetoconvert)) + + filecopy = filetoconvert + ".orig" + try: + shutil.move(filetoconvert, filecopy) + except FileNotFoundError: + print("Could not find file: {0}\n".format(filetoconvert)) + return 1 + + with open(filetoconvert, 'x') as f: + with open(filecopy) as c: + converted = c.read().replace(pattern, substitute) + f.write(converted) + + return 0 + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) From 64926607ca790789319e01f03ab5595f546b6eb7 Mon Sep 17 00:00:00 2001 From: georgelinsdell Date: Wed, 20 Dec 2017 15:09:34 +0000 Subject: [PATCH 038/122] REVIEW ME: Changing the versionstamp target from 1.30000.0.0 to 1.3000.0.0 so that it stamps over what the ESW is currently outputting by default. This may need to be reverted and the version of the ESW output changed. --- versionstamping/versionstamper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versionstamping/versionstamper.py b/versionstamping/versionstamper.py index 45c94e2..8e445d2 100644 --- a/versionstamping/versionstamper.py +++ b/versionstamping/versionstamper.py @@ -8,7 +8,7 @@ def main(argv): # Call once arguments to allow or disallow something parser.add_argument('-f', '--filetoconvert', help='The file to convert') - parser.add_argument('-p', '--pattern', default='1.30000.0.0', help='The pattern to search for and replace') + parser.add_argument('-p', '--pattern', default='1.3000.0.0', help='The pattern to search for and replace') parser.add_argument('-s', '--substitute', help='The new version number that will substitute the pattern') args = parser.parse_args(argv) From 3c1b453b21ee7bb07b8e93f31ca7a4bf118b206c Mon Sep 17 00:00:00 2001 From: georgelinsdell Date: Wed, 20 Dec 2017 15:16:24 +0000 Subject: [PATCH 039/122] Reverting change as i have realized the blunder --- versionstamping/versionstamper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versionstamping/versionstamper.py b/versionstamping/versionstamper.py index 8e445d2..45c94e2 100644 --- a/versionstamping/versionstamper.py +++ b/versionstamping/versionstamper.py @@ -8,7 +8,7 @@ def main(argv): # Call once arguments to allow or disallow something parser.add_argument('-f', '--filetoconvert', help='The file to convert') - parser.add_argument('-p', '--pattern', default='1.3000.0.0', help='The pattern to search for and replace') + parser.add_argument('-p', '--pattern', default='1.30000.0.0', help='The pattern to search for and replace') parser.add_argument('-s', '--substitute', help='The new version number that will substitute the pattern') args = parser.parse_args(argv) From f3107d5dcfc9cee65a8ac3be876611cea2b417dd Mon Sep 17 00:00:00 2001 From: georgelinsdell Date: Wed, 20 Dec 2017 15:35:58 +0000 Subject: [PATCH 040/122] Adding Debugging for conversion script, Reverting the conversion values for build.gsh --- versionstamping/versionstamper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/versionstamping/versionstamper.py b/versionstamping/versionstamper.py index 45c94e2..ff5eb0d 100644 --- a/versionstamping/versionstamper.py +++ b/versionstamping/versionstamper.py @@ -28,7 +28,9 @@ def main(argv): with open(filetoconvert, 'x') as f: with open(filecopy) as c: + print("Detected %s instances of %s pre-conversion"%(c.count(pattern),pattern)) converted = c.read().replace(pattern, substitute) + print("Confirmed %s instances of %s post-conversion"%s(converted.count(substitute),substitute)) f.write(converted) return 0 From 35cbc075a36d1a0ed8f83e8a7ef4651f23c5ef79 Mon Sep 17 00:00:00 2001 From: georgelinsdell Date: Wed, 20 Dec 2017 15:37:44 +0000 Subject: [PATCH 041/122] Read the file before attempting to count instances within it. --- versionstamping/versionstamper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versionstamping/versionstamper.py b/versionstamping/versionstamper.py index ff5eb0d..8b43e48 100644 --- a/versionstamping/versionstamper.py +++ b/versionstamping/versionstamper.py @@ -28,7 +28,7 @@ def main(argv): with open(filetoconvert, 'x') as f: with open(filecopy) as c: - print("Detected %s instances of %s pre-conversion"%(c.count(pattern),pattern)) + print("Detected %s instances of %s pre-conversion"%(c.read().count(pattern),pattern)) converted = c.read().replace(pattern, substitute) print("Confirmed %s instances of %s post-conversion"%s(converted.count(substitute),substitute)) f.write(converted) From 58feb9612024208857ecc670294a931876d55949 Mon Sep 17 00:00:00 2001 From: georgelinsdell Date: Wed, 20 Dec 2017 15:38:48 +0000 Subject: [PATCH 042/122] silly 's' --- versionstamping/versionstamper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versionstamping/versionstamper.py b/versionstamping/versionstamper.py index 8b43e48..48d9f45 100644 --- a/versionstamping/versionstamper.py +++ b/versionstamping/versionstamper.py @@ -30,7 +30,7 @@ def main(argv): with open(filecopy) as c: print("Detected %s instances of %s pre-conversion"%(c.read().count(pattern),pattern)) converted = c.read().replace(pattern, substitute) - print("Confirmed %s instances of %s post-conversion"%s(converted.count(substitute),substitute)) + print("Confirmed %s instances of %s post-conversion"%(converted.count(substitute),substitute)) f.write(converted) return 0 From 1124ca5cd683fa690db227c97d7b9e458c1f0e55 Mon Sep 17 00:00:00 2001 From: georgelinsdell Date: Wed, 20 Dec 2017 15:51:45 +0000 Subject: [PATCH 043/122] close the files after we have read/written them. explicily open copy file for reading --- versionstamping/versionstamper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/versionstamping/versionstamper.py b/versionstamping/versionstamper.py index 48d9f45..f42e54d 100644 --- a/versionstamping/versionstamper.py +++ b/versionstamping/versionstamper.py @@ -27,11 +27,13 @@ def main(argv): return 1 with open(filetoconvert, 'x') as f: - with open(filecopy) as c: + with open(filecopy,'r') as c: print("Detected %s instances of %s pre-conversion"%(c.read().count(pattern),pattern)) converted = c.read().replace(pattern, substitute) print("Confirmed %s instances of %s post-conversion"%(converted.count(substitute),substitute)) f.write(converted) + c.close() + f.close() return 0 From 9b75cd07247ae0d7908a709611a795709593928e Mon Sep 17 00:00:00 2001 From: georgelinsdell Date: Wed, 20 Dec 2017 15:52:52 +0000 Subject: [PATCH 044/122] Print Converted as debug info. --- versionstamping/versionstamper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/versionstamping/versionstamper.py b/versionstamping/versionstamper.py index f42e54d..d953aa4 100644 --- a/versionstamping/versionstamper.py +++ b/versionstamping/versionstamper.py @@ -30,6 +30,7 @@ def main(argv): with open(filecopy,'r') as c: print("Detected %s instances of %s pre-conversion"%(c.read().count(pattern),pattern)) converted = c.read().replace(pattern, substitute) + print ("DEBUG: %s "%converted) print("Confirmed %s instances of %s post-conversion"%(converted.count(substitute),substitute)) f.write(converted) c.close() From 42bdcc82e2e35fa367d2e7cf66ed6490cc07fc43 Mon Sep 17 00:00:00 2001 From: georgelinsdell Date: Wed, 20 Dec 2017 15:58:54 +0000 Subject: [PATCH 045/122] Read to local variable rather than double reading from file. --- versionstamping/versionstamper.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/versionstamping/versionstamper.py b/versionstamping/versionstamper.py index d953aa4..da01aa2 100644 --- a/versionstamping/versionstamper.py +++ b/versionstamping/versionstamper.py @@ -28,12 +28,13 @@ def main(argv): with open(filetoconvert, 'x') as f: with open(filecopy,'r') as c: - print("Detected %s instances of %s pre-conversion"%(c.read().count(pattern),pattern)) - converted = c.read().replace(pattern, substitute) + fileread = c.read() + c.close() + print("Detected %s instances of %s pre-conversion"%(fileread.count(pattern),pattern)) + converted = fileread.replace(pattern, substitute) print ("DEBUG: %s "%converted) print("Confirmed %s instances of %s post-conversion"%(converted.count(substitute),substitute)) f.write(converted) - c.close() f.close() return 0 From ae37de4bc32d1ca82b254d7a9cda94319b541e41 Mon Sep 17 00:00:00 2001 From: georgelinsdell Date: Wed, 20 Dec 2017 16:00:08 +0000 Subject: [PATCH 046/122] Comment Debug Print --- versionstamping/versionstamper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versionstamping/versionstamper.py b/versionstamping/versionstamper.py index da01aa2..ebfad73 100644 --- a/versionstamping/versionstamper.py +++ b/versionstamping/versionstamper.py @@ -32,7 +32,7 @@ def main(argv): c.close() print("Detected %s instances of %s pre-conversion"%(fileread.count(pattern),pattern)) converted = fileread.replace(pattern, substitute) - print ("DEBUG: %s "%converted) + #print ("DEBUG: %s "%converted) print("Confirmed %s instances of %s post-conversion"%(converted.count(substitute),substitute)) f.write(converted) f.close() From 3c0896f1ee63e63d11c065e8836c9725fbf5b8d2 Mon Sep 17 00:00:00 2001 From: georgelinsdell Date: Wed, 20 Dec 2017 16:32:16 +0000 Subject: [PATCH 047/122] Remove File.close() calls as they are not neccessary --- versionstamping/versionstamper.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/versionstamping/versionstamper.py b/versionstamping/versionstamper.py index ebfad73..3e59c6f 100644 --- a/versionstamping/versionstamper.py +++ b/versionstamping/versionstamper.py @@ -29,13 +29,11 @@ def main(argv): with open(filetoconvert, 'x') as f: with open(filecopy,'r') as c: fileread = c.read() - c.close() print("Detected %s instances of %s pre-conversion"%(fileread.count(pattern),pattern)) converted = fileread.replace(pattern, substitute) #print ("DEBUG: %s "%converted) print("Confirmed %s instances of %s post-conversion"%(converted.count(substitute),substitute)) f.write(converted) - f.close() return 0 From 82b7ef85bd50d57db1b3bdfe458430ca2c5ab8a8 Mon Sep 17 00:00:00 2001 From: Damian Smith Date: Fri, 12 Jan 2018 15:57:39 +0000 Subject: [PATCH 048/122] Update versioninfo.py so that default prefix ends with a period (1.30000.0.) --- versionnumbering/versioninfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versionnumbering/versioninfo.py b/versionnumbering/versioninfo.py index a4162e0..59b5225 100644 --- a/versionnumbering/versioninfo.py +++ b/versionnumbering/versioninfo.py @@ -68,7 +68,7 @@ def getGitRevision(gitrootpath, basenumber): def getVersionPrefix(sourcebranch): print("Determining version number prefix from source branch name: {0}".format(sourcebranch)) - defaultversionprefix = "1.30000.0" + defaultversionprefix = "1.30000.0." splits = sourcebranch.split('/') if len(splits) < 1: print("Source branch name is invalid. Defaulting to: {0}".format(defaultversionprefix)) From 22d283a9985c4ea16ce1ea0af4235f04bb7b25dd Mon Sep 17 00:00:00 2001 From: danielbujnik Date: Tue, 13 Feb 2018 09:56:48 +0000 Subject: [PATCH 049/122] Accounting for project names containing spaces. --- build/eclipsebuild/eclipsebuild.gsh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index 26ed411..5d55fe5 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -1,18 +1,19 @@ // Build and export files def doBuild(apps) { for (appInfo in apps ) { - build = appInfo[0] - project = appInfo[1] - variants = appInfo[2] - exportpath = appInfo[3] + (build, project, variants, exportpath) = appInfo if (build) { for (build_variant in variants) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) if (isUnix()) { - sh "${BUILD_COMMAND} -build ${project}/${build_variant}" + sh """ + "${BUILD_COMMAND}" -build "${project}/${build_variant}" + """ } else { - bat "%BUILD_COMMAND% -build ${project}/${build_variant}" + bat """ + "%BUILD_COMMAND%" -build "${project}\\${build_variant}" + """ } } if (exportpath) { @@ -39,4 +40,4 @@ def doBuild(apps) { } } -return this; \ No newline at end of file +return this; From 74e7696ef6dc4f748e810de6300b8ad1d737164f Mon Sep 17 00:00:00 2001 From: danielbujnik Date: Tue, 13 Feb 2018 10:39:40 +0000 Subject: [PATCH 050/122] Auto build fix. --- build/eclipsebuild/eclipsebuild.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index 5d55fe5..da349c6 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -7,7 +7,7 @@ def doBuild(apps) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) if (isUnix()) { sh """ - "${BUILD_COMMAND}" -build "${project}/${build_variant}" + \"${BUILD_COMMAND}\" -build \"${project}/${build_variant}\" """ } else { From 7d8891e227f95361fdc0a2b80b3c1cb114053525 Mon Sep 17 00:00:00 2001 From: danielbujnik Date: Tue, 13 Feb 2018 10:53:00 +0000 Subject: [PATCH 051/122] Auto build fix. --- build/eclipsebuild/eclipsebuild.gsh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index da349c6..b4bbc34 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -6,10 +6,8 @@ def doBuild(apps) { for (build_variant in variants) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) if (isUnix()) { - sh """ - \"${BUILD_COMMAND}\" -build \"${project}/${build_variant}\" - """ - } + sh "${BUILD_COMMAND} -build \"${project}/${build_variant}\"" + } else { bat """ "%BUILD_COMMAND%" -build "${project}\\${build_variant}" From ec0055e572f26eedfbd33134a2da4a1d403e04eb Mon Sep 17 00:00:00 2001 From: danielbujnik Date: Tue, 13 Feb 2018 10:56:32 +0000 Subject: [PATCH 052/122] Auto build fix. --- build/eclipsebuild/eclipsebuild.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index b4bbc34..0ba188d 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -6,7 +6,7 @@ def doBuild(apps) { for (build_variant in variants) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) if (isUnix()) { - sh "${BUILD_COMMAND} -build \"${project}/${build_variant}\"" + sh '${BUILD_COMMAND} -build "${project}/${build_variant}"' } else { bat """ From 61d581de84a5cef38c55e2e345f20f9b447b9130 Mon Sep 17 00:00:00 2001 From: danielbujnik Date: Tue, 13 Feb 2018 11:02:51 +0000 Subject: [PATCH 053/122] Auto build fix. --- build/eclipsebuild/eclipsebuild.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index 0ba188d..b4bbc34 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -6,7 +6,7 @@ def doBuild(apps) { for (build_variant in variants) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) if (isUnix()) { - sh '${BUILD_COMMAND} -build "${project}/${build_variant}"' + sh "${BUILD_COMMAND} -build \"${project}/${build_variant}\"" } else { bat """ From 4400c698df7a556eca83fe1d474c0d066486f6d6 Mon Sep 17 00:00:00 2001 From: danielbujnik Date: Tue, 13 Feb 2018 11:08:10 +0000 Subject: [PATCH 054/122] Auto build fix. --- build/eclipsebuild/eclipsebuild.gsh | 1 + 1 file changed, 1 insertion(+) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index b4bbc34..367b454 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -6,6 +6,7 @@ def doBuild(apps) { for (build_variant in variants) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) if (isUnix()) { + echo "Build command: ${BUILD_COMMAND} -build \"${project}/${build_variant}\"" sh "${BUILD_COMMAND} -build \"${project}/${build_variant}\"" } else { From c55ffd413675729698bcf1467d25ba05306bc3b6 Mon Sep 17 00:00:00 2001 From: danielbujnik Date: Tue, 13 Feb 2018 11:29:10 +0000 Subject: [PATCH 055/122] Auto build fix. --- build/eclipsebuild/eclipsebuild.gsh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index 367b454..5384341 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -6,13 +6,11 @@ def doBuild(apps) { for (build_variant in variants) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) if (isUnix()) { - echo "Build command: ${BUILD_COMMAND} -build \"${project}/${build_variant}\"" - sh "${BUILD_COMMAND} -build \"${project}/${build_variant}\"" + echo "Build command: \"${BUILD_COMMAND}\" -build \"${project}/${build_variant}\"" + sh "\"${BUILD_COMMAND}\" -build \"${project}/${build_variant}\"" } else { - bat """ - "%BUILD_COMMAND%" -build "${project}\\${build_variant}" - """ + bat "\"%BUILD_COMMAND%\" -build \"${project}/${build_variant}\"" } } if (exportpath) { From a21ec9aace7535a45026110a1fd008fdadd4060a Mon Sep 17 00:00:00 2001 From: danielbujnik Date: Tue, 13 Feb 2018 11:40:39 +0000 Subject: [PATCH 056/122] Revert "Auto build fix." This reverts commit 29e58eead620367c9beccb69b35c6715a5c2ef33. --- build/eclipsebuild/eclipsebuild.gsh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index 5384341..367b454 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -6,11 +6,13 @@ def doBuild(apps) { for (build_variant in variants) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) if (isUnix()) { - echo "Build command: \"${BUILD_COMMAND}\" -build \"${project}/${build_variant}\"" - sh "\"${BUILD_COMMAND}\" -build \"${project}/${build_variant}\"" + echo "Build command: ${BUILD_COMMAND} -build \"${project}/${build_variant}\"" + sh "${BUILD_COMMAND} -build \"${project}/${build_variant}\"" } else { - bat "\"%BUILD_COMMAND%\" -build \"${project}/${build_variant}\"" + bat """ + "%BUILD_COMMAND%" -build "${project}\\${build_variant}" + """ } } if (exportpath) { From 70b23d7049b5a986935164e72e506d17c7de1903 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 18 Feb 2018 17:03:14 +0000 Subject: [PATCH 057/122] Move commonly used methods out to Common_scripts --- commandline/commandline.gsh | 12 ++++++++ configuration/configuration.gsh | 34 +++++++++++++++++++++ versioncontrol/git.gsh | 53 +++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 commandline/commandline.gsh create mode 100644 configuration/configuration.gsh create mode 100644 versioncontrol/git.gsh diff --git a/commandline/commandline.gsh b/commandline/commandline.gsh new file mode 100644 index 0000000..c03add7 --- /dev/null +++ b/commandline/commandline.gsh @@ -0,0 +1,12 @@ +String getCommandOutput(String cmd) { + if (isUnix()) { + return sh(returnStdout: true, script: '#!/bin/sh -e\n' + cmd).trim() + } else { + return bat(returnStdout: true, script: """ + @echo off + ${cmd} + """ + ).trim() + } +} + diff --git a/configuration/configuration.gsh b/configuration/configuration.gsh new file mode 100644 index 0000000..424765e --- /dev/null +++ b/configuration/configuration.gsh @@ -0,0 +1,34 @@ +def githelper = load("Common_scripts/versioncontrol/git.gsh") + +configurationCollection = [:] + +def registerConfigurationInfo(String configurationName, String configurationURL, String configurationVersion, String configurationSHA) { + def ConfigurationInfo = [configurationURL, configurationVersion, configurationSHA] + configurationCollection.put(configurationName, ConfigurationInfo) +} + +def registerPipelineScriptConfiguration() { + registerConfigurationInfo('pipeline script', '-', '-', getGitInfo("${WORKSPACE}")) +} + +def saveConfigurationInVersionInfo() { + dir("${WORKSPACE}\\version") { + writeFile file: 'configuration.txt', text: getFormattedConfiguration() + } +} + +String getFormattedConfiguration() { + String formattedInfo = "" + def keys = configurationCollection.keySet().sort() + for (key in keys) { + (configurationURL, configurationVersion, configurationSHA) = configurationCollection.get(key) + formattedLine = String.format("%s:%s,%s,%s%n", key, configurationURL, configurationVersion, configurationSHA) + formattedInfo += formattedLine + } + return formattedInfo +} + +def gitCheckoutAndRegister(String tool, String gitURL, String revision, String targetDir, String repoRoot = "", int cloneDepth = 1, boolean shallowClone = true) { + githelper.gitCheckout(gitURL, revision, targetDir, repoRoot, cloneDepth, shallowClone) + registerConfigurationInfo(tool, gitURL, revision, getGitInfo(targetDir)) +} diff --git a/versioncontrol/git.gsh b/versioncontrol/git.gsh new file mode 100644 index 0000000..1f6d88e --- /dev/null +++ b/versioncontrol/git.gsh @@ -0,0 +1,53 @@ +def commandlinehelper = load("Common_scripts/commandline/commandline.gsh") + +String getGitInfo(String workingSetRootPath) { + dir(workingSetRootPath) { + return commandlinehelper.getCommandOutput('git log -1 --format=oneline') + } +} + +def gitCheckout(String gitURL, String revision, String targetDir, String repoRoot = "", int cloneDepth = 1, boolean shallowClone = true) { + checkout([ + $class: 'GitSCM', + userRemoteConfigs: [ + [url: gitURL] + ], + branches: [ + [name: revision] + ], + doGenerateSubmoduleConfigurations: false, + extensions: [ + [$class: 'CleanBeforeCheckout'], + [$class: 'CloneOption', depth: cloneDepth, noTags: false, reference: "${REPO_ROOT}/${repoRoot}", shallow: shallowClone, timeout: 120], + [$class: 'CheckoutOption', timeout: 60], + [$class: 'RelativeTargetDirectory', relativeTargetDir: targetDir] + ], + submoduleCfg: [], + ]) +} + +String getSHAFromVersion(String versionFolder) { + dir (versionFolder) { + srcRevision = readFile("gitrevision.txt").trim() + } + return srcRevision +} + +boolean checkAllVersionsAgree(java.util.LinkedHashMap versions) { + def keys = versions.keySet() + if (keys.size() <= 1) { + return false + } else { + version = "" + for (key in keys) { + nextversion = versions.get(key) + if (version == "") { + version = nextversion + } + if (nextversion != version) { + return false + } + } + } + return true +} From ca2db55d2bb2a292e1bc070eceff75f6c4721174 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 18 Feb 2018 17:16:02 +0000 Subject: [PATCH 058/122] Move commonly used methods out to Common_scripts --- configuration/configuration.gsh | 4 ++-- versioncontrol/git.gsh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configuration/configuration.gsh b/configuration/configuration.gsh index 424765e..1f86c42 100644 --- a/configuration/configuration.gsh +++ b/configuration/configuration.gsh @@ -1,4 +1,4 @@ -def githelper = load("Common_scripts/versioncontrol/git.gsh") +def gh = load("${WORKSPACE}/Common_scripts/versioncontrol/git.gsh") configurationCollection = [:] @@ -29,6 +29,6 @@ String getFormattedConfiguration() { } def gitCheckoutAndRegister(String tool, String gitURL, String revision, String targetDir, String repoRoot = "", int cloneDepth = 1, boolean shallowClone = true) { - githelper.gitCheckout(gitURL, revision, targetDir, repoRoot, cloneDepth, shallowClone) + gh.gitCheckout(gitURL, revision, targetDir, repoRoot, cloneDepth, shallowClone) registerConfigurationInfo(tool, gitURL, revision, getGitInfo(targetDir)) } diff --git a/versioncontrol/git.gsh b/versioncontrol/git.gsh index 1f6d88e..90dc7ee 100644 --- a/versioncontrol/git.gsh +++ b/versioncontrol/git.gsh @@ -1,8 +1,8 @@ -def commandlinehelper = load("Common_scripts/commandline/commandline.gsh") +def clh = load("${WORKSPACE}/Common_scripts/commandline/commandline.gsh") String getGitInfo(String workingSetRootPath) { dir(workingSetRootPath) { - return commandlinehelper.getCommandOutput('git log -1 --format=oneline') + return clh.getCommandOutput('git log -1 --format=oneline') } } From 1e0f22ed5e86d8e0765b764c7cedea1522280c98 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 18 Feb 2018 17:19:29 +0000 Subject: [PATCH 059/122] Move commonly used methods out to Common_scripts --- commandline/commandline.gsh | 1 + 1 file changed, 1 insertion(+) diff --git a/commandline/commandline.gsh b/commandline/commandline.gsh index c03add7..df99a75 100644 --- a/commandline/commandline.gsh +++ b/commandline/commandline.gsh @@ -10,3 +10,4 @@ String getCommandOutput(String cmd) { } } +return this \ No newline at end of file From 4c6372bb8c06143a4a017e02368a40cfd53eb03c Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 18 Feb 2018 17:22:49 +0000 Subject: [PATCH 060/122] Move commonly used methods out to Common_scripts --- configuration/configuration.gsh | 2 ++ versioncontrol/git.gsh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configuration/configuration.gsh b/configuration/configuration.gsh index 1f86c42..aa732e6 100644 --- a/configuration/configuration.gsh +++ b/configuration/configuration.gsh @@ -32,3 +32,5 @@ def gitCheckoutAndRegister(String tool, String gitURL, String revision, String t gh.gitCheckout(gitURL, revision, targetDir, repoRoot, cloneDepth, shallowClone) registerConfigurationInfo(tool, gitURL, revision, getGitInfo(targetDir)) } + +return this diff --git a/versioncontrol/git.gsh b/versioncontrol/git.gsh index 90dc7ee..06e5b50 100644 --- a/versioncontrol/git.gsh +++ b/versioncontrol/git.gsh @@ -51,3 +51,5 @@ boolean checkAllVersionsAgree(java.util.LinkedHashMap versions) { } return true } + +return this \ No newline at end of file From a1448ac8509c0b512092295700f1f0a6f61bba27 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 18 Feb 2018 17:27:26 +0000 Subject: [PATCH 061/122] Move commonly used methods out to Common_scripts --- configuration/configuration.gsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configuration/configuration.gsh b/configuration/configuration.gsh index aa732e6..976ebf8 100644 --- a/configuration/configuration.gsh +++ b/configuration/configuration.gsh @@ -8,7 +8,7 @@ def registerConfigurationInfo(String configurationName, String configurationURL, } def registerPipelineScriptConfiguration() { - registerConfigurationInfo('pipeline script', '-', '-', getGitInfo("${WORKSPACE}")) + registerConfigurationInfo('pipeline script', '-', '-', gh.getGitInfo("${WORKSPACE}")) } def saveConfigurationInVersionInfo() { @@ -30,7 +30,7 @@ String getFormattedConfiguration() { def gitCheckoutAndRegister(String tool, String gitURL, String revision, String targetDir, String repoRoot = "", int cloneDepth = 1, boolean shallowClone = true) { gh.gitCheckout(gitURL, revision, targetDir, repoRoot, cloneDepth, shallowClone) - registerConfigurationInfo(tool, gitURL, revision, getGitInfo(targetDir)) + registerConfigurationInfo(tool, gitURL, revision, gh.getGitInfo(targetDir)) } return this From d09d20c7b663d7a62cad3130ee91a05a96ab5f4a Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 18 Feb 2018 17:30:21 +0000 Subject: [PATCH 062/122] Move commonly used methods out to Common_scripts --- configuration/configuration.gsh | 2 +- versioncontrol/git.gsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configuration/configuration.gsh b/configuration/configuration.gsh index 976ebf8..29cd7e3 100644 --- a/configuration/configuration.gsh +++ b/configuration/configuration.gsh @@ -1,4 +1,4 @@ -def gh = load("${WORKSPACE}/Common_scripts/versioncontrol/git.gsh") +gh = load("${WORKSPACE}/Common_scripts/versioncontrol/git.gsh") configurationCollection = [:] diff --git a/versioncontrol/git.gsh b/versioncontrol/git.gsh index 06e5b50..fd633eb 100644 --- a/versioncontrol/git.gsh +++ b/versioncontrol/git.gsh @@ -1,4 +1,4 @@ -def clh = load("${WORKSPACE}/Common_scripts/commandline/commandline.gsh") +clh = load("${WORKSPACE}/Common_scripts/commandline/commandline.gsh") String getGitInfo(String workingSetRootPath) { dir(workingSetRootPath) { From 9d32414fca002f779a7d924953dcf4cd7b7778a6 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 18 Feb 2018 18:16:20 +0000 Subject: [PATCH 063/122] Check for undefined REPO_ROOT environment variable --- versioncontrol/git.gsh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/versioncontrol/git.gsh b/versioncontrol/git.gsh index fd633eb..145045c 100644 --- a/versioncontrol/git.gsh +++ b/versioncontrol/git.gsh @@ -7,6 +7,13 @@ String getGitInfo(String workingSetRootPath) { } def gitCheckout(String gitURL, String revision, String targetDir, String repoRoot = "", int cloneDepth = 1, boolean shallowClone = true) { + reporootenv = env.REPO_ROOT + if (reporootenv != mull && repoRoot != "") { + reporootpath = "${reporootenv.trim()}/${repoRoot}" + } else { + reporootpath = "" + echo "To improve Git performance: Define the REPO_ROOT enviroment to a path where a cache of git repositories can be placed on this slave" + } checkout([ $class: 'GitSCM', userRemoteConfigs: [ @@ -18,7 +25,7 @@ def gitCheckout(String gitURL, String revision, String targetDir, String repoRoo doGenerateSubmoduleConfigurations: false, extensions: [ [$class: 'CleanBeforeCheckout'], - [$class: 'CloneOption', depth: cloneDepth, noTags: false, reference: "${REPO_ROOT}/${repoRoot}", shallow: shallowClone, timeout: 120], + [$class: 'CloneOption', depth: cloneDepth, noTags: false, reference: reporootpath, shallow: shallowClone, timeout: 120], [$class: 'CheckoutOption', timeout: 60], [$class: 'RelativeTargetDirectory', relativeTargetDir: targetDir] ], From 69be84aac0e12da69f55d2c5b01f7ad22f775922 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 18 Feb 2018 18:17:26 +0000 Subject: [PATCH 064/122] Check for undefined REPO_ROOT environment variable --- versioncontrol/git.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versioncontrol/git.gsh b/versioncontrol/git.gsh index 145045c..70fe6bc 100644 --- a/versioncontrol/git.gsh +++ b/versioncontrol/git.gsh @@ -8,7 +8,7 @@ String getGitInfo(String workingSetRootPath) { def gitCheckout(String gitURL, String revision, String targetDir, String repoRoot = "", int cloneDepth = 1, boolean shallowClone = true) { reporootenv = env.REPO_ROOT - if (reporootenv != mull && repoRoot != "") { + if (reporootenv != null && repoRoot != "") { reporootpath = "${reporootenv.trim()}/${repoRoot}" } else { reporootpath = "" From d1a8c098a6ba03fe5461f82db036de2f48aa2c62 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Mon, 19 Feb 2018 17:50:05 +0000 Subject: [PATCH 065/122] Make the version number 1.20000.x if the branch name is .x or ..x --- versionnumbering/versioninfo.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/versionnumbering/versioninfo.py b/versionnumbering/versioninfo.py index 59b5225..45fd1ca 100644 --- a/versionnumbering/versioninfo.py +++ b/versionnumbering/versioninfo.py @@ -65,10 +65,14 @@ def getGitRevision(gitrootpath, basenumber): return (adjustedchangecount, revision, remoteinfo) -def getVersionPrefix(sourcebranch): +# Handle: +# origin/master +# origin/2.0.x + def getVersionPrefix(sourcebranch): print("Determining version number prefix from source branch name: {0}".format(sourcebranch)) defaultversionprefix = "1.30000.0." + mastertypeversionprefix = "1.20000.0." splits = sourcebranch.split('/') if len(splits) < 1: print("Source branch name is invalid. Defaulting to: {0}".format(defaultversionprefix)) @@ -77,7 +81,7 @@ def getVersionPrefix(sourcebranch): sourcebranch = splits[-1] if sourcebranch.lower().endswith("master"): # Special case - return "1.20000.0." + return mastertypeversionprefix splits = sourcebranch.split('.') versionprefix = "" @@ -86,21 +90,27 @@ def getVersionPrefix(sourcebranch): versionprefix = defaultversionprefix else: splitnumbercount = 0 + isIntermediateReleaseBranch = false for split in splits: if split.isdigit(): versionprefix += split + "." splitnumbercount += 1 else: + if split == "x": + isIntermediateReleaseBranch = true break if splitnumbercount > 2: break if splitnumbercount == 0: print("No leading numbers were found in source branch name so defaulting to: {0}".format(defaultversionprefix)) versionprefix = defaultversionprefix - elif splitnumbercount == 1: - versionprefix += "0.0." - elif splitnumbercount == 2: - versionprefix += "0." + else: + if isIntermediateReleaseBranch: + versionprefix = mastertypeversionprefix + elif splitnumbercount == 1: + versionprefix += "0.0." + elif splitnumbercount == 2: + versionprefix += "0." print("Determined version prefix to be: {0}".format(versionprefix)) return versionprefix From 061b3d4fcfb9fe3f0a853b63cf6ea48ea8f1ce0b Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Mon, 19 Feb 2018 18:14:49 +0000 Subject: [PATCH 066/122] Make the version number 1.20000.x if the branch name is .x or ..x --- .pydevproject | 2 +- versionnumbering/versioninfo.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pydevproject b/.pydevproject index d111c07..1ce5929 100644 --- a/.pydevproject +++ b/.pydevproject @@ -3,6 +3,6 @@ /${PROJECT_DIR_NAME} -python interpreter +python 2.7 python35 diff --git a/versionnumbering/versioninfo.py b/versionnumbering/versioninfo.py index 45fd1ca..d9e6681 100644 --- a/versionnumbering/versioninfo.py +++ b/versionnumbering/versioninfo.py @@ -68,7 +68,7 @@ def getGitRevision(gitrootpath, basenumber): # Handle: # origin/master # origin/2.0.x - def getVersionPrefix(sourcebranch): +def getVersionPrefix(sourcebranch): print("Determining version number prefix from source branch name: {0}".format(sourcebranch)) defaultversionprefix = "1.30000.0." @@ -90,14 +90,14 @@ def getGitRevision(gitrootpath, basenumber): versionprefix = defaultversionprefix else: splitnumbercount = 0 - isIntermediateReleaseBranch = false + isIntermediateReleaseBranch = False for split in splits: if split.isdigit(): versionprefix += split + "." splitnumbercount += 1 else: if split == "x": - isIntermediateReleaseBranch = true + isIntermediateReleaseBranch = True break if splitnumbercount > 2: break From 9af8da5da65ee4420ce6394e5c34c3fedf9fef8f Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 20 Feb 2018 11:13:49 +0000 Subject: [PATCH 067/122] gitrevision.txt and revision.txt file content were mixed up with previous way of generating version folder --- versionnumbering/versioninfo.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/versionnumbering/versioninfo.py b/versionnumbering/versioninfo.py index d9e6681..25644a6 100644 --- a/versionnumbering/versioninfo.py +++ b/versionnumbering/versioninfo.py @@ -115,7 +115,7 @@ def getVersionPrefix(sourcebranch): print("Determined version prefix to be: {0}".format(versionprefix)) return versionprefix -def writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevision, remoteinfo, buildnumber, buildstamp): +def writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevisioncount, gitrevision, remoteinfo, buildnumber, buildstamp): with open(os.path.join(versionfolder, "buildjobname.txt"), 'w') as f: f.write(buildjobname) @@ -123,6 +123,9 @@ def writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevision, r f.write(versionprefix) with open(os.path.join(versionfolder, "revision.txt"), 'w') as f: + f.write(gitrevisioncount) + + with open(os.path.join(versionfolder, "gitrevision.txt"), 'w') as f: f.write(gitrevision) with open(os.path.join(versionfolder, "remoteinfo.txt"), 'w') as f: @@ -195,7 +198,7 @@ USAGE buildstamp = versionprefix + str(gitrevisioncount) print("Build stamp is: {0}".format(buildstamp)) - writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevision, remoteinfo, buildnumber, buildstamp) + writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevisioncount, gitrevision, remoteinfo, buildnumber, buildstamp) return 0 except Exception as e: From d3ba4321ae5b3e3bedf77ec23d232a66b927c7f8 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 20 Feb 2018 11:38:11 +0000 Subject: [PATCH 068/122] The print server base revision number is 5000 --- versionnumbering/versioninfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versionnumbering/versioninfo.py b/versionnumbering/versioninfo.py index 25644a6..9a7cd6a 100644 --- a/versionnumbering/versioninfo.py +++ b/versionnumbering/versioninfo.py @@ -123,7 +123,7 @@ def writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevisioncou f.write(versionprefix) with open(os.path.join(versionfolder, "revision.txt"), 'w') as f: - f.write(gitrevisioncount) + f.write(str(gitrevisioncount)) with open(os.path.join(versionfolder, "gitrevision.txt"), 'w') as f: f.write(gitrevision) From 99bb2d6465220a29e7a3dfd7031dd49454f5013f Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Wed, 21 Feb 2018 13:28:27 +0000 Subject: [PATCH 069/122] Provide a parameter for deciding where files are exported --- build/eclipsebuild/eclipsebuild.gsh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/build/eclipsebuild/eclipsebuild.gsh index 367b454..30fe4d5 100644 --- a/build/eclipsebuild/eclipsebuild.gsh +++ b/build/eclipsebuild/eclipsebuild.gsh @@ -1,24 +1,24 @@ // Build and export files -def doBuild(apps) { +def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { for (appInfo in apps ) { (build, project, variants, exportpath) = appInfo if (build) { for (build_variant in variants) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) if (isUnix()) { - echo "Build command: ${BUILD_COMMAND} -build \"${project}/${build_variant}\"" + echo "Build command: ${BUILD_COMMAND} -build \"${project}/${build_variant}\"" sh "${BUILD_COMMAND} -build \"${project}/${build_variant}\"" - } + } else { bat """ - "%BUILD_COMMAND%" -build "${project}\\${build_variant}" - """ + "%BUILD_COMMAND%" -build "${project}\\${build_variant}" + """ } } if (exportpath) { echo "Export path at: ${exportpath}" script { - env.destFolder = "${WORKSPACE}/export/${build_variant}/${project}" + env.destFolder = "${exportfolder}/${build_variant}/${project}" env.srcFile = "${WORKSPACE}/${exportpath}" env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") } From 96ac5a636249e5ccb392cc2c78755de22afd4044 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Wed, 21 Feb 2018 16:47:21 +0000 Subject: [PATCH 070/122] Configuration information was not being written into version folder on linux machine --- configuration/configuration.gsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configuration/configuration.gsh b/configuration/configuration.gsh index 29cd7e3..b91e0a3 100644 --- a/configuration/configuration.gsh +++ b/configuration/configuration.gsh @@ -12,7 +12,8 @@ def registerPipelineScriptConfiguration() { } def saveConfigurationInVersionInfo() { - dir("${WORKSPACE}\\version") { + dir("${WORKSPACE}/version") { + echo "Writing configuration info to ${WORKSPACE}/version/configuration.txt" writeFile file: 'configuration.txt', text: getFormattedConfiguration() } } From 049b242a2a93c3e8efb4037ca6b82c3759b1baf6 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 23 Feb 2018 13:00:31 +0000 Subject: [PATCH 071/122] Change folders and files to match convention --- .../eclipsebuild.gsh => compile/eclipsebuild/eclipseds5build.gsh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename build/eclipsebuild/eclipsebuild.gsh => compile/eclipsebuild/eclipseds5build.gsh (100%) diff --git a/build/eclipsebuild/eclipsebuild.gsh b/compile/eclipsebuild/eclipseds5build.gsh similarity index 100% rename from build/eclipsebuild/eclipsebuild.gsh rename to compile/eclipsebuild/eclipseds5build.gsh From 17eae1e1357f6e7d3361639dc3bf184bd308f9bc Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 24 Feb 2018 09:17:05 +0000 Subject: [PATCH 072/122] Save the slave machine name in the version folder --- versionnumbering/versioninfo.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/versionnumbering/versioninfo.py b/versionnumbering/versioninfo.py index 9a7cd6a..a9d8738 100644 --- a/versionnumbering/versioninfo.py +++ b/versionnumbering/versioninfo.py @@ -22,6 +22,7 @@ __date__ = '2017-11-29' __updated__ = '2017-11-29' gitExecutable = os.getenv("GIT_EXECUTABLE", default="git") +slaveMachine = os.getenv("NODE_NAME", default="-") def resetFolder(versionfolder): print("Removing folders and contents of: {0}".format(versionfolder)) @@ -141,6 +142,9 @@ def writeversionfiles(versionfolder, buildjobname, versionprefix, gitrevisioncou with open(os.path.join(versionfolder, "buildstampcommasep.txt"), 'w') as f: f.write(buildstampcommasep) + with open(os.path.join(versionfolder, "buildmachine.txt"), 'w') as f: + f.write(slaveMachine) + def main(argv=None): # IGNORE:C0111 '''Command line options.''' From 423e88d3221238b488c2c1b9eeaa6bfe77d4f383 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 15:22:13 +0100 Subject: [PATCH 073/122] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 52 +++++++++++++++--------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 30fe4d5..e17f4b9 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -1,7 +1,34 @@ + +def doExport(exportpathlist, build_variant = "") { + for (exportpath in exportpathlist) { + echo "Export path at: ${exportpath}" + script { + if (build_variant) { + env.destFolder = "${exportfolder}/${build_variant}/${project}" + env.srcFile = "${WORKSPACE}/${exportpath}" + env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") + } + else { + env.destFolder = "${exportfolder}/${project}" + env.srcFileExpanded = "${WORKSPACE}/${exportpath}" + } + } + dir (env.destFolder) { + echo "Copy ${srcFileExpanded} to ${destFolder}" + if (isUnix()) { + sh 'cp \"${srcFileExpanded}\" ${destFolder}' + } + else { + bat 'copy \"%srcFileExpanded%\" %destFolder%' + } + } + } +} + // Build and export files def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { for (appInfo in apps ) { - (build, project, variants, exportpath) = appInfo + (build, project, variants, exportpathlist) = appInfo if (build) { for (build_variant in variants) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) @@ -15,27 +42,12 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { """ } } - if (exportpath) { - echo "Export path at: ${exportpath}" - script { - env.destFolder = "${exportfolder}/${build_variant}/${project}" - env.srcFile = "${WORKSPACE}/${exportpath}" - env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") - } - dir (env.destFolder) { - if (exportpath) { - echo "Copy ${srcFileExpanded} to ${destFolder}" - if (isUnix()) { - sh 'cp \"${srcFileExpanded}\" ${destFolder}' - } - else { - bat 'copy \"%srcFileExpanded%\" %destFolder%' - } - } - } - } + doExport(exportpathlist, build_variant) } } + else { + doExport(exportpathlist, build_variant) + } } } From a34f8ee1e896397e4e1eb7a7ca5331c07b748878 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 15:34:48 +0100 Subject: [PATCH 074/122] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index e17f4b9..065e64a 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -34,8 +34,8 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) if (isUnix()) { echo "Build command: ${BUILD_COMMAND} -build \"${project}/${build_variant}\"" - sh "${BUILD_COMMAND} -build \"${project}/${build_variant}\"" - } + sh "${BUILD_COMMAND} -build \"${project}/${build_variant}\"" + } else { bat """ "%BUILD_COMMAND%" -build "${project}\\${build_variant}" @@ -46,7 +46,7 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { } } else { - doExport(exportpathlist, build_variant) + doExport(exportpathlist) } } } From 07a0a49d06993d2423a87e5c9bbef438e1cce3ff Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 15:47:21 +0100 Subject: [PATCH 075/122] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 065e64a..f0700b4 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -1,5 +1,5 @@ -def doExport(exportpathlist, build_variant = "") { +def doExport(exportfolder, exportpathlist, build_variant = "") { for (exportpath in exportpathlist) { echo "Export path at: ${exportpath}" script { @@ -42,11 +42,11 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { """ } } - doExport(exportpathlist, build_variant) + doExport(exportfolder, exportpathlist, build_variant) } } else { - doExport(exportpathlist) + doExport(exportfolder, exportpathlist) } } } From 783c61598d02d01722eb6f50812693a6b4683431 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 16:06:33 +0100 Subject: [PATCH 076/122] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index f0700b4..ca4fd2c 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -16,7 +16,7 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { dir (env.destFolder) { echo "Copy ${srcFileExpanded} to ${destFolder}" if (isUnix()) { - sh 'cp \"${srcFileExpanded}\" ${destFolder}' + sh 'cp -v \"${srcFileExpanded}\" ${destFolder}' } else { bat 'copy \"%srcFileExpanded%\" %destFolder%' From e77d9f03a1da9ae10211c8120f1947e916413e73 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 16:26:27 +0100 Subject: [PATCH 077/122] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index ca4fd2c..0801386 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -16,10 +16,13 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { dir (env.destFolder) { echo "Copy ${srcFileExpanded} to ${destFolder}" if (isUnix()) { - sh 'cp -v \"${srcFileExpanded}\" ${destFolder}' + sh """ + echo cp -v -\"${srcFileExpanded}\"- -\"${destFolder}\"- + cp -v \"${srcFileExpanded}\" \"${destFolder}\" + """ } else { - bat 'copy \"%srcFileExpanded%\" %destFolder%' + bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' } } } From c937856bfd2d3a5ca3258ecf43717d522315e247 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 16:43:32 +0100 Subject: [PATCH 078/122] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 0801386..357e64a 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -16,10 +16,7 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { dir (env.destFolder) { echo "Copy ${srcFileExpanded} to ${destFolder}" if (isUnix()) { - sh """ - echo cp -v -\"${srcFileExpanded}\"- -\"${destFolder}\"- - cp -v \"${srcFileExpanded}\" \"${destFolder}\" - """ + sh "cp -v \"${srcFileExpanded}\" \"${destFolder}\" } else { bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' From 142e5955443a97e25d2410689e0f9356a76219b0 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 16:55:28 +0100 Subject: [PATCH 079/122] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 357e64a..477d68d 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -16,7 +16,7 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { dir (env.destFolder) { echo "Copy ${srcFileExpanded} to ${destFolder}" if (isUnix()) { - sh "cp -v \"${srcFileExpanded}\" \"${destFolder}\" + sh 'cp -v \"${srcFileExpanded}\" \"${destFolder}\"' } else { bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' From 8c63eee9697553883202fb26e1cc9ef97a4ff469 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 17:22:08 +0100 Subject: [PATCH 080/122] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 477d68d..fc8ecd0 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -14,9 +14,9 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { } } dir (env.destFolder) { - echo "Copy ${srcFileExpanded} to ${destFolder}" + echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\"" if (isUnix()) { - sh 'cp -v \"${srcFileExpanded}\" \"${destFolder}\"' + bash 'cp -v \"${srcFileExpanded}\" \"${destFolder}\"' } else { bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' From 585ddabcf5570d1f1c7133d74fce7524596283e4 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 17:25:12 +0100 Subject: [PATCH 081/122] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index fc8ecd0..b91e487 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -14,9 +14,11 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { } } dir (env.destFolder) { + echo 'Copy \"${srcFileExpanded}\" to \"${destFolder}\"' echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\"" if (isUnix()) { - bash 'cp -v \"${srcFileExpanded}\" \"${destFolder}\"' + echo "cp -v \"${srcFileExpanded}\" \"${destFolder}\"" + sh "cp -v \"${srcFileExpanded}\" \"${destFolder}\"" } else { bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' From ec69c45d90ce01745dd5c828e0292471f0f4054b Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 17:50:08 +0100 Subject: [PATCH 082/122] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index b91e487..9544faf 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -15,10 +15,8 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { } dir (env.destFolder) { echo 'Copy \"${srcFileExpanded}\" to \"${destFolder}\"' - echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\"" if (isUnix()) { - echo "cp -v \"${srcFileExpanded}\" \"${destFolder}\"" - sh "cp -v \"${srcFileExpanded}\" \"${destFolder}\"" + sh "cp -v ${srcFileExpanded} \"${destFolder}\"" } else { bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' From 20a392db61328799b2357b2b38dff56ed95566b8 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 18:30:39 +0100 Subject: [PATCH 083/122] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 9544faf..5b113d3 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -3,20 +3,23 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { for (exportpath in exportpathlist) { echo "Export path at: ${exportpath}" script { + echo "Build variant is ${build_variant}" if (build_variant) { + echo "Build variant is ${build_variant}" env.destFolder = "${exportfolder}/${build_variant}/${project}" env.srcFile = "${WORKSPACE}/${exportpath}" env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") } else { + echo "No build variant" env.destFolder = "${exportfolder}/${project}" env.srcFileExpanded = "${WORKSPACE}/${exportpath}" } } dir (env.destFolder) { - echo 'Copy \"${srcFileExpanded}\" to \"${destFolder}\"' + echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\"" if (isUnix()) { - sh "cp -v ${srcFileExpanded} \"${destFolder}\"" + sh "cp -v \"${srcFileExpanded}\" \"${destFolder}\"" } else { bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' From 93443e340ddb102379ccb8dc25168d6f3a8e7bc9 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 12 Jun 2018 18:56:17 +0100 Subject: [PATCH 084/122] HMBXR5601-143 - Handle projects that aren't built but do provide binaries --- compile/eclipsebuild/eclipseds5build.gsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 5b113d3..d9b2a92 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -49,7 +49,10 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { } } else { - doExport(exportfolder, exportpathlist) + // Only export if the project has no variants - signifying that there are files to export which have been prebuilt + if (!variants) { + doExport(exportfolder, exportpathlist) + } } } } From 305ae709aacbf8cf203263211ac376f8eea2114f Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Mon, 25 Jun 2018 13:50:09 +0100 Subject: [PATCH 085/122] HMBXR5601-233 - Extend checkout timeout to 2 hours --- versioncontrol/git.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versioncontrol/git.gsh b/versioncontrol/git.gsh index 70fe6bc..9d96232 100644 --- a/versioncontrol/git.gsh +++ b/versioncontrol/git.gsh @@ -26,7 +26,7 @@ def gitCheckout(String gitURL, String revision, String targetDir, String repoRoo extensions: [ [$class: 'CleanBeforeCheckout'], [$class: 'CloneOption', depth: cloneDepth, noTags: false, reference: reporootpath, shallow: shallowClone, timeout: 120], - [$class: 'CheckoutOption', timeout: 60], + [$class: 'CheckoutOption', timeout: 120], [$class: 'RelativeTargetDirectory', relativeTargetDir: targetDir] ], submoduleCfg: [], From 8f69abb656f35569c21f193d5620057302fcd90d Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 6 Jul 2018 11:47:15 +0100 Subject: [PATCH 086/122] Add build switch to perform clean builds --- compile/eclipsebuild/eclipseds5build.gsh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index d9b2a92..5acc0ae 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -31,17 +31,23 @@ def doExport(exportfolder, exportpathlist, build_variant = "") { // Build and export files def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { for (appInfo in apps ) { - (build, project, variants, exportpathlist) = appInfo + (build, cleanbuild, project, variants, exportpathlist) = appInfo if (build) { + if (cleanbuild) { + buildtype = "-cleanBuild" + } + else { + buildtype = "-build" + } for (build_variant in variants) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) + echo "Build command: ${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"" if (isUnix()) { - echo "Build command: ${BUILD_COMMAND} -build \"${project}/${build_variant}\"" - sh "${BUILD_COMMAND} -build \"${project}/${build_variant}\"" + sh "${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"" } else { bat """ - "%BUILD_COMMAND%" -build "${project}\\${build_variant}" + "%BUILD_COMMAND%" ${buildtype} "${project}\\${build_variant}" """ } } From ef5bcc9ffe7ade78c0eee7271e9e9dbe9eb671f4 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 7 Jul 2018 19:25:33 +0100 Subject: [PATCH 087/122] Use LFS for all checkouts --- versioncontrol/git.gsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/versioncontrol/git.gsh b/versioncontrol/git.gsh index 9d96232..dbc09ff 100644 --- a/versioncontrol/git.gsh +++ b/versioncontrol/git.gsh @@ -24,6 +24,7 @@ def gitCheckout(String gitURL, String revision, String targetDir, String repoRoo ], doGenerateSubmoduleConfigurations: false, extensions: [ + [$class: 'GitLFSPull'], [$class: 'CleanBeforeCheckout'], [$class: 'CloneOption', depth: cloneDepth, noTags: false, reference: reporootpath, shallow: shallowClone, timeout: 120], [$class: 'CheckoutOption', timeout: 120], @@ -59,4 +60,4 @@ boolean checkAllVersionsAgree(java.util.LinkedHashMap versions) { return true } -return this \ No newline at end of file +return this From beaf754ea2eb644061322886d629740856492517 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Mon, 9 Jul 2018 19:08:38 +0100 Subject: [PATCH 088/122] HMBXR5601-328 - Use make instead of eclipsebuild --- compile/eclipsebuild/eclipseds5build.gsh | 55 ++++++++++++++++++++---- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 5acc0ae..16854b7 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -1,37 +1,44 @@ -def doExport(exportfolder, exportpathlist, build_variant = "") { +def doExport(exportfolder, exportpathlist, build_variant = "", project_root = "") { for (exportpath in exportpathlist) { echo "Export path at: ${exportpath}" + env.srcFile = "${WORKSPACE}/${exportpath}" script { echo "Build variant is ${build_variant}" if (build_variant) { echo "Build variant is ${build_variant}" env.destFolder = "${exportfolder}/${build_variant}/${project}" - env.srcFile = "${WORKSPACE}/${exportpath}" - env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") + env.srcFile = srcFile.replace("-BUILDVARIANT-", "${build_variant}") } else { echo "No build variant" env.destFolder = "${exportfolder}/${project}" - env.srcFileExpanded = "${WORKSPACE}/${exportpath}" + } + echo "Project root is ${project_root}" + if (project_root) { + echo "Project root is ${project_root}" + env.srcFile = srcFile.replace("-PROJECTROOT-", "${project_root}") + } + else { + echo "No project root" } } dir (env.destFolder) { - echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\"" + echo "Copy \"${srcFile}\" to \"${destFolder}\"" if (isUnix()) { - sh "cp -v \"${srcFileExpanded}\" \"${destFolder}\"" + sh "cp -v \"${srcFile}\" \"${destFolder}\"" } else { - bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' + bat 'copy \"%srcFile%\" \"%destFolder%\"' } } } } -// Build and export files +// Build and export files using Eclipse project files (unreliable) def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { for (appInfo in apps ) { - (build, cleanbuild, project, variants, exportpathlist) = appInfo + (build, cleanbuild, project, projectroot, variants, exportpathlist) = appInfo if (build) { if (cleanbuild) { buildtype = "-cleanBuild" @@ -63,4 +70,34 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { } } +// Build and export files using make files generated by Eclipse +def doMake(apps, exportfolder = "${WORKSPACE}/bin") { + for (appInfo in apps ) { + (build, cleanbuild, project, projectroot, variants, exportpathlist) = appInfo + if (build) { + for (build_variant in variants) { + echo "Changing directory to: ${WORKSPACE}/${projectroot}/${build_variant}" + dir("${WORKSPACE}/${projectroot}/${build_variant}") { + echo "Build command: ${BUILD_COMMAND}" + if (isUnix()) { + sh "${BUILD_COMMAND}" + } + else { + bat """ + "%BUILD_COMMAND%" + """ + } + } + doExport(exportfolder, exportpathlist, build_variant, projectroot) + } + } + else { + // Only export if the project has no variants - signifying that there are files to export which have been prebuilt + if (!variants) { + doExport(exportfolder, exportpathlist) + } + } + } +} + return this; From c902757cc8becc57849a537b6d0e5e3216d98e4e Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Mon, 9 Jul 2018 19:17:33 +0100 Subject: [PATCH 089/122] HMBXR5601-328 - Use make instead of eclipsebuild --- compile/eclipsebuild/eclipseds5build.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 16854b7..73c15a3 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -73,7 +73,7 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { // Build and export files using make files generated by Eclipse def doMake(apps, exportfolder = "${WORKSPACE}/bin") { for (appInfo in apps ) { - (build, cleanbuild, project, projectroot, variants, exportpathlist) = appInfo + (build, cleanbuild, project, variants, projectroot, exportpathlist) = appInfo if (build) { for (build_variant in variants) { echo "Changing directory to: ${WORKSPACE}/${projectroot}/${build_variant}" From 1869a40da9c9211225b68cc372e835149d588dad Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 10 Jul 2018 12:53:34 +0100 Subject: [PATCH 090/122] Revert "HMBXR5601-328 - Use make instead of eclipsebuild" This reverts commit 5e1e0c9d47cfaa4c366b84da4f8a583c93ae9693. --- compile/eclipsebuild/eclipseds5build.gsh | 55 ++++-------------------- 1 file changed, 9 insertions(+), 46 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 73c15a3..5acc0ae 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -1,44 +1,37 @@ -def doExport(exportfolder, exportpathlist, build_variant = "", project_root = "") { +def doExport(exportfolder, exportpathlist, build_variant = "") { for (exportpath in exportpathlist) { echo "Export path at: ${exportpath}" - env.srcFile = "${WORKSPACE}/${exportpath}" script { echo "Build variant is ${build_variant}" if (build_variant) { echo "Build variant is ${build_variant}" env.destFolder = "${exportfolder}/${build_variant}/${project}" - env.srcFile = srcFile.replace("-BUILDVARIANT-", "${build_variant}") + env.srcFile = "${WORKSPACE}/${exportpath}" + env.srcFileExpanded = srcFile.replace("-BUILDVARIANT-", "${build_variant}") } else { echo "No build variant" env.destFolder = "${exportfolder}/${project}" - } - echo "Project root is ${project_root}" - if (project_root) { - echo "Project root is ${project_root}" - env.srcFile = srcFile.replace("-PROJECTROOT-", "${project_root}") - } - else { - echo "No project root" + env.srcFileExpanded = "${WORKSPACE}/${exportpath}" } } dir (env.destFolder) { - echo "Copy \"${srcFile}\" to \"${destFolder}\"" + echo "Copy \"${srcFileExpanded}\" to \"${destFolder}\"" if (isUnix()) { - sh "cp -v \"${srcFile}\" \"${destFolder}\"" + sh "cp -v \"${srcFileExpanded}\" \"${destFolder}\"" } else { - bat 'copy \"%srcFile%\" \"%destFolder%\"' + bat 'copy \"%srcFileExpanded%\" \"%destFolder%\"' } } } } -// Build and export files using Eclipse project files (unreliable) +// Build and export files def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { for (appInfo in apps ) { - (build, cleanbuild, project, projectroot, variants, exportpathlist) = appInfo + (build, cleanbuild, project, variants, exportpathlist) = appInfo if (build) { if (cleanbuild) { buildtype = "-cleanBuild" @@ -70,34 +63,4 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { } } -// Build and export files using make files generated by Eclipse -def doMake(apps, exportfolder = "${WORKSPACE}/bin") { - for (appInfo in apps ) { - (build, cleanbuild, project, variants, projectroot, exportpathlist) = appInfo - if (build) { - for (build_variant in variants) { - echo "Changing directory to: ${WORKSPACE}/${projectroot}/${build_variant}" - dir("${WORKSPACE}/${projectroot}/${build_variant}") { - echo "Build command: ${BUILD_COMMAND}" - if (isUnix()) { - sh "${BUILD_COMMAND}" - } - else { - bat """ - "%BUILD_COMMAND%" - """ - } - } - doExport(exportfolder, exportpathlist, build_variant, projectroot) - } - } - else { - // Only export if the project has no variants - signifying that there are files to export which have been prebuilt - if (!variants) { - doExport(exportfolder, exportpathlist) - } - } - } -} - return this; From aff5898578ed7fe931d7ca03a9c000630551f136 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 10 Jul 2018 18:25:03 +0100 Subject: [PATCH 091/122] Seperate DS5 shell command from build command --- compile/eclipsebuild/eclipseds5build.gsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 5acc0ae..347f723 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -43,11 +43,14 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) echo "Build command: ${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"" if (isUnix()) { - sh "${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"" + ${DS5SHELL} \'${BUILD_COMMAND} -no-indexer -importAll "${SOURCE_PATH}"\' + sh """ + ${DS5SHELL} \'${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"\' + """ } else { bat """ - "%BUILD_COMMAND%" ${buildtype} "${project}\\${build_variant}" + "%DS5SHELL%" "%BUILD_COMMAND%" ${buildtype} "${project}\\${build_variant}" """ } } From fbb99a88e76ff545e81e5957e6d9f7f507de7bb7 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 10 Jul 2018 18:26:56 +0100 Subject: [PATCH 092/122] Seperate DS5 shell command from build command --- compile/eclipsebuild/eclipseds5build.gsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 347f723..35ea90c 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -43,9 +43,8 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) echo "Build command: ${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"" if (isUnix()) { - ${DS5SHELL} \'${BUILD_COMMAND} -no-indexer -importAll "${SOURCE_PATH}"\' sh """ - ${DS5SHELL} \'${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"\' + \"${DS5SHELL}\" \'${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"\' """ } else { From 8005e0d3c6709b67499fd4c43bb41f1a25ac837a Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 10 Jul 2018 18:37:18 +0100 Subject: [PATCH 093/122] Seperate DS5 shell command from build command --- compile/eclipsebuild/eclipseds5build.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 35ea90c..bbd17af 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -41,7 +41,7 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { } for (build_variant in variants) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) - echo "Build command: ${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"" + echo "Build command: \"${DS5SHELL}\" \'${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"\'" if (isUnix()) { sh """ \"${DS5SHELL}\" \'${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"\' From 804a86aeaababbacdab5cbab7484f40891404ec4 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 10 Jul 2018 19:24:34 +0100 Subject: [PATCH 094/122] Seperate DS5 shell command from build command --- compile/eclipsebuild/eclipseds5build.gsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index bbd17af..6c121e3 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -41,10 +41,10 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { } for (build_variant in variants) { retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) - echo "Build command: \"${DS5SHELL}\" \'${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"\'" + echo "Build command: ${DS5SHELL} \'${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"\'" if (isUnix()) { sh """ - \"${DS5SHELL}\" \'${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"\' + ${DS5SHELL} \'${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"\' """ } else { From fd7b0486cf076532cf5fec95b326c321d2ea2ce0 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 10 Jul 2018 23:27:58 +0100 Subject: [PATCH 095/122] Parameterise eclipse project build retries --- compile/eclipsebuild/eclipseds5build.gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index 6c121e3..b5f4e16 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -40,7 +40,7 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { buildtype = "-build" } for (build_variant in variants) { - retry(3) { // Eclipse occasionally raises exceptions (rather than the builds failing) + retry(maxprojectbuildretries) { // Eclipse occasionally raises exceptions (rather than the builds failing) echo "Build command: ${DS5SHELL} \'${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"\'" if (isUnix()) { sh """ From a8f357e51230763357a22b11939805b63f580ab3 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 23 Aug 2019 09:17:23 +0100 Subject: [PATCH 096/122] Add static analysis --- staticanalysis/cppcheck.groovy | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/staticanalysis/cppcheck.groovy b/staticanalysis/cppcheck.groovy index b3b997e..18df1cb 100644 --- a/staticanalysis/cppcheck.groovy +++ b/staticanalysis/cppcheck.groovy @@ -57,9 +57,17 @@ pipeline { script { def CPPCHECKFOLDER = "${STATICANALYSIS}/cppcheck" dir(CPPCHECKFOLDER) { - bat """ - "${CPPCHECK}" --xml --xml-version=2 "${SRC}" 2> cppcheck.xml - """ + if (isUnix()) { + sh """#!/bin/bash + set -e + + "${CPPCHECK}" --xml --xml-version=2 "${SRC}" 2> cppcheck.xml + """ + } else { + bat """ + "${CPPCHECK}" --xml --xml-version=2 "${SRC}" 2> cppcheck.xml + """ + } } recordIssues(tools: [ cppCheck(pattern: "**/cppcheck.xml", reportEncoding: 'UTF-8'), From bb4f70629ba6bf7f3058d608a8fad358fefb2f4a Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 23 Aug 2019 09:19:50 +0100 Subject: [PATCH 097/122] Add static analysis --- staticanalysis/cppcheck.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/staticanalysis/cppcheck.groovy b/staticanalysis/cppcheck.groovy index 18df1cb..54b683a 100644 --- a/staticanalysis/cppcheck.groovy +++ b/staticanalysis/cppcheck.groovy @@ -57,6 +57,7 @@ pipeline { script { def CPPCHECKFOLDER = "${STATICANALYSIS}/cppcheck" dir(CPPCHECKFOLDER) { + echo "Executing: "${CPPCHECK}" --xml --xml-version=2 "${SRC}" 2> cppcheck.xml" if (isUnix()) { sh """#!/bin/bash set -e From 24384288ed2784219716d0e6cb072be679a6214a Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 23 Aug 2019 09:21:39 +0100 Subject: [PATCH 098/122] Add static analysis --- staticanalysis/cppcheck.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staticanalysis/cppcheck.groovy b/staticanalysis/cppcheck.groovy index 54b683a..59323c1 100644 --- a/staticanalysis/cppcheck.groovy +++ b/staticanalysis/cppcheck.groovy @@ -57,7 +57,7 @@ pipeline { script { def CPPCHECKFOLDER = "${STATICANALYSIS}/cppcheck" dir(CPPCHECKFOLDER) { - echo "Executing: "${CPPCHECK}" --xml --xml-version=2 "${SRC}" 2> cppcheck.xml" + echo "Executing: ${CPPCHECK} --xml --xml-version=2 ${SRC} 2> cppcheck.xml" if (isUnix()) { sh """#!/bin/bash set -e From b0a28652ef2ae8ed61ed660e8dc407707708f69b Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 23 Aug 2019 09:33:31 +0100 Subject: [PATCH 099/122] GIS-1621 - Update static analysis --- staticanalysis/ccm.groovy | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/staticanalysis/ccm.groovy b/staticanalysis/ccm.groovy index 290c897..aa697a6 100644 --- a/staticanalysis/ccm.groovy +++ b/staticanalysis/ccm.groovy @@ -63,9 +63,16 @@ pipeline { script { def CCMOLDER = "${STATICANALYSIS}/ccm" dir(CCMOLDER) { - bat """ - "${CCM}" "${SRC}" /xml /nummetrics=100 > ccm.xml - """ + if (isUnix()) { + sh """#!/bin/bash + # Uses mono + "${CCM}" "${SRC}" /xml /nummetrics=100 > ccm.xml + """ + } else { + bat """ + "${CCM}" "${SRC}" /xml /nummetrics=100 > ccm.xml + """ + } } recordIssues(tools: [ ccm(pattern: "**/ccm.xml", reportEncoding: 'UTF-8'), From 80cbc7c97d7042937d7f2a10f63f711bc79fc951 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 23 Aug 2019 09:52:21 +0100 Subject: [PATCH 100/122] Echo ccm command --- staticanalysis/ccm.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/staticanalysis/ccm.groovy b/staticanalysis/ccm.groovy index aa697a6..66a75e4 100644 --- a/staticanalysis/ccm.groovy +++ b/staticanalysis/ccm.groovy @@ -63,6 +63,7 @@ pipeline { script { def CCMOLDER = "${STATICANALYSIS}/ccm" dir(CCMOLDER) { + echo "Executing: ${CCM} ${SRC} /xml /nummetrics=100 > ccm.xml" if (isUnix()) { sh """#!/bin/bash # Uses mono From 7185c9f4ce98450db3400ecdd20bd373daac3f53 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 23 Aug 2019 21:51:00 +0100 Subject: [PATCH 101/122] Strip non C++ files before analysing --- staticanalysis/ccm.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/staticanalysis/ccm.groovy b/staticanalysis/ccm.groovy index 66a75e4..93e4711 100644 --- a/staticanalysis/ccm.groovy +++ b/staticanalysis/ccm.groovy @@ -66,6 +66,7 @@ pipeline { echo "Executing: ${CCM} ${SRC} /xml /nummetrics=100 > ccm.xml" if (isUnix()) { sh """#!/bin/bash + find "${SRC}" -type f ! -name "*.cpp" -a ! -name "*.h" -a ! -name "*.hpp" -a ! -name "*.c" -exec rm -r {} \; # Uses mono "${CCM}" "${SRC}" /xml /nummetrics=100 > ccm.xml """ From 2056fd98334dfadbf0870286341851f0e50bd974 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 17 Sep 2019 22:58:28 +0100 Subject: [PATCH 102/122] HMBFDHV-12 - Check that files are produced even though they won't be exported --- compile/eclipsebuild/eclipseds5build.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile/eclipsebuild/eclipseds5build.groovy b/compile/eclipsebuild/eclipseds5build.groovy index 63c8d45..888ad1e 100644 --- a/compile/eclipsebuild/eclipseds5build.groovy +++ b/compile/eclipsebuild/eclipseds5build.groovy @@ -40,7 +40,7 @@ def doCheck(checkpathlist, build_variant = "") { // Print out dependencies of the built file echo "Showing dependencies of ${srcFileExpanded}" result = sh( script: """ - readelf -d "${srcFileExpanded}" | grep NEEDED + readelf -d "${srcFileExpanded}" if [ \$? -ne 0 ]; then exit 1; fi """, returnStatus: true From 8be8e36ddf2cb9b70fc1284182e77446ff137b87 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 22 Sep 2019 17:39:28 +0100 Subject: [PATCH 103/122] SMB-296 - Print out packaging commands --- packaging/debian.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/debian.groovy b/packaging/debian.groovy index 6c7e006..2ef1ba8 100644 --- a/packaging/debian.groovy +++ b/packaging/debian.groovy @@ -64,7 +64,7 @@ def buildPackage(String packageout, String uniquepackageout, DebRootDefinition p try { sh """#!/bin/bash # Exit if any command fails - set -e + set -xe echo "${password}" | sudo -S echo From 9282feb36dedac15d6cfb22cb2eb506a1b7dce49 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 11 Oct 2019 13:24:01 +0100 Subject: [PATCH 104/122] Add VS2017 installation configuration --- .../vs2017install/buildmachines.vsconfig | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tool configurations/vs2017install/buildmachines.vsconfig diff --git a/tool configurations/vs2017install/buildmachines.vsconfig b/tool configurations/vs2017install/buildmachines.vsconfig new file mode 100644 index 0000000..ea618a3 --- /dev/null +++ b/tool configurations/vs2017install/buildmachines.vsconfig @@ -0,0 +1,25 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.VisualStudio.Workload.ManagedDesktop", + "Microsoft.VisualStudio.Workload.NativeDesktop", + "Microsoft.VisualStudio.Workload.NetWeb", + "Microsoft.VisualStudio.Workload.NetCoreTools", + "microsoft.net.componentgroup.targetingpacks.common", + "microsoft.componentgroup.blend", + "microsoft.visualstudio.component.entityframework", + "microsoft.visualstudio.component.debugger.justintime", + "microsoft.visualstudio.component.wcf.tooling", + "microsoft.visualstudio.component.vc.diagnostictools", + "microsoft.visualstudio.component.vc.cmake.project", + "microsoft.visualstudio.component.vc.testadapterforboosttest", + "microsoft.visualstudio.component.vc.testadapterforgoogletest", + "microsoft.visualstudio.component.vc.atlmfc", + "microsoft.visualstudio.component.appinsights.tools", + "microsoft.visualstudio.component.diagnostictools", + "microsoft.visualstudio.componentgroup.web.cloudtools", + "microsoft.visualstudio.component.aspnet45", + "microsoft.visualstudio.component.webdeploy", + "microsoft.visualstudio.component.nuget.buildtools" + ] +} \ No newline at end of file From b32a5116dd657f59b30ef079c6bc9c1056833796 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 25 Oct 2019 16:18:19 +0100 Subject: [PATCH 105/122] GIS-1621 - Remove local diffing (superceded); Add as much git info to a meta object when it is not being provided - for old jobs not providing meta information --- configuration/configuration.groovy | 2 +- differences/do.groovy | 18 ------------------ import/importer.groovy | 4 ++-- meta/folder.groovy | 25 ++----------------------- 4 files changed, 5 insertions(+), 44 deletions(-) delete mode 100644 differences/do.groovy diff --git a/configuration/configuration.groovy b/configuration/configuration.groovy index b8c0b47..2a7f1ab 100644 --- a/configuration/configuration.groovy +++ b/configuration/configuration.groovy @@ -5,7 +5,7 @@ def registerConfigurationInfo(meta, String configurationName, String configurati } def registerPipelineScriptConfiguration(meta) { - registerConfigurationInfo(meta, 'pipeline script', '-', '-', gh.getGitInfo("${autobuilder.getautobuildpath()}")) + registerConfigurationInfo(meta, 'pipeline script', '-', '-', gh.getGitInfo(autobuilder.getautobuildpath())) } def gitCheckoutAndRegister(meta, String tool, String gitURL, String revision, String targetDir, String repoRoot = "", int cloneDepth = 1, boolean shallowClone = true, String filter = '') { diff --git a/differences/do.groovy b/differences/do.groovy deleted file mode 100644 index 32f18b5..0000000 --- a/differences/do.groovy +++ /dev/null @@ -1,18 +0,0 @@ - -def differences(meta, String sourcerevision, String previoussourcerevision, String sourcepath) { - def String cs = autobuilder.commonscripts() - def String difffile = meta.difffilepath() - def String jirakey = meta.productinfo.jirakey - if (isUnix()) { - sh """ - "${PYTHON}" -u "${cs}/differences/show_release_differences.py" -g "${sourcepath}" -s "${sourcerevision}" -p "${previoussourcerevision}" -j "${jirakey}" -o "opposite notcommon" -f "${difffile}" - """ - } - else { - bat """ - "${PYTHON}" -u "${cs}\\differences\\show_release_differences.py" -g "${sourcepath}" -s "${sourcerevision}" -p "${previoussourcerevision}" -j "${jirakey}" -o "opposite notcommon" -f "${difffile}" - """ - } -} - -return this; diff --git a/import/importer.groovy b/import/importer.groovy index ba5eb0b..78c0d62 100644 --- a/import/importer.groovy +++ b/import/importer.groovy @@ -51,7 +51,7 @@ def hierarchyartifactimportfromrepo(meta, String repo, String revision, String d def ArrayList sparseitemlist = gh.convertSparseItemsString(filter) gh.gitCheckoutAlt(rooturl, rootrevision, destpath, "", 1, true, sparseitemlist) - def importedmeta = meta.importrelated(destpath) + def importedmeta = meta.importrelated(destpath, rooturl, rootrevision, gh.getGitInfo(destpath)) relatedimportinfo = importedmeta.getassociated() echo "Cloning associated repos" @@ -90,7 +90,7 @@ def artifactimportfromrepo(meta, String repo, String revision, String destpath, def ArrayList sparseitemlist = gh.convertSparseItemsString(filter) gh.gitCheckoutAlt(rooturl, rootrevision, destpath, "", 1, true, sparseitemlist) - def importedmeta = meta.importrelated(destpath) + def importedmeta = meta.importrelated(destpath, rooturl, rootrevision, gh.getGitInfo(destpath)) gh.stripgithistory(destpath) def metafilepath = "${destpath}/${meta.metafilepath()}" diff --git a/meta/folder.groovy b/meta/folder.groovy index 6967def..6371f38 100644 --- a/meta/folder.groovy +++ b/meta/folder.groovy @@ -429,11 +429,8 @@ class PublishableInfo extends GISJsonSerialised { class MetaInfo extends GISJsonSerialised { private static String FORMAT = "0.1" private static String METAFOLDERNAME = "meta" - private static String DIFFFOLDERNAME = "diff" private static String METAFILENAME = "info.json" - private static String METADIFFFILENAME = "differences.txt" private static String METAARTIFACTS = "${METAFOLDERNAME}/**" - private static String DIFFARTIFACTS = "${DIFFFOLDERNAME}/**" class RelatedMetaInfo extends GISJsonSerialised { String offsetpath @@ -607,11 +604,7 @@ class MetaInfo extends GISJsonSerialised { return METAFOLDERNAME + "/" + METAFILENAME } - static String difffilepath() { - return DIFFFOLDERNAME + "/" + METADIFFFILENAME - } - - MetaInfo importrelated(String destpath) { + MetaInfo importrelated(String destpath, String givenRepo = 'Unknown', String givenRevision = 'Unknown', String givenSHA = 'Unknown') { MetaInfo mi = new MetaInfo(script) def String adjustedpath = relativize(destpath) @@ -620,22 +613,12 @@ class MetaInfo extends GISJsonSerialised { mi.deserialiseJson(importedmetafile) } else { script.echo("Could not deserialise meta at file: ${importedmetafile} (destpath: ${destpath})- Does not exist") + mi.addConfigurationInfo('', givenRepo, givenRevision, givenSHA) } RelatedMetaInfo rmi = new RelatedMetaInfo(script, adjustedpath, mi) associatedmeta.add(rmi) - def importedmetadifffile = adjustedpath + "/" + difffilepath() - if (script.fileExists(importedmetadifffile)) { - def String newcontents = script.readFile(file: importedmetadifffile) - def String currentcontents = "" - if (script.fileExists(difffilepath())) { - currentcontents = script.readFile(file: difffilepath()) - } - - script.writeFile(file: difffilepath(), text: currentcontents + "\n" + mi.productinfo.productname + " " + mi.productinfo.subcomponentname + ":\n" + newcontents) - } - return mi } @@ -660,10 +643,6 @@ class MetaInfo extends GISJsonSerialised { return METAFOLDERNAME } - static String difffolder() { - return DIFFFOLDERNAME - } - String generateartifacts(ArrayList releasedfromhere = new ArrayList(), // These items are recorded in meta as released from here ArrayList releasedfromsubmeta = new ArrayList(), // These items are not recorded in meta as released from here String metafilepath ="${METAFOLDERNAME}/${METAFILENAME}" From f6a55441cf4edca1b789332df255a59ae3979843 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 25 Oct 2019 16:20:57 +0100 Subject: [PATCH 106/122] GIS-1621 - Remove local diffing (superceded); Add as much git info to a meta object when it is not being provided - for old jobs not providing meta information --- meta/folder.groovy | 4 ---- 1 file changed, 4 deletions(-) diff --git a/meta/folder.groovy b/meta/folder.groovy index 6371f38..2e142a2 100644 --- a/meta/folder.groovy +++ b/meta/folder.groovy @@ -756,10 +756,6 @@ MetaInfo metareset(script) { deleteDir() } - dir(mi.difffolder()) { - deleteDir() - } - return mi } From a13f11435b7dec72fe8a98a2838b6995ec890f5a Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 25 Oct 2019 16:59:55 +0100 Subject: [PATCH 107/122] GIS-1621 - Remove local diffing (superceded); Add as much git info to a meta object when it is not being provided - for old jobs not providing meta information --- meta/folder.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/folder.groovy b/meta/folder.groovy index 2e142a2..e5f34f0 100644 --- a/meta/folder.groovy +++ b/meta/folder.groovy @@ -647,7 +647,7 @@ class MetaInfo extends GISJsonSerialised { ArrayList releasedfromsubmeta = new ArrayList(), // These items are not recorded in meta as released from here String metafilepath ="${METAFOLDERNAME}/${METAFILENAME}" ) { - def String artifactlist = "${METAARTIFACTS},${DIFFARTIFACTS}" + def String artifactlist = METAARTIFACTS releaseinfo.addReleaseItem(METAARTIFACTS) for (releaseitem in releasedfromhere) { artifactlist += "," + releaseitem From d0ed9310fc8502e8153cc8277341f734368c620c Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 7 Nov 2019 09:11:10 +0000 Subject: [PATCH 108/122] GIS-1621 - Be selective with releases - don't show those with tags beginning with erroneous_ superceded_ faulty_ inmainline_ unless SHOWALL parameter is true --- publish/promptingpublish.groovy | 16 +++++++++++++++- publish/publishitems.groovy | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index ced73a2..670501d 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -53,7 +53,21 @@ pipeline { steps { script { gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy") - def releases = gh.gettaglist(SOURCEDIR) + def allreleases = gh.gettaglist(SOURCEDIR) + showall = SHOWALL ?: 'false' + def releases + if (showall) { + releases = allreleases + } else { + for (release in allreleases) { + if (!release.toLowerCase().startsWith("superceded_") && + !release.toLowerCase().startsWith("erroneous_") && + !release.toLowerCase().startsWith("faulty_") && + !release.toLowerCase().startsWith("inmainline_")) { + releases.append(release) + } + } + } timeout(time: 10, unit: 'MINUTES') { release = input( message: 'Please select the software version', diff --git a/publish/publishitems.groovy b/publish/publishitems.groovy index d84123d..677970e 100644 --- a/publish/publishitems.groovy +++ b/publish/publishitems.groovy @@ -124,4 +124,4 @@ PublishableItemsSelection createItemSelector( return pis } -return this; \ No newline at end of file +return this; From 1f55e79acfa5989183c409e7e6d8f60ee96ed57b Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 7 Nov 2019 09:22:23 +0000 Subject: [PATCH 109/122] GIS-1621 - Be selective with releases - don't show those with tags beginning with erroneous_ superceded_ faulty_ inmainline_ unless SHOWALL parameter is true --- publish/promptingpublish.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index 670501d..fb312f0 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -63,6 +63,7 @@ pipeline { if (!release.toLowerCase().startsWith("superceded_") && !release.toLowerCase().startsWith("erroneous_") && !release.toLowerCase().startsWith("faulty_") && + !release.toLowerCase().startsWith("ignore_") && !release.toLowerCase().startsWith("inmainline_")) { releases.append(release) } From fc3d611c844ed2219061aae4d2fd4b5cde7f2398 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 7 Nov 2019 09:45:09 +0000 Subject: [PATCH 110/122] GIS-1621 - Be selective with releases - don't show those with tags beginning with erroneous_ superceded_ faulty_ inmainline_ unless SHOWALL parameter is true --- publish/promptingpublish.groovy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index fb312f0..6950754 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -55,11 +55,13 @@ pipeline { gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy") def allreleases = gh.gettaglist(SOURCEDIR) showall = SHOWALL ?: 'false' + echo("showall: ${showall} ${SHOWALL}") def releases if (showall) { releases = allreleases } else { for (release in allreleases) { + echo("Evaluating: |${release}|") if (!release.toLowerCase().startsWith("superceded_") && !release.toLowerCase().startsWith("erroneous_") && !release.toLowerCase().startsWith("faulty_") && From 6ce20315af1d097c90e5bbfbfe51c6e1192c1520 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 7 Nov 2019 09:47:59 +0000 Subject: [PATCH 111/122] GIS-1621 - Be selective with releases - don't show those with tags beginning with erroneous_ superceded_ faulty_ inmainline_ unless SHOWALL parameter is true --- publish/promptingpublish.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index 6950754..80dc633 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -54,7 +54,7 @@ pipeline { script { gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy") def allreleases = gh.gettaglist(SOURCEDIR) - showall = SHOWALL ?: 'false' + boolean showall = (SHOWALL == 'true') echo("showall: ${showall} ${SHOWALL}") def releases if (showall) { From 1bd181cd0b3f0ca44d0d61f67c7b73c08e335d5b Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 7 Nov 2019 09:50:30 +0000 Subject: [PATCH 112/122] GIS-1621 - Be selective with releases - don't show those with tags beginning with erroneous_ superceded_ faulty_ inmainline_ unless SHOWALL parameter is true --- publish/promptingpublish.groovy | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index 80dc633..bf95bb2 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -55,8 +55,7 @@ pipeline { gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy") def allreleases = gh.gettaglist(SOURCEDIR) boolean showall = (SHOWALL == 'true') - echo("showall: ${showall} ${SHOWALL}") - def releases + def releases = new ArrayList() if (showall) { releases = allreleases } else { From 3e27e84050ddd73e8b852970a23c4b6a034962da Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 7 Nov 2019 09:53:52 +0000 Subject: [PATCH 113/122] GIS-1621 - Be selective with releases - don't show those with tags beginning with erroneous_ superceded_ faulty_ inmainline_ unless SHOWALL parameter is true --- publish/promptingpublish.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index bf95bb2..d8d5303 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -66,7 +66,7 @@ pipeline { !release.toLowerCase().startsWith("faulty_") && !release.toLowerCase().startsWith("ignore_") && !release.toLowerCase().startsWith("inmainline_")) { - releases.append(release) + releases.add(release) } } } From d5ab89e81edbc4d984bebcc026ec7a1b67d1b703 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 7 Nov 2019 09:55:55 +0000 Subject: [PATCH 114/122] GIS-1621 - Be selective with releases - don't show those with tags beginning with erroneous_ superceded_ faulty_ inmainline_ unless SHOWALL parameter is true --- publish/promptingpublish.groovy | 1 - 1 file changed, 1 deletion(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index d8d5303..f2372cd 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -60,7 +60,6 @@ pipeline { releases = allreleases } else { for (release in allreleases) { - echo("Evaluating: |${release}|") if (!release.toLowerCase().startsWith("superceded_") && !release.toLowerCase().startsWith("erroneous_") && !release.toLowerCase().startsWith("faulty_") && From 15f4c4acd3800602327f91f082cb08653e6b0c08 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 7 Nov 2019 17:39:56 +0000 Subject: [PATCH 115/122] GIS-1621 - Add some output to debug why configuration information is not being added to imported logic meta --- import/importer.groovy | 4 ++-- meta/folder.groovy | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/import/importer.groovy b/import/importer.groovy index 78c0d62..25b2614 100644 --- a/import/importer.groovy +++ b/import/importer.groovy @@ -85,7 +85,7 @@ def hierarchyartifactimportfromrepo(meta, String repo, String revision, String d def artifactimportfromrepo(meta, String repo, String revision, String destpath, boolean incrementversionnumber = true, String filter = '', String excludes = '', boolean fingerprint = false) { def rooturl = repo.trim() def rootrevision = revision.trim() - echo "Cloning root release repo: ${rooturl}, revision: ${rootrevision} at folder: ${destpath}" + echo "Cloning release repo: ${rooturl}, revision: ${rootrevision} at folder: ${destpath}" def ArrayList sparseitemlist = gh.convertSparseItemsString(filter) gh.gitCheckoutAlt(rooturl, rootrevision, destpath, "", 1, true, sparseitemlist) @@ -94,7 +94,7 @@ def artifactimportfromrepo(meta, String repo, String revision, String destpath, gh.stripgithistory(destpath) def metafilepath = "${destpath}/${meta.metafilepath()}" - echo "Marking root meta as released and rewriting meta file: ${metafilepath}" + echo "Marking meta as released and rewriting meta file: ${metafilepath}" rewritemetafileasreleased(importedmeta, metafilepath) if (incrementversionnumber) { diff --git a/meta/folder.groovy b/meta/folder.groovy index e5f34f0..40f03aa 100644 --- a/meta/folder.groovy +++ b/meta/folder.groovy @@ -511,6 +511,7 @@ class MetaInfo extends GISJsonSerialised { void addConfigurationInfo(String configurationname, String configurationURL, String configurationversion, String configurationSHA) { def ConfigurationInfo ci = new ConfigurationInfo(script, configurationname, configurationURL, configurationversion, configurationSHA) + script.echo("Adding configuration info: name: ${configurationname} url: ${configurationURL} version: ${configurationversion} sha: ${configurationSHA}") configurationinfo.add(ci) } From a006c13b6280e72626dad107020906361787383e Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 8 Nov 2019 17:44:18 +0000 Subject: [PATCH 116/122] GIS-1621 - Debug release filtering --- publish/promptingpublish.groovy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index f2372cd..6f0a6a5 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -54,17 +54,20 @@ pipeline { script { gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy") def allreleases = gh.gettaglist(SOURCEDIR) - boolean showall = (SHOWALL == 'true') + boolean filterredundantreleases = (FILTER_REDUNDANT_RELEASES == 'true') def releases = new ArrayList() - if (showall) { + if (!filterredundantreleases) { + echo("Showing all releases") releases = allreleases } else { + echo("Showing filtered releases") for (release in allreleases) { if (!release.toLowerCase().startsWith("superceded_") && !release.toLowerCase().startsWith("erroneous_") && !release.toLowerCase().startsWith("faulty_") && !release.toLowerCase().startsWith("ignore_") && !release.toLowerCase().startsWith("inmainline_")) { + echo("Showing release: ${release}") releases.add(release) } } From 29bd0eafc6d2df94d8d5d9e6cd9a372bbb5d11af Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 9 Nov 2019 00:41:41 +0000 Subject: [PATCH 117/122] GIS-1621 - Show origin just before pushing tags --- release/do.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/release/do.groovy b/release/do.groovy index 1b21bcf..ee1bdf5 100644 --- a/release/do.groovy +++ b/release/do.groovy @@ -274,6 +274,7 @@ def releasegitpush(String dryrunpush ) { } def sourcegitpush(String dryrunpush ) { + sh("git remote -v") if (dryrunpush == "true") { sh("git push -n --tags") summaryappend(",Src-Dry-Run-Push") From 4e45329fe1c127ee158757295f45f97823bdadae Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 9 Nov 2019 07:58:41 +0000 Subject: [PATCH 118/122] GIS-1621 - Show origin just before pushing tags --- release/do.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/release/do.groovy b/release/do.groovy index ee1bdf5..a9f0a3e 100644 --- a/release/do.groovy +++ b/release/do.groovy @@ -262,6 +262,7 @@ def sourcegittags(String buildsha, List taglist) { } def releasegitpush(String dryrunpush ) { + sh("git remote -v") if (dryrunpush == "true") { sh("git push -n --tags origin master") summaryappend(",Dry-Run-Push") From da6b830e8cc068a105ac89e3cb5905ee16fc16c4 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 9 Nov 2019 08:03:23 +0000 Subject: [PATCH 119/122] GIS-1621 - Debug release filtering --- publish/promptingpublish.groovy | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index 6f0a6a5..29e9bfd 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -62,11 +62,11 @@ pipeline { } else { echo("Showing filtered releases") for (release in allreleases) { - if (!release.toLowerCase().startsWith("superceded_") && - !release.toLowerCase().startsWith("erroneous_") && - !release.toLowerCase().startsWith("faulty_") && - !release.toLowerCase().startsWith("ignore_") && - !release.toLowerCase().startsWith("inmainline_")) { + if (!release.toLowerCase().startsWith("superceded") && + !release.toLowerCase().startsWith("erroneous") && + !release.toLowerCase().startsWith("faulty") && + !release.toLowerCase().startsWith("ignore") && + !release.toLowerCase().startsWith("inmainline")) { echo("Showing release: ${release}") releases.add(release) } From 6b5490069869ca03c4284a2eaa1e39b7574a9558 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 9 Nov 2019 08:08:42 +0000 Subject: [PATCH 120/122] GIS-1621 - Debug release filtering --- publish/promptingpublish.groovy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index 29e9bfd..80305ab 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -69,6 +69,8 @@ pipeline { !release.toLowerCase().startsWith("inmainline")) { echo("Showing release: ${release}") releases.add(release) + } else { + echo("Not showing release: ${release}") } } } From f64c71e0cd54074f5f941a465619712ed52e547c Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 9 Nov 2019 08:53:13 +0000 Subject: [PATCH 121/122] GIS-1621 - Remove publish filter debug log --- publish/promptingpublish.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index 80305ab..c0e4837 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -54,9 +54,9 @@ pipeline { script { gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy") def allreleases = gh.gettaglist(SOURCEDIR) - boolean filterredundantreleases = (FILTER_REDUNDANT_RELEASES == 'true') + boolean filterredundantreleases = def releases = new ArrayList() - if (!filterredundantreleases) { + if (FILTER_REDUNDANT_RELEASES == 'false') { echo("Showing all releases") releases = allreleases } else { @@ -67,10 +67,10 @@ pipeline { !release.toLowerCase().startsWith("faulty") && !release.toLowerCase().startsWith("ignore") && !release.toLowerCase().startsWith("inmainline")) { - echo("Showing release: ${release}") + //echo("Showing release: ${release}") releases.add(release) } else { - echo("Not showing release: ${release}") + //echo("Not showing release: ${release}") } } } From 0958de510814aa41340c8edf15d37d03e3f26ed3 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 9 Nov 2019 09:16:06 +0000 Subject: [PATCH 122/122] GIS-1621 - Remove publish filter debug log --- publish/promptingpublish.groovy | 1 - 1 file changed, 1 deletion(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index c0e4837..9f2d7dc 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -54,7 +54,6 @@ pipeline { script { gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy") def allreleases = gh.gettaglist(SOURCEDIR) - boolean filterredundantreleases = def releases = new ArrayList() if (FILTER_REDUNDANT_RELEASES == 'false') { echo("Showing all releases")