edited Jenkinsfile and added get_dataset.sh
This commit is contained in:
parent
2a72dd5df3
commit
27d18e1c0d
40
Jenkinsfile
vendored
40
Jenkinsfile
vendored
@ -3,23 +3,39 @@ node {
|
||||
properties([
|
||||
parameters([
|
||||
string(
|
||||
defaultValue: 'Hello World!',
|
||||
description: 'Tekst do wyświetlenie',
|
||||
name: 'INPUT_TEXT',
|
||||
defaultValue: 'lukkoz2',
|
||||
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'
|
||||
)
|
||||
])
|
||||
])
|
||||
}
|
||||
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
|
||||
sh "figlet \"${INPUT_TEXT}\" | tee output.txt"
|
||||
|
||||
stage('checkout: Check out from version control') {
|
||||
checkout([$class: 'GitSCM',
|
||||
branches: [[name: '*/master']],
|
||||
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
|
||||
}
|
||||
stage('Goodbye') {
|
||||
echo 'Goodbye!'
|
||||
//Zarchiwizuj wynik
|
||||
archiveArtifacts 'output.txt'
|
||||
}
|
||||
}
|
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