From d82908a22a761d22a9c442280868067c45e96e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20K=C3=B6hler?= <lukas.koehler@h-da.de> Date: Mon, 27 Aug 2018 22:25:19 +0200 Subject: [PATCH] pipeline testing --- .../PAD2 Repetitorium/Praktikum 1/jenkinsfile.groovy | 9 +++++++-- .../PAD2 Repetitorium/Praktikum 2/jenkinsfile.groovy | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/pipelines/PAD2 Repetitorium/Praktikum 1/jenkinsfile.groovy b/pipelines/PAD2 Repetitorium/Praktikum 1/jenkinsfile.groovy index f2d1beb..a35fa07 100644 --- a/pipelines/PAD2 Repetitorium/Praktikum 1/jenkinsfile.groovy +++ b/pipelines/PAD2 Repetitorium/Praktikum 1/jenkinsfile.groovy @@ -4,8 +4,13 @@ node { ''' chmod -Rf 777 ./ rm -rf * - ls -la - cp -r "\$(find \$folder -maxdepth 1 -type d -not -path \$folder/__pycache__ -not -path \$folder)"/* ./ + echo $folder + export TARGET=\$(find \$folder -maxdepth 1 -type d -not -path \$folder/__pycache__ -not -path \$folder) + echo $TARGET + if [ -z "$TARGET" ]; then + exit 1 + fi + cp -r $TARGET/* ./ rm -rf \$folder ''' ) diff --git a/pipelines/PAD2 Repetitorium/Praktikum 2/jenkinsfile.groovy b/pipelines/PAD2 Repetitorium/Praktikum 2/jenkinsfile.groovy index fd11ecb..21321fe 100644 --- a/pipelines/PAD2 Repetitorium/Praktikum 2/jenkinsfile.groovy +++ b/pipelines/PAD2 Repetitorium/Praktikum 2/jenkinsfile.groovy @@ -4,8 +4,13 @@ node { ''' chmod -Rf 777 ./ rm -rf * - ls -la - cp -r "\$(find \$folder -maxdepth 1 -type d -not -path \$folder/__pycache__ -not -path \$folder)"/* ./ + echo $folder + export TARGET=\$(find \$folder -maxdepth 1 -type d -not -path \$folder/__pycache__ -not -path \$folder) + echo $TARGET + if [ -z "$TARGET" ]; then + exit 1 + fi + cp -r $TARGET/* ./ rm -rf \$folder ''' ) -- GitLab