Zaktualizuj 'Jenkinsfile'

This commit is contained in:
Patryk Łukasiewicz 2023-04-18 15:37:40 +02:00
parent c6473e9482
commit 65579f94e2

22
Jenkinsfile vendored
View File

@ -1,14 +1,19 @@
pipeline {
agent any
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
parameters {
string (
defaultValue: 'Hello World!',
description: 'Tekst, którym chcesz przywitać świat',
name: 'INPUT_TEXT',
parameters([
string(
defaultValue: 'patluk',
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'
)
}
])
stages {
stage('Hello') {
steps {
@ -25,10 +30,5 @@ pipeline {
archiveArtifacts 'output.txt'
}
}
stage('Notify') {
steps {
emailext attachLog: true, attachmentsPattern: 'output.txt', body: "${INPUT_TEXT}", subject: 'Hello World!', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms; tomasz.zietkiewicz@amu.edu.pl'
}
}
}
}