zad4 jenkins docker image creation
This commit is contained in:
parent
af43187263
commit
032fedce3c
@ -18,22 +18,26 @@ pipeline {
|
|||||||
script {
|
script {
|
||||||
withEnv([
|
withEnv([
|
||||||
"KAGGLE_USERNAME=${env.KAGGLE_USERNAME}",
|
"KAGGLE_USERNAME=${env.KAGGLE_USERNAME}",
|
||||||
"KAGGLE_KEY=${env.KAGGLE_KEY}"])
|
"KAGGLE_KEY=${env.KAGGLE_KEY}"
|
||||||
|
]) {
|
||||||
sh "docker build --build-arg KAGGLE_USERNAME=$KAGGLE_USERNAME --build-arg KAGGLE_KEY=$KAGGLE_KEY -t s464953 ."
|
sh "docker build --build-arg KAGGLE_USERNAME=$KAGGLE_USERNAME --build-arg KAGGLE_KEY=$KAGGLE_KEY -t s464953 ."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('Run Docker container') {
|
stage('Run Docker container') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
withEnv([
|
withEnv([
|
||||||
"KAGGLE_USERNAME=${env.KAGGLE_USERNAME}",
|
"KAGGLE_USERNAME=${env.KAGGLE_USERNAME}",
|
||||||
"KAGGLE_KEY=${env.KAGGLE_KEY}"])
|
"KAGGLE_KEY=${env.KAGGLE_KEY}"
|
||||||
|
]) {
|
||||||
sh "docker run --name s464953 -e KAGGLE_USERNAME=$KAGGLE_USERNAME -e KAGGLE_KEY=$KAGGLE_KEY -v ${WORKSPACE}:/app -ti s464953"
|
sh "docker run --name s464953 -e KAGGLE_USERNAME=$KAGGLE_USERNAME -e KAGGLE_KEY=$KAGGLE_KEY -v ${WORKSPACE}:/app -ti s464953"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('Archive stats.txt artifact') {
|
stage('Archive stats.txt artifact') {
|
||||||
steps {
|
steps {
|
||||||
|
Loading…
Reference in New Issue
Block a user