updated dockerfile

This commit is contained in:
Mateusz Kuc 2023-06-30 20:31:45 +02:00
parent 9689d9c2f9
commit d348127494
1 changed files with 38 additions and 43 deletions

View File

@ -1,46 +1,41 @@
pipeline{ pipeline {
agent{ agent any
dockerfile {
filename: 'lab4.dockerfile',
reuseNode: true,
}
}
parameters{
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages{
stage('Checkout') {
steps {
checkout scmGit(
branches: [[name: '*/master']],
userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s458023/ium_458023.git']]
)
}
}
stage('Prepare image and stats') {
steps {
script {
copyArtifacts filter: 'wines_test.csv,wines_dev.csv,wines_train.csv', fingerprintArtifacts: true, projectName: 'z-s458023-create-dataset', selector: workspace()
// pobranie obrazu dockera
docker.image('s458023/ium:1').pull()
// testowanie kodu parameters{
docker.withRegistry('https://registry.hub.docker.com', 'credentials-id') { buildSelector(
// Zbuduj kontener Dockerowy defaultSelector: lastSuccessful(),
docker.image('s458023/ium').inside { description: 'Which build to use for copying artifacts',
// Wykonaj kolejne polecenia w kontenerze name: 'BUILD_SELECTOR'
sh 'ls -la' )
sh 'echo "done"' }
// itd. stages {
} stage('Checkout') {
} steps {
} checkout scmGit(
sh './wines_train.py branches: [[name: '*/master']],
sh 'predict.py' userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s487183/ium_458023.git']]
archiveArtifacts 'my_runs/**' )
}
}
stage('Prepare stats') {
agent {
// docker {
// image 's458023/ium:1'
// reuseNode true
// }
dockerfile {
filename 'lab4.dockerfile'
reuseNode true
} }
}
steps {
copyArtifacts projectName: 'z-s458023-create-dataset'
sh 'bash /prepare_dataset.sh'
sh 'mkdir sacred-files'
sh 'python3 wines_train.py'
sh 'python3 predict.py'
archiveArtifacts 'my_runs/**'
}
}
}
} }