Update 'Jenkinsfile'

This commit is contained in:
Wojciech Mikołajski 2023-04-14 03:32:30 +02:00
parent 3b4e88f9ca
commit 76bdf0e9e4

29
Jenkinsfile vendored
View File

@ -2,17 +2,18 @@ pipeline {
agent any agent any
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania //Definijuemy parametry, które będzie można podać podczas wywoływania zadania
parameters { parameters {
string( string (
defaultValue: 'login', defaultValue: 'login',
description: 'Kaggle username', description: 'Login to Kaggle',
name: 'KAGGLE_USERNAME', name: 'KAGGLE_USERNAME',
trim: false trim: false
), )
password( password (
defaultValue: '', defaultValue: '',
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', description: 'Password to Kaggle',
name: 'KAGGLE_KEY' name: 'KAGGLE_KEY',
) trim: false
)
} }
stages { stages {
stage('checkout: Check out from version control') { stage('checkout: Check out from version control') {
@ -23,9 +24,9 @@ pipeline {
} }
stage('sh: Shell Script') { stage('sh: Shell Script') {
steps { steps {
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'
} }
} }
} }