Update Jenkinsfile4

This commit is contained in:
s464903 2024-05-11 11:37:46 +02:00
parent d603b5373c
commit ad5f6ffdf5

View File

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