Compare commits

...

10 Commits

Author SHA1 Message Date
36623a7ac8 jenkins: one big test parallel
Some checks failed
gitea-physics/pdme/pipeline/head There was a failure building this commit
2022-09-06 21:10:24 -05:00
3f864535ed jenkins: fixes issue
Some checks failed
gitea-physics/pdme/pipeline/head There was a failure building this commit
2022-09-06 21:07:36 -05:00
c7c3a9c4cb nix: adds jenkins tests in nix runner
Some checks failed
gitea-physics/pdme/pipeline/head There was a failure building this commit
2022-09-06 21:06:26 -05:00
762205febf nix: delete unused nix agent 2022-09-06 21:02:52 -05:00
06648c7807 nix: adds command to nix agent to stop it terminating
All checks were successful
gitea-physics/pdme/pipeline/head This commit looks good
2022-09-06 19:03:53 -05:00
59aa08a5b1 nix: nix now one container let's see
Some checks failed
gitea-physics/pdme/pipeline/head Something is wrong with the build of this commit
2022-09-06 18:52:38 -05:00
ff93cb284a nix: more testing with this agent thing
Some checks failed
gitea-physics/pdme/pipeline/head Something is wrong with the build of this commit
2022-09-06 18:34:51 -05:00
96d5e5a560 nix: tries to specify agent at each step
Some checks failed
gitea-physics/pdme/pipeline/head There was a failure building this commit
2022-09-06 18:32:34 -05:00
f97a34a3c7 nix: play with agent stuff
Some checks failed
gitea-physics/pdme/pipeline/head There was a failure building this commit
2022-09-06 18:23:57 -05:00
13cf2ce1d1 nix: jenkins test on nix
Some checks failed
gitea-physics/pdme/pipeline/head There was a failure building this commit
2022-09-06 18:04:25 -05:00
2 changed files with 58 additions and 7 deletions

54
Jenkinsfile vendored
View File

@@ -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'
}
}
}
}
}

View File

@@ -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"