60 lines
1.7 KiB
Plaintext
60 lines
1.7 KiB
Plaintext
pipeline {
|
|
agent {
|
|
dockerfile {
|
|
filename 'Lab4.dockerfile'
|
|
reuseNode true
|
|
}
|
|
}
|
|
parameters {
|
|
string(
|
|
defaultValue: '1000',
|
|
description: 'Amount of values to be used from dataset',
|
|
name: 'CUTOFF',
|
|
trim: false
|
|
)
|
|
string(
|
|
defaultValue: 'wleczny',
|
|
description: 'Kaggle username',
|
|
name: 'KAGGLE_USERNAME',
|
|
trim: false
|
|
)
|
|
password(
|
|
defaultValue: '2e89e20ceb0a48d9df01a01bad744776',
|
|
description: 'Kaggle token',
|
|
name: 'KAGGLE_KEY'
|
|
)
|
|
}
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
checkout scmGit(
|
|
branches: [[name: '*/master']],
|
|
extensions: [cleanBeforeCheckout()],
|
|
userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s487183/ium_z487183.git']]
|
|
)
|
|
}
|
|
}
|
|
stage('Prepare data') {
|
|
steps {
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
|
sh 'echo "{\"username\":\"$KAGGLE_USERNAME\",\"key\":\"$KAGGLE_KEY\"}" > /.kaggle/kaggle.json'
|
|
sh './get-data.sh'
|
|
sh 'python3 prepare_dataset.py'
|
|
}
|
|
}
|
|
}
|
|
stage('Archive artifacts') {
|
|
steps {
|
|
withEnv(["CUTOFF=${params.CUTOFF}"]) {
|
|
archiveArtifacts 'X_test.csv'
|
|
archiveArtifacts 'X_val.csv'
|
|
archiveArtifacts 'X_train.csv'
|
|
archiveArtifacts 'Y_test.csv'
|
|
archiveArtifacts 'Y_val.csv'
|
|
archiveArtifacts 'Y_train.csv'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|