Update Jenkinsfile4

This commit is contained in:
s464903 2024-05-11 11:37:46 +02:00
parent d603b5373c
commit ad5f6ffdf5
1 changed files with 26 additions and 2 deletions

View File

@ -29,24 +29,48 @@ pipeline {
}
}
stage('Run in container') {
stage('Run in container - Checkout') {
steps {
script {
docker.image('test-image').inside {
// Step: Clone the git repository
checkout scm
}
}
}
}
stage('Run in container - Build') {
steps {
script {
docker.image('test-image').inside {
// Step: Build
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh 'kaggle datasets list'
}
}
}
}
}
stage('Run in container - Run ipynb script') {
steps {
script {
docker.image('test-image').inside {
// Step: Run ipynb script
sh "mkdir /notebooks"
sh "cp Biblioteka_DL_trenowanie.ipynb /notebooks/Biblioteka_DL_trenowanie.ipynb"
}
}
}
}
stage('Run in container - Archive Artifacts') {
steps {
script {
docker.image('test-image').inside {
// Step: Archive Artifacts
stash includes: 'model.keras', name: 'artifacts'
}