added docker to jenkins files (lab4/zad3)
This commit is contained in:
parent
fa2f7b4d1b
commit
7656ba3dc4
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@ -4,15 +4,22 @@ pipeline{
|
|||||||
stages{
|
stages{
|
||||||
stage('checkout: Check out from version control'){
|
stage('checkout: Check out from version control'){
|
||||||
steps{
|
steps{
|
||||||
git url: 'https://github.com/jfrogdev/project-examples.git'
|
git url: 'https://git.wmi.amu.edu.pl/s437622/ium_s437622.git'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('sh: Shell Script'){
|
stage('docker')
|
||||||
|
{
|
||||||
steps{
|
steps{
|
||||||
./script.sh
|
script{
|
||||||
|
def img = docker.build('jpogodzinski/ium:1')
|
||||||
|
img.inside{
|
||||||
|
sh './script.sh'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Archive artifacts'){
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('end'){
|
||||||
steps{
|
steps{
|
||||||
archiveArtifacts 'test.csv'
|
archiveArtifacts 'test.csv'
|
||||||
archiveArtifacts 'dev.csv'
|
archiveArtifacts 'dev.csv'
|
||||||
|
@ -1,23 +1,24 @@
|
|||||||
pipeline{
|
pipeline{
|
||||||
agent any
|
agent any
|
||||||
properties([parameters([
|
parameters{
|
||||||
buildSelector(
|
buildSelector(
|
||||||
defaultSelector: lastSuccessful(),
|
defaultSelector: lastSuccessful(),
|
||||||
description: 'Which build to use for copying artifacts',
|
description: 'Which build to use for copying artifacts',
|
||||||
name: 'BUILD_SELECTOR')
|
name: 'BUILD_SELECTOR')
|
||||||
])])
|
}
|
||||||
stages{
|
stages{
|
||||||
stage('checkout: Check out from version control'){
|
stage('Copy artifacts'){
|
||||||
|
copyArtifacts filter: 'dev.csv, train.csv, test.csv', fingerprintArtifacts: false, projectName: 's437622-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
||||||
|
}
|
||||||
|
stage('Docker') {
|
||||||
steps {
|
steps {
|
||||||
git credentialsId: 'b4ba8ec9-8fc6-4f68-bf24-695634cec73e', url: 'https://git.wmi.amu.edu.pl/s437622/ium_s437622.git'
|
script {
|
||||||
}
|
docker.image("jpogodzinski/ium:1").inside {
|
||||||
}
|
sh 'rm -rf ium_s437622'
|
||||||
stage('copy artifacts'){
|
sh 'git clone https://git.wmi.amu.edu.pl/s437622/ium_s437622.git'
|
||||||
copyArtifacts filter: 'dev.csv, train.csv, test.csv', fingerprintArtifacts: true, projectName: 's437622-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
sh "chmod +x ium_s437622/stats.sh"
|
||||||
}
|
sh "ium_437622/stats.sh"
|
||||||
stage('sh: Shell Script'){
|
}}
|
||||||
steps{
|
|
||||||
./stats.sh
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Archive artifacts'){
|
stage('Archive artifacts'){
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
curl -OL https://git.wmi.amu.edu.pl/s437622/ium_s437622/src/branch/master/games.csv
|
curl -OL https://git.wmi.amu.edu.pl/s437622/ium_s437622/src/branch/master/games.csv
|
||||||
head -n -1 games.csv | shuf > chess.csv.shuf
|
tail -n +2 games.csv | shuf > chess.csv.shuf
|
||||||
wc -l chess.csv
|
wc -l chess.csv
|
||||||
head -n 2006 chess.csv.shuf > test.csv
|
head -n 2006 chess.csv.shuf > test.csv
|
||||||
head -n 4012 chess.csv.shuf | tail -n 2006 > dev.csv
|
head -n 4012 chess.csv.shuf | tail -n 2006 > dev.csv
|
||||||
|
Loading…
Reference in New Issue
Block a user