Save dataset to artifacts. Add .gitignore.

This commit is contained in:
Marek Moryl 2023-04-20 22:41:54 +02:00
parent b680bf88e1
commit cb4e78e1c4
3 changed files with 35 additions and 18408 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.metals/
.vscode/

44
Jenkinsfile vendored
View File

@ -2,27 +2,49 @@ pipeline {
agent any
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
parameters {
string (
string (
defaultValue: 'Hello World!',
description: 'Tekst, którym chcesz przywitać świat',
name: 'INPUT_TEXT',
trim: false
)
)
string(
defaultValue: 'wleczny',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
)
password(
defaultValue: '2e89e20ceb0a48d9df01a01bad744776',
description: 'Kaggle token',
name: 'KAGGLE_KEY'
)
}
stages {
stage('Hello') {
stage('Checkout') {
steps {
//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"
sh 'git clone https://git.wmi.amu.edu.pl/s487183/ium_z487183.git'
}
}
stage('Goodbye!') {
stage('Prepare data') {
steps {
echo 'Goodbye!'
//Zarchiwizuj wynik
archiveArtifacts 'output.txt'
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh 'kaggle datasets download amalab182/property-salesmelbourne-city'
sh 'mkdir -p ium_z487183/data'
sh 'unzip -o property-salesmelbourne-city.zip -d ium_z487183/data'
sh 'rm property-salesmelbourne-city.zip'
}
}
}
stage('Archive artifacts') {
steps {
sh 'python3 ium_z487183/prepare-dataset.py'
archiveArtifacts 'X_test.csv'
archiveArtifacts 'X_val.csv'
archiveArtifacts 'X_train.csv'
archiveArtifacts 'Y_test.csv'
archiveArtifacts 'Y_val.csv'
archiveArtifacts 'Y_train.csv'
}
}
}

File diff suppressed because it is too large Load Diff