pipeline { agent any //Definijuemy parametry, które będzie można podać podczas wywoływania zadania parameters { string ( defaultValue: 'Hello World!', description: 'Tekst, którym chcesz przywitać świat', name: 'INPUT_TEXT', trim: false ) string( defaultValue: 'wleczny', description: 'Kaggle username', name: 'KAGGLE_USERNAME', trim: false ) password( defaultValue: '2e89e20ceb0a48d9df01a01bad744776', description: 'Kaggle token', name: 'KAGGLE_KEY' ) } stages { stage('Checkout') { steps { sh 'git clone https://git.wmi.amu.edu.pl/s487183/ium_z487183.git' } } stage('Prepare data') { steps { withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { sh 'kaggle datasets download amalab182/property-salesmelbourne-city' sh 'mkdir -p ium_z487183/data' sh 'unzip -o property-salesmelbourne-city.zip -d ium_z487183/data' sh 'rm property-salesmelbourne-city.zip' } } } stage('Archive artifacts') { steps { sh 'python3 ium_z487183/prepare-dataset.py' archiveArtifacts 'X_test.csv' archiveArtifacts 'X_val.csv' archiveArtifacts 'X_train.csv' archiveArtifacts 'Y_test.csv' archiveArtifacts 'Y_val.csv' archiveArtifacts 'Y_train.csv' } } } }