mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-13 02:04:28 +00:00
fix nix cache build process
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
7dae2ecaf6
commit
9537425cf2
@ -9,16 +9,12 @@ pipeline {
|
|||||||
|
|
||||||
environment {
|
environment {
|
||||||
/* we source .bash_profile to be able to use nix-store */
|
/* we source .bash_profile to be able to use nix-store */
|
||||||
NIX_SSHOPTS="-o StrictHostKeyChecking=no source .bash_profile;"
|
NIX_SSHOPTS = "-o StrictHostKeyChecking=no source .bash_profile;"
|
||||||
/* where our /nix/store is hosted */
|
/* where our /nix/store is hosted */
|
||||||
NIX_CACHE_USER = 'nix-cache'
|
NIX_CACHE_USER = 'nix-cache'
|
||||||
NIX_CACHE_HOST = 'master-01.do-ams3.ci.misc.statusim.net'
|
NIX_CACHE_HOST = 'master-01.do-ams3.ci.misc.statusim.net'
|
||||||
/* we add both keys so default binary cache also works */
|
/* we add both keys so default binary cache also works */
|
||||||
NIX_BIN_CACHE = 'https://nix-cache.status.im/'
|
NIX_CONF_DIR = "${env.WORKSPACE}/scripts/lib/setup/nix"
|
||||||
NIX_BIN_CACHE_KEYS = (
|
|
||||||
'nix-cache.status.im-1:x/93lOfLU+duPplwMSBR+OlY4+mo+dCN7n0mr4oPwgY= '+
|
|
||||||
'cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY='
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
options {
|
options {
|
||||||
@ -41,12 +37,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
/* we dogfood our own cache to speed up builds */
|
sh 'nix-shell --run echo'
|
||||||
sh """
|
|
||||||
nix-build -A env.all \
|
|
||||||
--option extra-substituters '${NIX_BIN_CACHE}' \
|
|
||||||
--trusted-public-keys '${NIX_BIN_CACHE_KEYS}'
|
|
||||||
"""
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Upload') {
|
stage('Upload') {
|
||||||
|
@ -5,23 +5,19 @@ pipeline {
|
|||||||
|
|
||||||
environment {
|
environment {
|
||||||
/* we source .bash_profile to be able to use nix-store */
|
/* we source .bash_profile to be able to use nix-store */
|
||||||
NIX_SSHOPTS="-o StrictHostKeyChecking=no source .bash_profile;"
|
NIX_SSHOPTS = "-o StrictHostKeyChecking=no source .bash_profile;"
|
||||||
/* where our /nix/store is hosted */
|
/* where our /nix/store is hosted */
|
||||||
NIX_CACHE_USER = 'nix-cache'
|
NIX_CACHE_USER = 'nix-cache'
|
||||||
NIX_CACHE_HOST = 'master-01.do-ams3.ci.misc.statusim.net'
|
NIX_CACHE_HOST = 'master-01.do-ams3.ci.misc.statusim.net'
|
||||||
/* we add both keys so default binary cache also works */
|
/* we add both keys so default binary cache also works */
|
||||||
NIX_BIN_CACHE = 'https://nix-cache.status.im/'
|
NIX_CONF_DIR = "${env.WORKSPACE}/scripts/lib/setup/nix"
|
||||||
NIX_BIN_CACHE_KEYS = (
|
|
||||||
'nix-cache.status.im-1:x/93lOfLU+duPplwMSBR+OlY4+mo+dCN7n0mr4oPwgY= '+
|
|
||||||
'cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY='
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
options {
|
options {
|
||||||
timestamps()
|
timestamps()
|
||||||
disableConcurrentBuilds()
|
disableConcurrentBuilds()
|
||||||
/* Prevent Jenkins jobs from running forever */
|
/* Prevent Jenkins jobs from running forever */
|
||||||
timeout(time: 120, unit: 'MINUTES')
|
timeout(time: 300, unit: 'MINUTES')
|
||||||
/* Limit builds retained */
|
/* Limit builds retained */
|
||||||
buildDiscarder(logRotator(
|
buildDiscarder(logRotator(
|
||||||
numToKeepStr: '20',
|
numToKeepStr: '20',
|
||||||
@ -41,12 +37,9 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
/* we dogfood our own cache to speed up builds */
|
|
||||||
sh """
|
sh """
|
||||||
. ~/.nix-profile/etc/profile.d/nix.sh && \
|
. ~/.nix-profile/etc/profile.d/nix.sh && \
|
||||||
nix-build -A env.all \
|
nix-shell --run echo
|
||||||
--option extra-substituters '${NIX_BIN_CACHE}' \
|
|
||||||
--trusted-public-keys '${NIX_BIN_CACHE_KEYS}'
|
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user