t
This commit is contained in:
parent
e8348645a9
commit
23a869b2b8
39
Jenkinsfile
vendored
39
Jenkinsfile
vendored
@ -1,5 +1,12 @@
|
||||
node {
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('Preparation') {
|
||||
when { expression { true } }
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
properties([
|
||||
parameters([
|
||||
string(
|
||||
@ -15,9 +22,17 @@ node {
|
||||
)
|
||||
])
|
||||
])
|
||||
} catch (err) {
|
||||
error "Failed to set up parameters: ${err.message}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
// Run the maven build
|
||||
when { expression { params.KAGGLE_USERNAME && params.KAGGLE_KEY } }
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
||||
@ -25,22 +40,40 @@ node {
|
||||
#!/bin/bash
|
||||
pip install kaggle
|
||||
|
||||
kaggle datasets download nitishsharma01/olympics-124-years-datasettill-2020
|
||||
kaggle datasets download -d nitishsharma01/olympics-124-years-datasettill-2020
|
||||
|
||||
unzip -o olympics-124-years-datasettill-2020.zip
|
||||
|
||||
echo "Processed Data" > output.txt
|
||||
'''
|
||||
}
|
||||
} catch (err) {
|
||||
error "Failed to build: ${err.message}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Clone Git Repository') {
|
||||
when { expression { params.KAGGLE_USERNAME && params.KAGGLE_KEY } }
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
git 'https://git.wmi.amu.edu.pl/s487187/ium_487187.git'
|
||||
} catch (err) {
|
||||
error "Failed to clone repository: ${err.message}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('End') {
|
||||
when { expression { params.KAGGLE_USERNAME && params.KAGGLE_KEY } }
|
||||
steps {
|
||||
echo 'Program ended!'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
|
Loading…
Reference in New Issue
Block a user