Jenkins update & test script
This commit is contained in:
parent
60efc65335
commit
0c0a469065
45
Jenkinsfile
vendored
45
Jenkinsfile
vendored
@ -30,4 +30,47 @@ pipeline {
|
||||
// echo "Saving results to the output.txt..."
|
||||
// archiveArtifacts 'output.txt'
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
parameters {
|
||||
string(
|
||||
defaultValue:'mateuszogrodowczyk',
|
||||
description: 'Kaggle username',
|
||||
name'KAGGLE_USERNAME',
|
||||
trim: true
|
||||
),
|
||||
password(
|
||||
defaultValue: '',
|
||||
description: 'Kaggle access token retrieved from kaggle.json file - https://github.com/Kaggle/kaggle-api#api-credentials',
|
||||
name: 'KAGGLE_KEY'
|
||||
)
|
||||
}
|
||||
environment {
|
||||
KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
|
||||
KAGGLE_KEY="$params.KAGGLE_KEY"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Install depends.') {
|
||||
steps {
|
||||
sh "pip install --user -r requirements.txt"
|
||||
}
|
||||
}
|
||||
stage('Prepare dataset') {
|
||||
steps {
|
||||
script {
|
||||
withEnv([
|
||||
"KAGGLE_USERNAME={$params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY={$params.KAGGLE_KEY}"
|
||||
])
|
||||
sh 'echo Welcome: $KAGGLE_USERNAME'
|
||||
sh 'kaggle datasets list'
|
||||
}
|
||||
sh "chmod u+x ./test_script.sh"
|
||||
sh "./test_script.sh"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
test_script.sh
Normal file
1
test_script.sh
Normal file
@ -0,0 +1 @@
|
||||
echo "Everything went well"
|
Loading…
Reference in New Issue
Block a user