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 { node {
stage('One') { stage('One') {
properties([ properties([
parameters([ parameters([
string(defaultValue: '', string(defaultValue: '',
@ -21,16 +20,11 @@ node {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}" ]) { "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']]]) 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 "chmod 777 ./bash.sh"
sh "./bash.sh" sh "./bash.sh"
archiveArtifacts "courses.data.dev" archiveArtifacts "courses.data.dev"
archiveArtifacts "courses.data.test" archiveArtifacts "courses.data.test"
archiveArtifacts "courses.data.train" archiveArtifacts "courses.data.train"

View File

@ -1,17 +1,22 @@
pipeline { pipeline {
agent any agent any
parameters {
buildSelector(defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR')
}
stages { stages {
stage("One"){ stage('checkout') {
steps { steps {
git 'https://git.wmi.amu.edu.pl/s440058/ium_440058.git'
copyArtifacts fingerprintArtifacts: true, projectName: 's440058-create-dataset', selector: buildParameter('BUILD_SELECTOR') copyArtifacts fingerprintArtifacts: true, projectName: 's440058-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
sh "chmod 777 ./bash2.sh" }
sh "./bash2.sh" stage('sh: Shell Script') {
steps {
archiveArtifacts "courses.txt" 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.dev >> courses1.txt
wc -l courses.data.test > courses.txt wc -l courses.data.test >> courses1.txt
wc -l courses.data.train > courses.txt wc -l courses.data.train >> courses1.txt
cat courses1.txt > courses.txt