Script Jnkns with volume mapping test
This commit is contained in:
parent
43aa050179
commit
1527bdb1ad
@ -1,26 +1,42 @@
|
||||
pipeline {
|
||||
// pipeline {
|
||||
|
||||
agent {
|
||||
dockerfile {
|
||||
additionalBuildArgs "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} -t s478841-create-dataset"
|
||||
}
|
||||
}
|
||||
// agent {
|
||||
// dockerfile {
|
||||
// additionalBuildArgs "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} -t s478841-create-dataset"
|
||||
// }
|
||||
// }
|
||||
|
||||
stages {
|
||||
stage('Simple data stats') {
|
||||
steps {
|
||||
// stages {
|
||||
// stage('Simple data stats') {
|
||||
// steps {
|
||||
// sh 'chmod u+x ./scripts/data_stats.sh'
|
||||
// sh """
|
||||
// docker run
|
||||
// """
|
||||
// sh './scripts/data_stats.sh'
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// post {
|
||||
// always {
|
||||
// archiveArtifacts artifacts: 'data/*',
|
||||
// onlyIfSuccessful: true
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
node {
|
||||
checkout scm
|
||||
|
||||
def dataImage = docker.build('s478841-image', "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} .")
|
||||
|
||||
dataImage.inside('-v $WORKSPACE:/output -u root') {
|
||||
sh 'chmod u+x ./scripts/data_stats.sh'
|
||||
sh 'ls -al'
|
||||
sh './scripts/data_stats.sh'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
archiveArtifacts artifacts: 'data/*',
|
||||
onlyIfSuccessful: true
|
||||
stage('Archive arifacts') {
|
||||
archiveArtifacts artifacts: 'avocado.data*', followSymlinks: false, onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user