ium_s449288/lab3/Jenkinsfile1

33 lines
1.1 KiB
Plaintext
Raw Normal View History

2022-03-25 21:14:09 +01:00
pipeline {
2022-03-25 22:38:14 +01:00
agent any
parameters{
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
2022-03-25 21:14:09 +01:00
stages {
stage('Stage 1') {
steps {
2022-03-25 22:32:50 +01:00
echo 'Checking out...'
2022-03-25 21:14:09 +01:00
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 'f695fe86-8cca-47f7-a546-d3bfd1059fd4', url: 'https://git.wmi.amu.edu.pl/s449288/ium_s449288.git']]])
2022-03-25 22:32:50 +01:00
echo 'Checked out'
echo 'Copying artifacts...'
2022-03-25 21:14:09 +01:00
copyArtifacts fingerprintArtifacts: true, projectName: 's449288-create-dataset', selector: buildParameter('BUILD_SELECTOR')
2022-03-25 22:32:50 +01:00
echo 'Artifacts copied'
2022-03-27 13:50:02 +02:00
echo 'Unpacking artifacts'
sh 'tar xvzf lego_sets.tar.gz'
echo 'Artifacts unpacked'
2022-03-25 22:32:50 +01:00
echo 'Creating statistics file...'
2022-03-27 13:50:02 +02:00
sh 'chmod u+x ./statystyki.sh'
sh './statystyki.sh lego_sets.train.csv'
2022-03-25 22:32:50 +01:00
echo 'Statistics file created'
echo 'Archiving results...'
archiveArtifacts 'statystyki.txt'
echo 'Results archived'
2022-03-25 21:14:09 +01:00
}
}
}
}