From 4cf1659f14e58001f715c9fb4ff1734d6ffd8661 Mon Sep 17 00:00:00 2001 From: Kulhanek Date: Wed, 9 Jan 2019 12:02:41 +0000 Subject: Fix --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build/jenkins-build.sh') diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 3bd5016..4a18525 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -34,7 +34,7 @@ export REG_FILES=`conda build Wrappers/Python/conda-recipe --output` # REG_FILES variable should contain output files echo files created: $REG_FILES #upload to anaconda -if [[ -n ${CCPI_CONDA_TOKEN}]] +if [[ -n ${CCPI_CONDA_TOKEN} ]] then conda install anaconda-client while read -r outfile; do -- cgit v1.2.3 From 8d872f6d37c73dd1bc2e47f2bdf30058c78679f5 Mon Sep 17 00:00:00 2001 From: Kulhanek Date: Wed, 9 Jan 2019 12:07:14 +0000 Subject: UPDATE version 0.10.4 --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build/jenkins-build.sh') diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 4a18525..c660c02 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -22,7 +22,7 @@ if [[ -n ${CIL_VERSION} ]] then echo Using defined version: $CIL_VERSION else - export CIL_VERSION=0.10.3 + export CIL_VERSION=0.10.4 echo Defining version: $CIL_VERSION fi #cd CCPi-Regularisation-Toolkit # already there by jenkins -- cgit v1.2.3 From 73eab3d64f2bf5ad170bea35c4db1d3ae5758c06 Mon Sep 17 00:00:00 2001 From: Kulhanek Date: Wed, 9 Jan 2019 12:45:42 +0000 Subject: version top in script --- build/jenkins-build.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'build/jenkins-build.sh') diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index c660c02..4699e9b 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -1,4 +1,11 @@ #!/usr/bin/env bash +if [[ -n ${CIL_VERSION} ]] +then + echo Using defined version: $CIL_VERSION +else + export CIL_VERSION=0.10.4 + echo Defining version: $CIL_VERSION +fi # Script to builds source code in Jenkins environment # module try-load conda @@ -18,13 +25,6 @@ fi # git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit conda install -y conda-build #export CIL_VERSION=0.10.2 -if [[ -n ${CIL_VERSION} ]] -then - echo Using defined version: $CIL_VERSION -else - export CIL_VERSION=0.10.4 - echo Defining version: $CIL_VERSION -fi #cd CCPi-Regularisation-Toolkit # already there by jenkins # need to call first build conda build Wrappers/Python/conda-recipe -- cgit v1.2.3 From 3b309224fc4935a8dc627e8863479b3c29349ce8 Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 15 Jan 2019 21:33:38 +0000 Subject: ADD: TODOs --- build/jenkins-build.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build/jenkins-build.sh') diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 4699e9b..afee0c9 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -1,8 +1,10 @@ #!/usr/bin/env bash +# TODO put git tag recognition if [[ -n ${CIL_VERSION} ]] then echo Using defined version: $CIL_VERSION else +# TODO put git tag recognition, or default export CIL_VERSION=0.10.4 echo Defining version: $CIL_VERSION fi @@ -38,6 +40,8 @@ if [[ -n ${CCPI_CONDA_TOKEN} ]] then conda install anaconda-client while read -r outfile; do + #TODO if git tag is defined than call anaconda without --label dev + #TODO if pull request??? do not upload anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev done <<< "$REG_FILES" else -- cgit v1.2.3 From 400894771a9ff54c3f88e84ecc79d97a3e08235f Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 14:18:00 +0000 Subject: UPDATE: detect git version --- build/jenkins-build.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'build/jenkins-build.sh') diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index afee0c9..d1a3427 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -5,8 +5,11 @@ then echo Using defined version: $CIL_VERSION else # TODO put git tag recognition, or default - export CIL_VERSION=0.10.4 - echo Defining version: $CIL_VERSION + #export CIL_VERSION=0.10.4 + #get tag, remove first char ('v') and leave rest + export CIL_VERSION_RAW=`git describe --tags | tail -c +2` + + echo Defining version from last git tag and commit: $CIL_VERSION fi # Script to builds source code in Jenkins environment # module try-load conda -- cgit v1.2.3 From be48430f8de0ccb8e64abba4f00c771228ff0df0 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:05:59 +0000 Subject: UPDATE: CIL_VERSION from git tag, dash in version is assumed as dev version --- build/jenkins-build.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'build/jenkins-build.sh') diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index d1a3427..44fd59d 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -7,9 +7,15 @@ else # TODO put git tag recognition, or default #export CIL_VERSION=0.10.4 #get tag, remove first char ('v') and leave rest - export CIL_VERSION_RAW=`git describe --tags | tail -c +2` - - echo Defining version from last git tag and commit: $CIL_VERSION + export CIL_VERSION=`git describe --tags | tail -c +2` + if [[ $CIL_VERSION == *"-"*]]; then + # detected dash means that it is dev version + # version is then string-string and all after second dash is ignored (usually commit sha) + export CIL_VERSION=`echo $C1 | cut -d "-" -f -2` + echo Building dev version + else + echo Defining version from last git tag and commit: $CIL_VERSION + fi fi # Script to builds source code in Jenkins environment # module try-load conda @@ -27,7 +33,7 @@ else fi # presume that git clone is done before this script is launched, if not, uncomment -# git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit +#git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit conda install -y conda-build #export CIL_VERSION=0.10.2 #cd CCPi-Regularisation-Toolkit # already there by jenkins @@ -45,7 +51,12 @@ then while read -r outfile; do #TODO if git tag is defined than call anaconda without --label dev #TODO if pull request??? do not upload - anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev + if [[ $CIL_VERSION == *"-"*]]; then + # upload with dev label + anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev + else + anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force + fi done <<< "$REG_FILES" else echo CCPI_CONDA_TOKEN not defined, will not upload to anaconda. -- cgit v1.2.3 From 53695bd509b06de9f0564ceec43b4e5b669fa135 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:11:34 +0000 Subject: typo --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build/jenkins-build.sh') diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 44fd59d..beb26f7 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -8,7 +8,7 @@ else #export CIL_VERSION=0.10.4 #get tag, remove first char ('v') and leave rest export CIL_VERSION=`git describe --tags | tail -c +2` - if [[ $CIL_VERSION == *"-"*]]; then + if [[ $CIL_VERSION == *"-"* ]]; then # detected dash means that it is dev version # version is then string-string and all after second dash is ignored (usually commit sha) export CIL_VERSION=`echo $C1 | cut -d "-" -f -2` -- cgit v1.2.3 From 94d1e4b289d9e9ffbf69826337ea05e2a3bb0101 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:13:44 +0000 Subject: echo version --- build/jenkins-build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build/jenkins-build.sh') diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index beb26f7..d0e9c96 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -8,11 +8,11 @@ else #export CIL_VERSION=0.10.4 #get tag, remove first char ('v') and leave rest export CIL_VERSION=`git describe --tags | tail -c +2` - if [[ $CIL_VERSION == *"-"* ]]; then + if [[ ${CIL_VERSION} == *"-"* ]]; then # detected dash means that it is dev version # version is then string-string and all after second dash is ignored (usually commit sha) - export CIL_VERSION=`echo $C1 | cut -d "-" -f -2` - echo Building dev version + export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2` + echo Building dev version ${CIL_VERSION} else echo Defining version from last git tag and commit: $CIL_VERSION fi -- cgit v1.2.3 From cf9689e81bb69b7732a168463b17a47de1ef59a5 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:28:12 +0000 Subject: UPDATE: conda build don't like dash in version --- build/jenkins-build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'build/jenkins-build.sh') diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index d0e9c96..b64631f 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -12,6 +12,8 @@ else # detected dash means that it is dev version # version is then string-string and all after second dash is ignored (usually commit sha) export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2` + # but dash is prohibited for conda build + export CIL_VERSION=`echo ${CIL_VERSION} | tr - _` echo Building dev version ${CIL_VERSION} else echo Defining version from last git tag and commit: $CIL_VERSION @@ -51,7 +53,7 @@ then while read -r outfile; do #TODO if git tag is defined than call anaconda without --label dev #TODO if pull request??? do not upload - if [[ $CIL_VERSION == *"-"*]]; then + if [[ $CIL_VERSION == *"_"*]]; then # upload with dev label anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev else -- cgit v1.2.3 From 204dc742ee5a8fda3f168b3e84632f5cdb75ce2e Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:43:41 +0000 Subject: typo --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build/jenkins-build.sh') diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index b64631f..6965180 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -53,7 +53,7 @@ then while read -r outfile; do #TODO if git tag is defined than call anaconda without --label dev #TODO if pull request??? do not upload - if [[ $CIL_VERSION == *"_"*]]; then + if [[ $CIL_VERSION == *"_"* ]]; then # upload with dev label anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev else -- cgit v1.2.3 From 774ed3351991266b0c9289b2b9ba1afe328c3e70 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 17:09:05 +0000 Subject: pr-test --- build/jenkins-build.sh | 1 - 1 file changed, 1 deletion(-) (limited to 'build/jenkins-build.sh') diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 6965180..20c97f3 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -33,7 +33,6 @@ else ./Miniconda3-latest-Linux-x86_64.sh -u -b -p . PATH=$PATH:./bin fi - # presume that git clone is done before this script is launched, if not, uncomment #git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit conda install -y conda-build -- cgit v1.2.3