update Jenkinsfile
This commit is contained in:
parent
d35b412b36
commit
df16f5b271
92
Jenkinsfile
vendored
92
Jenkinsfile
vendored
@ -1,52 +1,56 @@
|
||||
node {
|
||||
stage('Preparation') {
|
||||
properties([
|
||||
parameters([
|
||||
string(
|
||||
defaultValue: 'lukkoz2',
|
||||
description: 'Kaggle username',
|
||||
name: 'KAGGLE_USERNAME',
|
||||
trim: false
|
||||
),
|
||||
password(
|
||||
defaultValue: '',
|
||||
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
||||
name: 'KAGGLE_KEY'
|
||||
),
|
||||
string(
|
||||
defaultValue: '6000',
|
||||
description: 'Number of positions to be saved',
|
||||
name: 'CUTOFF',
|
||||
trim: false
|
||||
)
|
||||
])
|
||||
])
|
||||
}
|
||||
def dockerImage = docker.build("lukkoz2")
|
||||
|
||||
stage('checkout: Check out from version control') {
|
||||
checkout([$class: 'GitSCM',
|
||||
branches: [[name: '*/master']],
|
||||
extensions: [],
|
||||
userRemoteConfigs: [[credentialsId: 's425850', url: 'https://git.wmi.amu.edu.pl/s425850/ium_425850']]])
|
||||
}
|
||||
dockerImage.inside {
|
||||
stage('Preparation') {
|
||||
properties([
|
||||
parameters([
|
||||
string(
|
||||
defaultValue: 'lukkoz2',
|
||||
description: 'Kaggle username',
|
||||
name: 'KAGGLE_USERNAME',
|
||||
trim: false
|
||||
),
|
||||
password(
|
||||
defaultValue: '',
|
||||
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
||||
name: 'KAGGLE_KEY'
|
||||
),
|
||||
string(
|
||||
defaultValue: '6000',
|
||||
description: 'Number of positions to be saved',
|
||||
name: 'CUTOFF',
|
||||
trim: false
|
||||
)
|
||||
])
|
||||
])
|
||||
}
|
||||
|
||||
stage('checkout: Check out from version control') {
|
||||
checkout([$class: 'GitSCM',
|
||||
branches: [[name: '*/master']],
|
||||
extensions: [],
|
||||
userRemoteConfigs: [[credentialsId: 's425850', url: 'https://git.wmi.amu.edu.pl/s425850/ium_425850']]])
|
||||
}
|
||||
|
||||
|
||||
stage('Build') {
|
||||
// Run the maven build
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
||||
sh 'chmod u+x ./get_dataset.sh'
|
||||
sh './get_dataset.sh'
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
// Run the maven build
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
||||
sh 'chmod u+x ./get_dataset.sh'
|
||||
sh './get_dataset.sh'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Cut data') {
|
||||
withEnv(["CUTOFF=${params.CUTOFF}"]) {
|
||||
sh '''head -n $((CUTOFF)) books_edited.csv > books_edited_cut.csv'''}
|
||||
}
|
||||
stage('Cut data') {
|
||||
withEnv(["CUTOFF=${params.CUTOFF}"]) {
|
||||
sh '''head -n $((CUTOFF)) books_edited.csv > books_edited_cut.csv'''}
|
||||
}
|
||||
|
||||
stage('Save data into artifacts') {
|
||||
archiveArtifacts artifacts: 'books_edited.csv', followSymlinks: false
|
||||
stage('Save data into artifacts') {
|
||||
archiveArtifacts artifacts: 'books_edited.csv', followSymlinks: false
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user