68 lines
2.2 KiB
Groovy
68 lines
2.2 KiB
Groovy
pipeline {
|
|
agent none
|
|
options { copyArtifactPermission('s434684-evaluation/master') }
|
|
parameters {
|
|
buildSelector(
|
|
defaultSelector: lastSuccessful(),
|
|
description: 'Which build to use for copying artifacts',
|
|
name: 'BUILD_SELECTOR')
|
|
|
|
string(name: 'LEARNING_RATE', defaultValue: '0.0003', description: 'learning rate')
|
|
}
|
|
stages {
|
|
stage('copy files') {
|
|
agent any
|
|
steps {
|
|
sh '''
|
|
cp ./lab5/train/Dockerfile .
|
|
cp ./lab5/train/script.sh .
|
|
cp ./lab5/train/train.py .
|
|
cp ./lab5/train/requirements.txt .
|
|
'''
|
|
}
|
|
}
|
|
stage('docker') {
|
|
agent {
|
|
docker {
|
|
image 'kubakonieczny/ium:train-sacred-v2.0'
|
|
}
|
|
}
|
|
stages {
|
|
stage('copyArtifacts') {
|
|
steps {
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's470607-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
}
|
|
}
|
|
stage('ls') {
|
|
steps {
|
|
sh 'chmod +x script.sh'
|
|
withEnv(["LEARNING_RATE=${params.LEARNING_RATE}"]) {
|
|
sh './script.sh $LEARNING_RATE'
|
|
}
|
|
sh 'ls -lah'
|
|
}
|
|
}
|
|
stage('archive artifact') {
|
|
steps {
|
|
archiveArtifacts 'grid-stability-dense.h5'
|
|
archiveArtifacts 'my_runs/**'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
success {
|
|
build job: 's470607-evaluation/master'
|
|
mail body: 'SUCCESS',
|
|
subject: 's470607-training',
|
|
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
}
|
|
failure {
|
|
mail body: 'FAILURE',
|
|
subject: 's470607-training',
|
|
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
}
|
|
}
|
|
}
|