update jenkisfile

This commit is contained in:
Norbert Walkowiak 2023-04-15 10:19:24 +02:00
parent 78636092b9
commit 43b7355ae8

23
Jenkinsfile vendored
View File

@ -1,23 +1,28 @@
pipeline { pipeline {
agent any agent any
stages { parameters {
stage('Preparation') {
properties([
//dostęp do API KAGGLE
parameters([
string( string(
defaultValue: 'nbrt10', defaultValue: 'nbrt10',
description: 'Kaggle username', description: 'Kaggle username',
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: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY' name: 'KAGGLE_KEY'
) )
]) }
]) stages {
stage('Preparation') {
steps {
script {
// Ustawianie danych uwierzytelniających KAGGLE
withCredentials([string(credentialsId: '', variable: 'KAGGLE_USERNAME'), string(credentialsId: '', variable: 'KAGGLE_KEY')]) {
sh 'export KAGGLE_USERNAME=$KAGGLE_USERNAME && export KAGGLE_KEY=$KAGGLE_KEY'
}
}
}
} }
stage('checkout') { stage('checkout') {
steps { steps {
@ -28,7 +33,7 @@ pipeline {
stage('script') { stage('script') {
steps { steps {
//skrypt //skrypt
sh './s487175-create-dataset-scriptsh.py' > output.txt sh './s487175-create-dataset-scriptsh.py > output.txt'
} }
} }
} }