Update Jenkinsfile4

This commit is contained in:
s464903 2024-05-11 11:50:42 +02:00
parent 113cdff5c4
commit 8282f85a65

View File

@ -24,7 +24,7 @@ pipeline {
steps { steps {
script { script {
checkout scm checkout scm
def testImage = docker.build("test-image", "-f Dockerfile2 .") def testImage = docker.build("image", "-f Dockerfile2 .")
} }
} }
} }
@ -32,7 +32,7 @@ pipeline {
stage('Run in container - Checkout') { stage('Run in container - Checkout') {
steps { steps {
script { script {
docker.image('test-image').inside { docker.image('image').inside {
// Step: Clone the git repository // Step: Clone the git repository
checkout scm checkout scm
} }
@ -43,7 +43,7 @@ pipeline {
stage('Run in container - Build') { stage('Run in container - Build') {
steps { steps {
script { script {
docker.image('test-image').inside { docker.image('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}" ]) {
@ -57,7 +57,7 @@ pipeline {
stage('Run in container - Run ipynb script') { stage('Run in container - Run ipynb script') {
steps { steps {
script { script {
docker.image('test-image').inside { docker.image('image').inside {
docker.cp('Biblioteka_DL_trenowanie.ipynb', '/Biblioteka_DL_trenowanie.ipynb') docker.cp('Biblioteka_DL_trenowanie.ipynb', '/Biblioteka_DL_trenowanie.ipynb')
} }
} }
@ -67,7 +67,7 @@ pipeline {
stage('Run in container - Archive Artifacts') { stage('Run in container - Archive Artifacts') {
steps { steps {
script { script {
docker.image('test-image').inside { docker.image('image').inside {
// Step: Archive Artifacts // Step: Archive Artifacts
stash includes: 'model.keras', name: 'artifacts' stash includes: 'model.keras', name: 'artifacts'
} }