mirror of
https://github.com/status-im/status-react.git
synced 2025-01-10 19:16:59 +00:00
run buildNumber() at beggining of build, drop minutes
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
79e542e1d5
commit
7e031e8008
@ -35,7 +35,10 @@ pipeline {
|
|||||||
/* Necessary to load methods */
|
/* Necessary to load methods */
|
||||||
mobile = load 'ci/mobile.groovy'
|
mobile = load 'ci/mobile.groovy'
|
||||||
cmn = load 'ci/common.groovy'
|
cmn = load 'ci/common.groovy'
|
||||||
|
/* Cleanup and Prep */
|
||||||
mobile.prep(cmn.getBuildType())
|
mobile.prep(cmn.getBuildType())
|
||||||
|
/* Run at start to void mismatched numbers */
|
||||||
|
cmn.buildNumber()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,10 @@ pipeline {
|
|||||||
/* Necessary to load methods */
|
/* Necessary to load methods */
|
||||||
mobile = load 'ci/mobile.groovy'
|
mobile = load 'ci/mobile.groovy'
|
||||||
cmn = load 'ci/common.groovy'
|
cmn = load 'ci/common.groovy'
|
||||||
|
/* Cleanup and Prep */
|
||||||
mobile.prep(cmn.getBuildType())
|
mobile.prep(cmn.getBuildType())
|
||||||
|
/* Run at start to void mismatched numbers */
|
||||||
|
cmn.buildNumber()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
common = load 'ci/common.groovy'
|
common = load 'ci/common.groovy'
|
||||||
|
|
||||||
def compile(type = 'nightly') {
|
def compile(type = 'nightly') {
|
||||||
common.buildNumber()
|
/* Disable Gradle Daemon https://stackoverflow.com/questions/38710327/jenkins-builds-fail-using-the-gradle-daemon */
|
||||||
// Disable Gradle Daemon https://stackoverflow.com/questions/38710327/jenkins-builds-fail-using-the-gradle-daemon
|
|
||||||
def gradleOpt = "-PbuildUrl='${currentBuild.absoluteUrl}' -Dorg.gradle.daemon=false "
|
def gradleOpt = "-PbuildUrl='${currentBuild.absoluteUrl}' -Dorg.gradle.daemon=false "
|
||||||
if (type == 'release') {
|
if (type == 'release') {
|
||||||
gradleOpt += "-PreleaseVersion='${common.version()}'"
|
gradleOpt += "-PreleaseVersion='${common.version()}'"
|
||||||
|
@ -20,7 +20,8 @@ BUILD_NUMBER_FILE="${GIT_ROOT}/BUILD_NUMBER"
|
|||||||
if [[ -f "${BUILD_NUMBER_FILE}" ]]; then
|
if [[ -f "${BUILD_NUMBER_FILE}" ]]; then
|
||||||
cat "${BUILD_NUMBER_FILE}"
|
cat "${BUILD_NUMBER_FILE}"
|
||||||
else
|
else
|
||||||
# Format: Year(2 digit) + Month + Day + Hour + Minutes
|
# Format: Year(4 digit) + Month + Day + Hour
|
||||||
# Example: 1812011805
|
# Example: 2018120118
|
||||||
date '+%y%m%d%H%M' | tee "${BUILD_NUMBER_FILE}"
|
# We limited precision to hours to avoid of mismatched numbers.
|
||||||
|
date '+%Y%m%d%H' | tee "${BUILD_NUMBER_FILE}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user