edited Jenkinsfile and added get_dataset.sh
This commit is contained in:
parent
2a72dd5df3
commit
27d18e1c0d
60
Jenkinsfile
vendored
60
Jenkinsfile
vendored
@ -1,25 +1,41 @@
|
|||||||
node {
|
node {
|
||||||
stage('Preparation') {
|
stage('Preparation') {
|
||||||
properties([
|
properties([
|
||||||
parameters([
|
parameters([
|
||||||
string(
|
string(
|
||||||
defaultValue: 'Hello World!',
|
defaultValue: 'lukkoz2',
|
||||||
description: 'Tekst do wyświetlenie',
|
description: 'Kaggle username',
|
||||||
name: 'INPUT_TEXT',
|
name: 'KAGGLE_USERNAME',
|
||||||
trim: false
|
trim: false
|
||||||
)
|
),
|
||||||
])
|
password(
|
||||||
])
|
defaultValue: '',
|
||||||
}
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
||||||
stage('Hello') {
|
name: 'KAGGLE_KEY'
|
||||||
//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
|
])
|
||||||
sh "figlet \"${INPUT_TEXT}\" | tee output.txt"
|
}
|
||||||
}
|
|
||||||
stage('Goodbye') {
|
stage('checkout: Check out from version control') {
|
||||||
echo 'Goodbye!'
|
checkout([$class: 'GitSCM',
|
||||||
//Zarchiwizuj wynik
|
branches: [[name: '*/master']],
|
||||||
archiveArtifacts 'output.txt'
|
extensions: [],
|
||||||
|
userRemoteConfigs: [[credentialsId: 's425850', url: 'https://git.wmi.amu.edu.pl/s425850/ium_425850']]])
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
stage('Build') {
|
||||||
|
// Run the maven build
|
||||||
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||||
|
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||||
|
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
||||||
|
sh 'kaggle datasets list'
|
||||||
|
sh 'chmod u+x ./get_dataset.sh'
|
||||||
|
sh './get_dataset.sh'
|
||||||
|
}
|
||||||
|
stage('Save data into artifacts') {
|
||||||
|
archiveArtifacts artifacts: 'books_edited.csv', followSymlinks: false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
3
get_dataset.sh
Normal file
3
get_dataset.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
kaggle datasets download -d dylanjcastillo/7k-books-with-metadata
|
||||||
|
unzip -o 7k-books-with-metadata.zip
|
||||||
|
cut -d ',' -f 1,2,4,7,8 --complement books.csv > books_edited.csv
|
Loading…
Reference in New Issue
Block a user