50 lines
1.5 KiB
Groovy
50 lines
1.5 KiB
Groovy
pipeline {
|
|
agent none
|
|
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/eval.py .
|
|
cp ./lab5/train/requirements.txt .
|
|
'''
|
|
}
|
|
}
|
|
stage('docker') {
|
|
agent { dockerfile true }
|
|
stages {
|
|
stage('copyArtifacts') {
|
|
steps {
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's470607-training', selector: buildParameter('BUILD_SELECTOR')
|
|
}
|
|
}
|
|
stage('ls') {
|
|
steps {
|
|
sh '''
|
|
chmod +x script.sh
|
|
ls -lah
|
|
./script.sh
|
|
ls -lah
|
|
'''
|
|
}
|
|
}
|
|
stage('archive artifact') {
|
|
steps {
|
|
archiveArtifacts 'eval.csv'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|