Testing
Apps/everybody-mov/pipeline/head There was a failure building this commit Details

This commit is contained in:
Amber McCloughan 2022-09-01 23:46:34 -04:00
parent 69e494f912
commit 124316faa1
2 changed files with 36 additions and 8 deletions

42
Jenkinsfile vendored
View File

@ -1,17 +1,20 @@
pipeline { pipeline {
agent { agent none
docker {
image 'python:3.10-slim-bullseye'
}
}
environment { environment {
HOME = "${env.WORKSPACE}" HOME = "${env.WORKSPACE}"
DOCKER_IMAGE_NAME = 'registry.digitalocean.com/ailuridae-registry/ailuridae.io/everybodymov'
DOCKER_IMAGE = ''
} }
stages { stages {
stage('Setup') { stage('Setup') {
agent {
docker {
image 'python:3.10-slim-bullseye'
}
}
steps { steps {
sh 'python -m pip install --no-cache-dir --upgrade --user pip' sh 'python -m pip install --no-cache-dir --upgrade --user pip'
sh 'python -m pip install --no-cache-dir pipenv --user' sh 'python -m pip install --no-cache-dir pipenv --user'
@ -19,9 +22,34 @@ pipeline {
} }
} }
stage('Check') { stage('Check') {
// Security check. agent {
docker {
image 'python:3.10-slim-bullseye'
}
}
steps { steps {
sh 'python -m pipenv run bandit tweetbot.py' sh 'python -m pipenv verify'
sh 'python -m pipenv check --clear'
sh 'python -m pipenv run bandit -r .'
}
}
stage('Build') {
agent 'main'
steps {
script {
DOCKER_IMAGE = docker.build("${DOCKER_IMAGE_NAME}")
}
}
}
stage('Publish') {
agent 'main'
steps {
script {
docker.withRegistry("", "digital-ocean-ailuridae-registry") {
DOCKER_IMAGE.push("${BUILD_NUMBER}")
DOCKER_IMAGE.push('latest')
}
}
} }
} }
} }

2
Pipfile.lock generated
View File

@ -1,7 +1,7 @@
{ {
"_meta": { "_meta": {
"hash": { "hash": {
"sha256": "3dc4c0a387fc9c5280d0dbfadae8f3d7cac3ddf589af5ec78dfe7090ff2684f2" "sha256": "e7a1785570cb6182573b0e15cae2ad2c86adb2c280e88ceaa9126c232b720c9c"
}, },
"pipfile-spec": 6, "pipfile-spec": 6,
"requires": { "requires": {