Update 'Jenkinsfile'
This commit is contained in:
parent
3ac289c252
commit
b6b81e7f01
57
Jenkinsfile
vendored
57
Jenkinsfile
vendored
@ -1,33 +1,26 @@
|
||||
pipeline {
|
||||
agent any
|
||||
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
|
||||
parameters {
|
||||
string (
|
||||
defaultValue: 'login',
|
||||
description: 'Login to Kaggle',
|
||||
name: 'KAGGLE_USERNAME',
|
||||
trim: false
|
||||
),
|
||||
password (
|
||||
defaultValue: '',
|
||||
description: 'Password to Kaggle',
|
||||
name: 'KAGGLE_KEY',
|
||||
trim: false
|
||||
)
|
||||
}
|
||||
stages {
|
||||
stage('checkout: Check out from version control') {
|
||||
steps {
|
||||
git branch: 'master',
|
||||
url: 'https://git.wmi.amu.edu.pl/s487182/ium_s487182'
|
||||
}
|
||||
}
|
||||
stage('sh: Shell Script') {
|
||||
steps {
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
||||
}
|
||||
}
|
||||
}
|
||||
node {
|
||||
stage('Preparation') {
|
||||
properties([
|
||||
parameters([
|
||||
string(
|
||||
defaultValue: 'login',
|
||||
description: 'Kaggle username',
|
||||
name: 'KAGGLE_USERNAME',
|
||||
trim: false
|
||||
),
|
||||
password(
|
||||
defaultValue: '',
|
||||
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
||||
name: 'KAGGLE_KEY'
|
||||
)
|
||||
])
|
||||
])
|
||||
}
|
||||
stage('Build') {
|
||||
// Run the maven build
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user