ium_426206/Jenkinsfile
2021-04-10 20:40:17 +02:00

43 lines
1.4 KiB
Groovy

node {
stage('One') {
properties([
parameters([
string(defaultValue: '',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false),
password(defaultValue: '',
description: 'Kaggle token',
name: 'KAGGLE_KEY')
])
]
)
stage('Two') {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]])
checkout scm
def image = docker.build("image")
image.inside {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh './skrypt.sh'
}
}
}
}
}
}