Update 'Jenkinsfile'
Some checks failed
gitea-sync/antos-appimage/pipeline/head There was a failure building this commit

This commit is contained in:
dany 2022-09-29 23:18:11 +02:00
parent b77980eebe
commit cb1547669d

29
Jenkinsfile vendored
View File

@ -1,7 +1,16 @@
// need to approve all static functions in Dashboard > Manage Jenkins > ScriptApproval
def parallelStagesMap = jenkins.model.Jenkins.instance.getItemByFullName('gitea-sync/antos').getAllJobs().collectEntries {
["${it}" : generateStage(it.getName())]
def ArrayList<String> copyArtifactsByBranches(projectName){
def jobs = jenkins.model.Jenkins.instance.getItemByFullName('gitea-sync/antos').getAllJobs();
Iterator<?> iterator = jobs.iterator();
def arr = new ArrayList<String>();
while (iterator.hasNext()) {
def job = iterator.next();
arr.add(job.getName());
}
return arr;
}
def generateStage(name) {
return {
stage("stage: ANTOS ${name}") {
@ -10,18 +19,8 @@ def generateStage(name) {
}
}
def copyArtifactsByBranches(projectName){
def jobs = jenkins.model.Jenkins.instance.getItemByFullName('gitea-sync/antos').getAllJobs();
Iterator<?> iterator = jobs.iterator();
while (iterator.hasNext()) {
def job = iterator.next();
step([$class: 'CopyArtifact',
projectName: 'gitea-sync/antos/' + job.getName(),
target: 'build/frontend/' + job.getName()
]);
//copyArtifacts(projectName: 'gitea-sync/antos/' + job.getName(), target: 'build/frontend/' + job.getName());
}
return null;
def parallelStagesMap = jenkins.model.Jenkins.instance.getItemByFullName('gitea-sync/antos').getAllJobs().collectEntries {
["${it}" : generateStage(it)]
}
@ -61,7 +60,7 @@ pipeline{
copyArtifacts(projectName: 'luasec', target: 'build/backend');
script
{
parallel(parallelStagesMap);
parallel parallelStagesMap;
}
//copyArtifacts(projectName: 'gitea-sync/antos/*', target: 'build/frontend');
//copyArtifacts(projectName: 'gitea-sync/antd-web-apps/master', target: 'build/backend');