Skip to content

Commit

Permalink
run buildNumber() at beggining of build, drop minutes
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Sokołowski <jakub@status.im>
  • Loading branch information
jakubgs committed Nov 28, 2018
1 parent 79e542e commit 7e031e8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions ci/Jenkinsfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ pipeline {
/* Necessary to load methods */
mobile = load 'ci/mobile.groovy'
cmn = load 'ci/common.groovy'
/* Cleanup and Prep */
mobile.prep(cmn.getBuildType())
/* Run at start to void mismatched numbers */
cmn.buildNumber()
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions ci/Jenkinsfile.ios
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ pipeline {
/* Necessary to load methods */
mobile = load 'ci/mobile.groovy'
cmn = load 'ci/common.groovy'
/* Cleanup and Prep */
mobile.prep(cmn.getBuildType())
/* Run at start to void mismatched numbers */
cmn.buildNumber()
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions ci/android.groovy
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
common = load 'ci/common.groovy'

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 "
if (type == 'release') {
gradleOpt += "-PreleaseVersion='${common.version()}'"
Expand Down
7 changes: 4 additions & 3 deletions scripts/gen_build_no.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ BUILD_NUMBER_FILE="${GIT_ROOT}/BUILD_NUMBER"
if [[ -f "${BUILD_NUMBER_FILE}" ]]; then
cat "${BUILD_NUMBER_FILE}"
else
# Format: Year(2 digit) + Month + Day + Hour + Minutes
# Example: 1812011805
date '+%y%m%d%H%M' | tee "${BUILD_NUMBER_FILE}"
# Format: Year(4 digit) + Month + Day + Hour
# Example: 2018120118
# We limited precision to hours to avoid of mismatched numbers.
date '+%Y%m%d%H' | tee "${BUILD_NUMBER_FILE}"
fi

0 comments on commit 7e031e8

Please sign in to comment.