diff --git a/Jenkinsfile2 b/Jenkinsfile2 new file mode 100644 index 0000000..da4a961 --- /dev/null +++ b/Jenkinsfile2 @@ -0,0 +1,27 @@ +pipeline { + agent any + parameters { + buildSelector( + defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts', + name: 'BUILD_SELECTOR' + ) + } + + stages { + + stage('Check out from version control') { + steps { + checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444501', url: 'https://git.wmi.amu.edu.pl/s444501/ium_444501.git']]]) + } + } + + stage('Shell Script') { + steps { + copyArtifacts fingerprintArtifacts: true, projectName: 's444501-create-dataset', selector: buildParameter('BUILD_SELECTOR') + sh 'chmod u+x ./stats.sh' + sh './stats.sh' + archiveArtifacts 'stats.txt' + } + } +} diff --git a/stats.sh b/stats.sh new file mode 100644 index 0000000..43e79d9 --- /dev/null +++ b/stats.sh @@ -0,0 +1,3 @@ +wc -l d_test.csv > stats.txt +wc -l d_dev.csv >> stats.txt +wc -l d_train.csv >> stats.txt