add both jenkins
This commit is contained in:
parent
cbd468dc8d
commit
a7f8eb2c29
@ -1,56 +0,0 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
parameters {
|
||||
string(
|
||||
defaultValue: 'karol9',
|
||||
description: 'Kaggle username',
|
||||
name: 'KAGGLE_USERNAME',
|
||||
trim: false
|
||||
)
|
||||
string(
|
||||
defaultValue: '100',
|
||||
description: 'Dataset cutoff size',
|
||||
name: 'CUTOFF'
|
||||
)
|
||||
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('Download Dataset') {
|
||||
steps {
|
||||
script {
|
||||
def datasetDir = 'football-semantic-segmentation'
|
||||
if (!fileExists(datasetDir)) {
|
||||
sh "mkdir ${datasetDir}"
|
||||
}
|
||||
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
||||
sh "kaggle datasets download sadhliroomyprime/football-semantic-segmentation -p ${datasetDir}"
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
archiveArtifacts artifacts: 'football-semantic-segmentation/**', onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
git branch: 'main', url: 'https://git.wmi.amu.edu.pl/s495715/iumKC.git'
|
||||
}
|
||||
}
|
||||
stage('Stats in docker') {
|
||||
steps {
|
||||
git branch: 'main', url: 'https://git.wmi.amu.edu.pl/s495715/iumKC.git'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
40
JenkinsDatastatsDockerfile
Normal file
40
JenkinsDatastatsDockerfile
Normal file
@ -0,0 +1,40 @@
|
||||
pipeline {
|
||||
agent {
|
||||
dockerfile true
|
||||
}
|
||||
|
||||
parameters {
|
||||
string(
|
||||
defaultValue: 'karol9',
|
||||
description: 'Kaggle username',
|
||||
name: 'KAGGLE_USERNAME',
|
||||
trim: false
|
||||
)
|
||||
string(
|
||||
defaultValue: '100',
|
||||
description: 'Dataset cutoff size',
|
||||
name: 'CUTOFF'
|
||||
)
|
||||
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 {
|
||||
git branch: 'main', url: 'https://git.wmi.amu.edu.pl/s495715/iumKC.git'
|
||||
}
|
||||
}
|
||||
stage('Stats in docker') {
|
||||
steps {
|
||||
// run python3 main.py inside docker created from dockerfile in iumKC directory
|
||||
sh "docker build -t iumkc ."
|
||||
sh "docker run -v $(pwd):/app iumkc python3 main.py"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
40
JenkinsDatastatsDockerhub
Normal file
40
JenkinsDatastatsDockerhub
Normal file
@ -0,0 +1,40 @@
|
||||
pipeline {
|
||||
agent {
|
||||
docker {
|
||||
image 'karolcyganik/ium'
|
||||
}
|
||||
}
|
||||
|
||||
parameters {
|
||||
string(
|
||||
defaultValue: 'karol9',
|
||||
description: 'Kaggle username',
|
||||
name: 'KAGGLE_USERNAME',
|
||||
trim: false
|
||||
)
|
||||
string(
|
||||
defaultValue: '100',
|
||||
description: 'Dataset cutoff size',
|
||||
name: 'CUTOFF'
|
||||
)
|
||||
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 {
|
||||
git branch: 'main', url: 'https://git.wmi.amu.edu.pl/s495715/iumKC.git'
|
||||
}
|
||||
}
|
||||
stage('Stats in docker') {
|
||||
steps {
|
||||
// run python3 main.py inside docker created from karolcyganik/ium image
|
||||
sh "docker run -v $(pwd):/app karolcyganik/ium python3 main.py"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user