2021-03-27 16:54:42 +01:00
|
|
|
pipeline {
|
2021-04-11 11:04:32 +02:00
|
|
|
agent none
|
2021-03-27 16:54:42 +01:00
|
|
|
stages {
|
2021-04-11 11:04:32 +02:00
|
|
|
stage('copy files') {
|
|
|
|
agent any
|
|
|
|
steps {
|
|
|
|
sh '''
|
2021-04-11 11:16:12 +02:00
|
|
|
cp ./lab3/script.sh .
|
|
|
|
cp ./lab3/python_script.py .
|
2021-04-11 11:04:32 +02:00
|
|
|
cp ./lab3/Dockerfile .
|
|
|
|
cp ./lab3/requirements.txt .
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('docker') {
|
|
|
|
agent {
|
2021-04-24 13:31:02 +02:00
|
|
|
docker {
|
|
|
|
image 'kubakonieczny/ium:v1.0'
|
|
|
|
}
|
2021-04-11 11:04:32 +02:00
|
|
|
}
|
|
|
|
stages {
|
2021-04-11 11:34:57 +02:00
|
|
|
stage('script') {
|
2021-04-11 11:04:32 +02:00
|
|
|
steps {
|
2021-04-11 11:14:06 +02:00
|
|
|
sh '''
|
|
|
|
chmod +x script.sh
|
2021-04-11 13:51:20 +02:00
|
|
|
./script.sh > stats.txt'''
|
2021-04-11 11:04:32 +02:00
|
|
|
}
|
|
|
|
}
|
2021-04-11 11:34:57 +02:00
|
|
|
stage('archive artifact') {
|
2021-04-11 11:04:32 +02:00
|
|
|
steps {
|
2021-04-11 11:34:57 +02:00
|
|
|
archiveArtifacts 'stats.txt'
|
2021-04-11 11:04:32 +02:00
|
|
|
}
|
|
|
|
}
|
2021-03-27 16:54:42 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|