Zaktualizuj 'Jenkinsfile'
This commit is contained in:
parent
4f6aea9d8d
commit
c6cd22bf41
48
Jenkinsfile
vendored
48
Jenkinsfile
vendored
@ -1,5 +1,6 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
|
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
|
||||||
parameters{
|
parameters{
|
||||||
string(
|
string(
|
||||||
@ -9,25 +10,52 @@ pipeline {
|
|||||||
trim: false
|
trim: false
|
||||||
)
|
)
|
||||||
password(
|
password(
|
||||||
defaultValue: 'password',
|
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'
|
||||||
)
|
)
|
||||||
|
string(
|
||||||
|
defaultValue: '200',
|
||||||
|
description: 'CUTOFF',
|
||||||
|
name: 'CUTOFF',
|
||||||
|
trim: false
|
||||||
|
)
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Hello') {
|
|
||||||
|
stage('Clone Git') {
|
||||||
steps {
|
steps {
|
||||||
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
|
sh 'git clone https://git.wmi.amu.edu.pl/s43743/ium_z434743'
|
||||||
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"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Goodbye!') {
|
|
||||||
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Goodbye!'
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||||
//Zarchiwizuj wynik
|
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||||
archiveArtifacts 'output.txt'
|
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