update Jenkinsfile

This commit is contained in:
Łukasz Koziej 2023-04-05 14:48:14 +02:00
parent d35b412b36
commit df16f5b271

10
Jenkinsfile vendored
View File

@ -1,4 +1,7 @@
node { node {
def dockerImage = docker.build("lukkoz2")
dockerImage.inside {
stage('Preparation') { stage('Preparation') {
properties([ properties([
parameters([ parameters([
@ -31,7 +34,7 @@ node {
} }
stage('Build') { stage('Build') {
// Run the maven build // Run the maven build
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
@ -41,12 +44,13 @@ stage('Build') {
} }
} }
stage('Cut data') { stage('Cut data') {
withEnv(["CUTOFF=${params.CUTOFF}"]) { withEnv(["CUTOFF=${params.CUTOFF}"]) {
sh '''head -n $((CUTOFF)) books_edited.csv > books_edited_cut.csv'''} sh '''head -n $((CUTOFF)) books_edited.csv > books_edited_cut.csv'''}
} }
stage('Save data into artifacts') { stage('Save data into artifacts') {
archiveArtifacts artifacts: 'books_edited.csv', followSymlinks: false archiveArtifacts artifacts: 'books_edited.csv', followSymlinks: false
} }
}
} }