diff --git a/Jenkinsfile b/Jenkinsfile index 39e1dd9..5cb0408 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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" diff --git a/Jenkinsfile2 b/Jenkinsfile2 index 508ade8..5772b14 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -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' + } + } } } \ No newline at end of file diff --git a/bash2.sh b/bash2.sh index b9ce121..eff264e 100644 --- a/bash2.sh +++ b/bash2.sh @@ -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 \ No newline at end of file +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 \ No newline at end of file