From 182cb2507722b390f657631303cc47d035837d0d Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 20:32:06 +0200 Subject: [PATCH] zmienne --- Jenkinsfile | 77 ++++++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0d5cad1..ed8d2c1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,38 +1,41 @@ -pipeline { - agent { dockerfile true } - parameters { - string( - defaultValue: '0', - description: 'Umożliwia zdefiniowanie wielkości odcięcia zbioru danych.', - name: 'CUTOFF', - trim: false - ) - string( - defaultValue: 'rokoch', - 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('checkout') { - steps { - checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]]) - } - } - - stage('docker') { - steps { - sh 'cat /etc/issue' - sh 'ls -l' - sh 'chmod +x skrypt.sh' - sh './skrypt.sh 0' - } - } +node { + stage('One') { + + properties([ + parameters([ + string(defaultValue: '', + description: 'Kaggle username', + name: 'KAGGLE_USERNAME', + trim: false), + password(defaultValue: '', + description: 'Kaggle token', + name: 'KAGGLE_KEY') + ]) + ] + ) + stage('Two') { + + + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { + + + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]]) + + checkout scm + + def image = docker.build("image") + image.inside { + sh 'ls -l' + + + } + + + + + + } + } } -} +} \ No newline at end of file