From d02ebda808d0f637f416cb79bb2139c9dea5e1ba Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Fri, 6 May 2022 20:16:15 +0200 Subject: [PATCH] Cleanup Jenkinsfiles --- Jenkinsfile | 38 ------------------------- Jenkinsfile-docker => Jenkinsfile-build | 0 Jenkinsfile-stats | 14 ++++----- Jenkinsfile-stats-docker | 14 --------- 4 files changed, 6 insertions(+), 60 deletions(-) delete mode 100644 Jenkinsfile rename Jenkinsfile-docker => Jenkinsfile-build (100%) delete mode 100644 Jenkinsfile-stats-docker diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 2d129ab..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,38 +0,0 @@ -pipeline { - agent any - 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' - ) - } - stages { - stage('Install dependencies') { - steps { - sh "pip install --user -r requirements.txt" - } - } - stage('Fetch and split dataset') { - steps { - withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", - "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { - sh "chmod u+x ./download_dataset.sh" - sh "./download_dataset.sh" - } - } - } - } - post { - always { - archiveArtifacts artifacts: 'data/*', - onlyIfSuccessful: true - } - } -} diff --git a/Jenkinsfile-docker b/Jenkinsfile-build similarity index 100% rename from Jenkinsfile-docker rename to Jenkinsfile-build diff --git a/Jenkinsfile-stats b/Jenkinsfile-stats index 398c24e..a65d94a 100644 --- a/Jenkinsfile-stats +++ b/Jenkinsfile-stats @@ -1,15 +1,13 @@ pipeline { - agent any - stages { - stage('Get arifacts') { - steps { - copyArtifacts fingerprintArtifacts: true, projectName: 's444409-create-dataset', selector: lastSuccessful() - } + agent { + docker { + image 's444409-create-dataset' } + } + stages { stage('Show stats') { steps { - sh "chmod u+x ./stats.sh" - sh "./stats.sh" + sh "/app/stats.sh" } } } diff --git a/Jenkinsfile-stats-docker b/Jenkinsfile-stats-docker deleted file mode 100644 index a65d94a..0000000 --- a/Jenkinsfile-stats-docker +++ /dev/null @@ -1,14 +0,0 @@ -pipeline { - agent { - docker { - image 's444409-create-dataset' - } - } - stages { - stage('Show stats') { - steps { - sh "/app/stats.sh" - } - } - } -}