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{
|
||||
stage('checkout: Check out from version control'){
|
||||
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{
|
||||
./script.sh
|
||||
script{
|
||||
def img = docker.build('jpogodzinski/ium:1')
|
||||
img.inside{
|
||||
sh './script.sh'
|
||||
}
|
||||
}
|
||||
stage('Archive artifacts'){
|
||||
|
||||
}
|
||||
}
|
||||
stage('end'){
|
||||
steps{
|
||||
archiveArtifacts 'test.csv'
|
||||
archiveArtifacts 'dev.csv'
|
||||
|
@ -1,23 +1,24 @@
|
||||
pipeline{
|
||||
pipeline{
|
||||
agent any
|
||||
properties([parameters([
|
||||
parameters{
|
||||
buildSelector(
|
||||
defaultSelector: lastSuccessful(),
|
||||
description: 'Which build to use for copying artifacts',
|
||||
name: 'BUILD_SELECTOR')
|
||||
])])
|
||||
}
|
||||
stages{
|
||||
stage('checkout: Check out from version control'){
|
||||
steps{
|
||||
git credentialsId: 'b4ba8ec9-8fc6-4f68-bf24-695634cec73e', url: 'https://git.wmi.amu.edu.pl/s437622/ium_s437622.git'
|
||||
stage('Copy artifacts'){
|
||||
copyArtifacts filter: 'dev.csv, train.csv, test.csv', fingerprintArtifacts: false, projectName: 's437622-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
||||
}
|
||||
}
|
||||
stage('copy artifacts'){
|
||||
copyArtifacts filter: 'dev.csv, train.csv, test.csv', fingerprintArtifacts: true, projectName: 's437622-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
||||
}
|
||||
stage('sh: Shell Script'){
|
||||
steps{
|
||||
./stats.sh
|
||||
stage('Docker') {
|
||||
steps {
|
||||
script {
|
||||
docker.image("jpogodzinski/ium:1").inside {
|
||||
sh 'rm -rf ium_s437622'
|
||||
sh 'git clone https://git.wmi.amu.edu.pl/s437622/ium_s437622.git'
|
||||
sh "chmod +x ium_s437622/stats.sh"
|
||||
sh "ium_437622/stats.sh"
|
||||
}}
|
||||
}
|
||||
}
|
||||
stage('Archive artifacts'){
|
||||
@ -26,4 +27,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
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
|
||||
head -n 2006 chess.csv.shuf > test.csv
|
||||
head -n 4012 chess.csv.shuf | tail -n 2006 > dev.csv
|
||||
|
Loading…
Reference in New Issue
Block a user