54 lines
1.7 KiB
Plaintext
54 lines
1.7 KiB
Plaintext
pipeline {
|
|
agent any
|
|
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania
|
|
parameters{
|
|
choice(
|
|
choices: ['lastSuccessful()', 'lastCompleted()', 'latestSavedBuild()'],
|
|
description: 'Which build to use for copying artifacts',
|
|
name: 'BUILD_SELECTOR'
|
|
)}
|
|
stages {
|
|
stage('clear_all') {
|
|
steps {
|
|
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
|
|
sh 'rm -rf ium_z434686'
|
|
}
|
|
}
|
|
stage('checkout') {
|
|
steps {
|
|
//Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)
|
|
sh 'git clone https://git.wmi.amu.edu.pl/s434686/ium_z434686'
|
|
}
|
|
}
|
|
stage('copy_artifacts') {
|
|
steps {
|
|
copyArtifacts filter: 'X_test.csv,X_dev.csv,X_train.csv', fingerprintArtifacts: true, projectName: 'z-s434686-create-dataset', selector: workspace()
|
|
}
|
|
}
|
|
stage('Docker') {
|
|
agent {
|
|
dockerfile {
|
|
filename 'second.dockerfile'
|
|
dir 'ium_z434686'
|
|
reuseNode true
|
|
}
|
|
}
|
|
steps {
|
|
sh 'ls -a'
|
|
sh 'python ./ium_z434686/dataset-stats.py'
|
|
echo 'koniec'
|
|
//archiveArtifacts 'X_test.csv'
|
|
//archiveArtifacts 'X_dev.csv'
|
|
//archiveArtifacts 'X_train.csv'
|
|
}
|
|
}
|
|
stage('Goodbye!') {
|
|
steps {
|
|
echo 'Goodbye!'
|
|
//Zarchiwizuj wynik
|
|
archiveArtifacts 'dataset.csv'
|
|
|
|
}
|
|
}
|
|
}
|
|
} |