Zaktualizuj 'Jenkinsfile'
This commit is contained in:
parent
4f6aea9d8d
commit
c6cd22bf41
50
Jenkinsfile
vendored
50
Jenkinsfile
vendored
@ -1,5 +1,6 @@
|
||||
pipeline {
|
||||
agent any
|
||||
agent any
|
||||
|
||||
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
|
||||
parameters{
|
||||
string(
|
||||
@ -9,25 +10,52 @@ pipeline {
|
||||
trim: false
|
||||
)
|
||||
password(
|
||||
defaultValue: 'password',
|
||||
defaultValue: '',
|
||||
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
||||
name: 'KAGGLE_KEY'
|
||||
)
|
||||
string(
|
||||
defaultValue: '200',
|
||||
description: 'CUTOFF',
|
||||
name: 'CUTOFF',
|
||||
trim: false
|
||||
)
|
||||
}
|
||||
stages {
|
||||
stage('Hello') {
|
||||
|
||||
stage('Clone Git') {
|
||||
steps {
|
||||
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
|
||||
echo "INPUT_TEXT: ${KAGGLE_USERNAME}"
|
||||
//Wywołaj w konsoli komendę "figlet", która generuje ASCI-art
|
||||
sh "figlet \"${KAGGLE_USERNAME}${KAGGLE_KEY}\" | tee output.txt"
|
||||
sh 'git clone https://git.wmi.amu.edu.pl/s43743/ium_z434743'
|
||||
}
|
||||
}
|
||||
stage('Goodbye!') {
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
echo 'Goodbye!'
|
||||
//Zarchiwizuj wynik
|
||||
archiveArtifacts 'output.txt'
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||
sh 'kaggle datasets download -d andrezaza/clapper-massive-rotten-tomatoes-movies-and-reviews'
|
||||
sh 'unzip clapper-massive-rotten-tomatoes-movies-and-reviews.zip -d ./ium_z434743'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Docker') {
|
||||
agent {
|
||||
dockerfile {
|
||||
filename 'Dockerfile'
|
||||
dir 'ium_z43743'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'python ./ium_z434743/z434743-create-dataset.py'
|
||||
archiveArtifacts 'X_test.csv'
|
||||
archiveArtifacts 'X_dev.csv'
|
||||
archiveArtifacts 'X_train.csv'
|
||||
}
|
||||
}
|
||||
stage('clear') {
|
||||
steps {
|
||||
sh 'rm -rf *'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user