test
This commit is contained in:
parent
2597b32d2d
commit
3bfd589d15
49
Jenkinsfile
vendored
49
Jenkinsfile
vendored
@ -1,25 +1,38 @@
|
|||||||
node {
|
pipeline {
|
||||||
stage('Preparation') {
|
agent any
|
||||||
properties([
|
parameters {
|
||||||
parameters([
|
|
||||||
string(
|
string(
|
||||||
defaultValue: 'Hello Worldyy!',
|
defaultValue: 'shuhrer',
|
||||||
description: 'Tekst do wyświetlenie',
|
description: 'Kaggle username',
|
||||||
name: 'INPUT_TEXT',
|
name: 'KAGGLE_USERNAME',
|
||||||
trim: false
|
trim: false
|
||||||
)
|
)
|
||||||
])
|
password(
|
||||||
])
|
defaultValue: '',
|
||||||
|
description: 'Kaggle token',
|
||||||
|
name: 'KAGGLE_KEY'
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
stage('Hello') {
|
|
||||||
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
|
|
||||||
echo "INPUT_TEXT: ${INPUT_TEXT}"
|
|
||||||
//Wywołaj w konsoli komendę "figlet", która generuje ASCI-art
|
stages {
|
||||||
sh "figlet \"${INPUT_TEXT}\" | tee output.txt"
|
|
||||||
|
stage('Check out from version control') {
|
||||||
|
steps {
|
||||||
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444501', url: 'https://git.wmi.amu.edu.pl/s444501/ium_444501.git']]])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Shell Script') {
|
||||||
|
steps {
|
||||||
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}","KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
||||||
|
sh './download.sh'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
stage('Goodbye') {
|
|
||||||
echo 'Goodbye!'
|
|
||||||
//Zarchiwizuj wynik
|
|
||||||
archiveArtifacts 'output.txt'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user