pipeline { agent any //Definijuemy parametry, które będzie można podać podczas wywoływania zadania parameters{ string( defaultValue: 'patrykgaka', description: 'Kaggle username', name: 'KAGGLE_USERNAME', trim: false ) password( defaultValue: 'd14370cec1714b0cd1ef2875038b5950', description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', name: 'KAGGLE_KEY' ) string( defaultValue: '0', description: 'CUTOFF', name: 'CUTOFF', trim: false ) } stages { stage('clear_all') { steps { //Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!) sh 'rm -rf ium_z434686' sh 'rm -rf Video_Games_Sales_as_at_22_Dec_2016.csv' sh 'rm -rf video-game-sales-with-ratings.zip' } } stage('checkout') { steps { //Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!) sh 'git clone https://git.wmi.amu.edu.pl/s434686/ium_z434686' } } stage('Build') { steps { // Run the maven build withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { sh 'kaggle datasets download -d rush4ratio/video-game-sales-with-ratings' sh 'unzip video-game-sales-with-ratings.zip' sh 'rm video-game-sales-with-ratings.zip' sh 'ls -a | tee dataset.csv' } } } stage('Docker') { agent { dockerfile { 'filename' 'create.dockerfile' } } steps { echo 'building docker' } } stage('Goodbye!') { steps { echo 'Goodbye!' //Zarchiwizuj wynik archiveArtifacts 'output.txt' archiveArtifacts 'dataset.csv' } } } }