categorize jenkins stage

This commit is contained in:
s452111 2020-04-21 21:07:38 +02:00
parent 17f6ffef8d
commit 62506b9399
4 changed files with 27 additions and 11 deletions

34
Jenkinsfile vendored
View File

@ -1,15 +1,31 @@
pipeline { pipeline {
agent { dockerfile true } agent { dockerfile true }
stages { stages {
stage('Hello') { stage('Checkout') {
steps {
checkout([$class: 'GitSCM',
branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
userRemoteConfigs: [[
url: 'https://git.wmi.amu.edu.pl/s452111/s452111-mlworkshops']]])
}
}
stage('Copy Artifacts') {
steps { steps {
echo 'Hello World' copyArtifacts filter: 'wikiniews_results.tsv, fingerprintArtifacts: true,
checkout scm; projectName: 'ASR-eval', selector: lastSuccessful()
copyArtifacts(projectName: 'ASR-eval'); }
sh 'chmod +x ./service.sh'; }
sh './service.sh'; stage('Count words') {
archiveArtifacts artifacts: 'lines_count.txt', fingerprint: true; sh 'chmod +x ./service.sh'
} sh './service.sh wikiniews_results.tsv'
} }
stage('Archive artifacts') {
steps {
archiveArtifacts: 'lines_count.txt', fingerprint: true
}
}
} }
} }

View File

View File

View File

@ -1,2 +1,2 @@
#!/bin/bash #!/bin/bash
wc -l ./new_file > lines_count.txt wc -l wikiniews_results.tsv > lines_count.txt