Update 'Jenkinsfile-Docker'

This commit is contained in:
Wojciech Mikołajski 2023-04-19 18:59:56 +02:00
parent 3333662c6b
commit e2f446ff88

View File

@ -1,28 +1,7 @@
pipeline {
agent {
dockerfile true
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Build Docker image') {
steps {
sh 'docker build -f Dockerfile .'
}
}
stage('Run command in Docker container') {
steps {
script {
sh "ls -l"
sh "docker run -v ${env.WORKSPACE}/artifacts:/app/artifacts wujt89 python3 create_dataset.py"
}
}
}
node {
checkout scm
def testImage = docker.build("test-image")
testImage.inside {
sh 'echo "test"'
}
}