always ignore submodule templates and check out a fresh copy of HTLLE-DA-Vorlage
This commit is contained in:
parent
ed3c301872
commit
aed5337dc4
35
Jenkinsfile
vendored
35
Jenkinsfile
vendored
@ -25,8 +25,9 @@ pipeline {
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Set some variables'){
|
||||
stage('Set some variables and clean workspace'){
|
||||
steps{
|
||||
cleanWs()
|
||||
script {
|
||||
// set template values
|
||||
env.TEMPLATE_URL = 'https://itsp.htl-leoben.at/git/Hg/HTLLE-DA-Vorlage.git'
|
||||
@ -54,8 +55,10 @@ pipeline {
|
||||
}
|
||||
}
|
||||
stage('Checkout DA') {
|
||||
when {
|
||||
expression { env.TEMPLATE_URL != env.REPOSITORY }
|
||||
}
|
||||
steps {
|
||||
cleanWs()
|
||||
// checkout out the repository including submodules
|
||||
// builduser acc used in git
|
||||
checkout([
|
||||
@ -64,10 +67,10 @@ pipeline {
|
||||
doGenerateSubmoduleConfigurations: false,
|
||||
extensions: [[
|
||||
$class: 'SubmoduleOption',
|
||||
disableSubmodules: false,
|
||||
disableSubmodules: true,
|
||||
parentCredentials: true,
|
||||
recursiveSubmodules: true,
|
||||
shallow: false,
|
||||
recursiveSubmodules: false,
|
||||
shallow: true,
|
||||
reference: '',
|
||||
trackingSubmodules: false
|
||||
]],
|
||||
@ -79,6 +82,26 @@ pipeline {
|
||||
])
|
||||
}
|
||||
}
|
||||
stage('Checkout template') {
|
||||
steps {
|
||||
// remove template folder and fresh checkout
|
||||
sh "rm -rf ${env.TEMPLATE_NAME}"
|
||||
checkout([
|
||||
$class: 'GitSCM',
|
||||
branches: [[name: '*/master']],
|
||||
doGenerateSubmoduleConfigurations: false,
|
||||
extensions: [[
|
||||
$class: 'RelativeTargetDirectory',
|
||||
relativeTargetDir: "${env.GIT_PATH}${env.TEMPLATE_NAME}"
|
||||
]],
|
||||
submoduleCfg: [],
|
||||
userRemoteConfigs: [[
|
||||
credentialsId: 'd65d903b-21ee-4055-98aa-ef82a903e287',
|
||||
url: "${env.TEMPLATE_URL}"
|
||||
]]
|
||||
])
|
||||
}
|
||||
}
|
||||
stage('Build DA') {
|
||||
when {
|
||||
expression { env.TEMPLATE_URL != env.REPOSITORY }
|
||||
@ -96,8 +119,6 @@ pipeline {
|
||||
steps {
|
||||
// build the template with the examples from DA point of view
|
||||
sh """#!/bin/bash
|
||||
mkdir ${env.TEMPLATE_NAME}
|
||||
ls | grep -v ${env.TEMPLATE_NAME} | xargs mv -t ${env.TEMPLATE_NAME}
|
||||
cp -rv ${env.TEMPLATE_NAME}/example/. .
|
||||
make pdf -C ${env.TEMPLATE_NAME} SOURCEDIR=`pwd`
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user