Compare commits
10 Commits
master
...
nix-jenkin
| Author | SHA1 | Date | |
|---|---|---|---|
|
36623a7ac8
|
|||
|
3f864535ed
|
|||
|
c7c3a9c4cb
|
|||
|
762205febf
|
|||
|
06648c7807
|
|||
|
59aa08a5b1
|
|||
|
ff93cb284a
|
|||
|
96d5e5a560
|
|||
|
f97a34a3c7
|
|||
|
13cf2ce1d1
|
54
Jenkinsfile
vendored
54
Jenkinsfile
vendored
@@ -13,16 +13,35 @@ pipeline {
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
echo 'Building...'
|
||||
sh 'python --version'
|
||||
sh 'poetry --version'
|
||||
sh 'poetry install'
|
||||
|
||||
stage('Build All') {
|
||||
parallel {
|
||||
stage('Build') {
|
||||
steps {
|
||||
echo 'Building...'
|
||||
sh 'python --version'
|
||||
sh 'poetry --version'
|
||||
sh 'poetry install'
|
||||
}
|
||||
}
|
||||
stage('Nix Build') {
|
||||
steps {
|
||||
|
||||
container("nixbuilder") {
|
||||
|
||||
echo 'Building on nix...'
|
||||
sh 'nix --version'
|
||||
sh 'nix develop . -c python --version'
|
||||
sh 'nix develop . -c poetry --version'
|
||||
sh 'nix develop . -c poetry install'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Test') {
|
||||
parallel{
|
||||
parallel {
|
||||
stage('pytest') {
|
||||
steps {
|
||||
sh 'poetry run pytest'
|
||||
@@ -38,6 +57,27 @@ pipeline {
|
||||
sh 'poetry run mypy pdme'
|
||||
}
|
||||
}
|
||||
stage('nix pytest') {
|
||||
steps {
|
||||
container("nixbuilder") {
|
||||
sh 'pytest'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('nix lint') {
|
||||
steps {
|
||||
container("nixbuilder") {
|
||||
sh 'flake8 pdme tests'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('nix mypy') {
|
||||
steps {
|
||||
container("nixbuilder") {
|
||||
sh 'mypy pdme'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,3 +14,14 @@ spec:
|
||||
cpu: "500m"
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
- name: nixbuilder
|
||||
image: nixos/nix:2.11.0
|
||||
# command: ["nix", "--version"]
|
||||
command: ["tail", "-f", "/dev/null"] # this or any command that is bascially a noop is required, this is so that you don't overwrite the entrypoint of the base container
|
||||
imagePullPolicy: Always # use cache or pull image for agent
|
||||
resources: # limits the resources your build contaienr
|
||||
requests:
|
||||
memory: "2Gi"
|
||||
cpu: "500m"
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
|
||||
Reference in New Issue
Block a user