Skip to content

Commit

Permalink
add Jenkinsfile.nix.linux for building /nix/store
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 Feb 28, 2019
1 parent f40ddc1 commit 1ff4dce
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions ci/Jenkinsfile.nix.linux
@@ -0,0 +1,42 @@
pipeline {
agent {
docker {
label 'linux'
image 'nixos/nix'
args '-u 0:0'
}
}

environment {
NIX_CACHE_HOST = 'nix-cache@master-01.do-ams3.ci.misc.statusim.net'
}

options {
timestamps()
/* Prevent Jenkins jobs from running forever */
timeout(time: 50, unit: 'MINUTES')
/* Limit builds retained */
buildDiscarder(logRotator(
numToKeepStr: '20',
daysToKeepStr: '30',
))
}

stages {
stage('Build') {
steps {
sh 'nix-build -A env'
}
}
stage('Upload') {
steps {
sshagent(credentials: ['nix-cache-ssh']) {
sh """
rsync -e 'ssh -o StrictHostKeyChecking=no' -r \
/nix/store/. ${env.NIX_CACHE_HOST}:/nix/store/
"""
}
}
}
}
}

0 comments on commit 1ff4dce

Please sign in to comment.