fix pipeline2

This commit is contained in:
piotr6789 2021-03-28 22:16:50 +02:00
parent 632d4019fc
commit 293cbe48a6
3 changed files with 19 additions and 18 deletions

6
Jenkinsfile vendored
View File

@ -1,6 +1,5 @@
node {
stage('One') {
properties([
parameters([
string(defaultValue: '',
@ -21,16 +20,11 @@ node {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}" ]) {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s440058/ium_440058']]])
sh "chmod 777 ./bash.sh"
sh "./bash.sh"
archiveArtifacts "courses.data.dev"
archiveArtifacts "courses.data.test"
archiveArtifacts "courses.data.train"

View File

@ -1,18 +1,23 @@
pipeline {
agent any
parameters {
buildSelector(defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR')
}
stages {
stage("One"){
stage('checkout') {
steps {
git 'https://git.wmi.amu.edu.pl/s440058/ium_440058.git'
copyArtifacts fingerprintArtifacts: true, projectName: 's440058-create-dataset', selector: buildParameter('BUILD_SELECTOR')
sh "chmod 777 ./bash2.sh"
sh "./bash2.sh"
archiveArtifacts "courses.txt"
}
}
stage('sh: Shell Script') {
steps {
sh 'chmod +x ./bash2.sh'
sh './bash2.sh'
}
}
stage('archiveArtifacts') {
steps {
archiveArtifacts 'courses.txt'
}
}
}
}

View File

@ -1,3 +1,5 @@
wc -l courses.data.dev > courses.txt
wc -l courses.data.test > courses.txt
wc -l courses.data.train > courses.txt
wc -l courses.data.dev >> courses1.txt
wc -l courses.data.test >> courses1.txt
wc -l courses.data.train >> courses1.txt
cat courses1.txt > courses.txt