Update 'Jenkinsfile'
All checks were successful
gitea-sync/antos-appimage/pipeline/head This commit looks good

This commit is contained in:
dany 2022-09-29 22:40:38 +02:00
parent 3f8b1f8580
commit b512b3a70d

15
Jenkinsfile vendored
View File

@ -1,5 +1,12 @@
// need to approve all static functions in Dashboard > Manage Jenkins > ScriptApproval // need to approve all static functions in Dashboard > Manage Jenkins > ScriptApproval
@NonCPS
def copyArtifactsByBranches(projectName){
jenkins.model.Jenkins.instance.getItemByFullName('gitea-sync/antos').getAllJobs().each { job ->
String name = job.getName();
copyArtifacts(projectName: 'gitea-sync/antos/' + name, target: 'build/frontend/');
echo name;
}
}
pipeline{ pipeline{
agent { node{ label'workstation' }} agent { node{ label'workstation' }}
options { options {
@ -36,11 +43,7 @@ pipeline{
copyArtifacts(projectName: 'luasec', target: 'build/backend'); copyArtifacts(projectName: 'luasec', target: 'build/backend');
script script
{ {
jenkins.model.Jenkins.instance.getItemByFullName('gitea-sync/antos').getAllJobs().each { job -> copyArtifactsByBranches("gitea-sync/antos");
String name = job.getName();
copyArtifacts(projectName: 'gitea-sync/antos/' + name, target: 'build/frontend/');
echo name;
}
} }
//copyArtifacts(projectName: 'gitea-sync/antos/*', target: 'build/frontend'); //copyArtifacts(projectName: 'gitea-sync/antos/*', target: 'build/frontend');
//copyArtifacts(projectName: 'gitea-sync/antd-web-apps/master', target: 'build/backend'); //copyArtifacts(projectName: 'gitea-sync/antd-web-apps/master', target: 'build/backend');