Update 'Jenkinsfile'
Some checks failed
gitea-sync/antos-appimage/pipeline/head There was a failure building this commit
Some checks failed
gitea-sync/antos-appimage/pipeline/head There was a failure building this commit
This commit is contained in:
parent
b77980eebe
commit
cb1547669d
29
Jenkinsfile
vendored
29
Jenkinsfile
vendored
@ -1,7 +1,16 @@
|
|||||||
// need to approve all static functions in Dashboard > Manage Jenkins > ScriptApproval
|
// need to approve all static functions in Dashboard > Manage Jenkins > ScriptApproval
|
||||||
def parallelStagesMap = jenkins.model.Jenkins.instance.getItemByFullName('gitea-sync/antos').getAllJobs().collectEntries {
|
def ArrayList<String> copyArtifactsByBranches(projectName){
|
||||||
["${it}" : generateStage(it.getName())]
|
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) {
|
def generateStage(name) {
|
||||||
return {
|
return {
|
||||||
stage("stage: ANTOS ${name}") {
|
stage("stage: ANTOS ${name}") {
|
||||||
@ -10,18 +19,8 @@ def generateStage(name) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def copyArtifactsByBranches(projectName){
|
def parallelStagesMap = jenkins.model.Jenkins.instance.getItemByFullName('gitea-sync/antos').getAllJobs().collectEntries {
|
||||||
def jobs = jenkins.model.Jenkins.instance.getItemByFullName('gitea-sync/antos').getAllJobs();
|
["${it}" : generateStage(it)]
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -61,7 +60,7 @@ pipeline{
|
|||||||
copyArtifacts(projectName: 'luasec', target: 'build/backend');
|
copyArtifacts(projectName: 'luasec', target: 'build/backend');
|
||||||
script
|
script
|
||||||
{
|
{
|
||||||
parallel(parallelStagesMap);
|
parallel parallelStagesMap;
|
||||||
}
|
}
|
||||||
//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');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user