diff --git a/Jenkinsfile b/Jenkinsfile index f607d5c..0330be5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,20 +43,33 @@ pipeline { git branch: 'master', url: 'https://git.wmi.amu.edu.pl/s487175/ium_z487175.git' } } - stage('Shell script') { + stage('Download from kaggle') { steps { sh 'kaggle datasets download -d shivam2503/diamonds > output.txt' sh 'unzip -o diamonds.zip >> output.txt' // przypisanie uprawnień sh 'chmod +x s487175-create-dataset-script.py' - // wywołanie skryptu z poprzednich zajęć - sh 'python3 ./s487175-create-dataset-script.py >> output.txt' + } + } + stage('Build image') { + steps { + sh 'docker build -t ium -f dockerfile .' + } + } + stage('Run command in container') { + steps { + script { + // Uruchamia instancje obrazu ium + sh 'docker run -d -v ${env.WORKSPACE}/artifacts:/app/artifacts ium' + // Uruchomienie skryptu w kontenerze + sh 'docker exec -i ium python3 ./s487175-create-dataset-script.py' + } } } stage('Archive file') { steps { archiveArtifacts artifacts: 'output.txt, diamonds.csv', fingerprint: true - } + } } } } \ No newline at end of file