Added docker to jenkins
This commit is contained in:
parent
9ee3ef9d6b
commit
efe1e410b6
36
Jenkinsfile-docker
Normal file
36
Jenkinsfile-docker
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
pipeline {
|
||||||
|
parameters {
|
||||||
|
string(
|
||||||
|
defaultValue: 'marcinkostrzewski',
|
||||||
|
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'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
additionalBuildArgs "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Run data stats') {
|
||||||
|
steps {
|
||||||
|
sh "python power_plant_data_stats.py"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
archiveArtifacts artifacts: 'data/*',
|
||||||
|
onlyIfSuccessful: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user