2024-03-30 11:06:57 +01:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
|
|
|
|
parameters {
|
|
|
|
string(
|
|
|
|
defaultValue: 'jakubbg',
|
|
|
|
description: 'Kaggle username',
|
|
|
|
name: 'KAGGLE_USERNAME',
|
|
|
|
trim: false
|
|
|
|
)
|
|
|
|
password(
|
|
|
|
defaultValue: 'e42b293c818e4ecd7b9365ee037af428',
|
|
|
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
|
|
|
name: 'KAGGLE_KEY'
|
|
|
|
)
|
|
|
|
string(
|
|
|
|
defaultValue: '100',
|
|
|
|
description: 'CUTOFF parameter',
|
|
|
|
name: 'CUTOFF',
|
|
|
|
trim: false
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Build image'){
|
2024-03-30 11:13:58 +01:00
|
|
|
steps{
|
2024-03-30 11:06:57 +01:00
|
|
|
checkout scm
|
|
|
|
//Pierwszy argument to tag, który zostania nadany zbudowanemu obrazowi
|
|
|
|
//Jeśli chcemy użyć Dockerfile z innej ścieżki niż ./Dockerfile, możemy ją podać jako drugi argument
|
|
|
|
def testImage = docker.build("test-image", "./Dockerfile")
|
2024-03-30 11:13:58 +01:00
|
|
|
}
|
2024-03-30 11:06:57 +01:00
|
|
|
}
|
2024-03-30 11:16:59 +01:00
|
|
|
stage('Run in container'){
|
2024-03-30 11:19:43 +01:00
|
|
|
steps{
|
2024-03-30 11:16:59 +01:00
|
|
|
docker.image('test-image').inside {
|
2024-03-30 11:18:44 +01:00
|
|
|
|
2024-03-30 11:06:57 +01:00
|
|
|
}
|
2024-03-30 11:19:43 +01:00
|
|
|
}
|
2024-03-30 11:06:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|