Skip to content

Commit

Permalink
[NCLSUP-244] release: only generate script+nvr list if data present
Browse files Browse the repository at this point in the history
  • Loading branch information
thescouser89 committed Jan 21, 2021
1 parent 837d452 commit 032059a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pig/src/main/java/org/jboss/pnc/bacon/pig/Pig.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ boolean isStartingPoint() {
}

/* System.setProperty("java.util.concurrent.ForkJoinPool.common.parallelism", "10"); */
@Command(name = "run", description = "Run all the steps")
@Command(name = "run", description = "Run all the steps, except the release & pre-process-yaml phases")
public static class Run extends PigCommand<PigRunOutput> {

// TODO: it is doable to do this step with build group id only, add this functionality
Expand Down Expand Up @@ -422,7 +422,7 @@ public String doExecute() {
@Command(
name = "release",
description = "Push builds to brew, generate the NVR list, "
+ "close the PNC milestone, generate the upload to candidates script")
+ "close the PNC milestone, generate the upload to candidates script if repository generated")
public static class Release extends PigCommand<PigReleaseOutput> {

@Override
Expand Down
9 changes: 8 additions & 1 deletion pig/src/main/java/org/jboss/pnc/bacon/pig/PigFacade.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,16 @@ public static GroupBuildInfo run(
}

public static PigReleaseOutput release() {
abortIfContextDataAbsent();

abortIfBuildDataAbsentFromContext();
pushToBrew(false);

// if repository data not present, skip generation of nvr list and upload script
if (context().getRepositoryData() == null) {
log.info("Skipping generation of nvr list and upload script since repository has not been generated");
return new PigReleaseOutput("", "", "");
}

generateNvrList();

// generate upload to candidates script
Expand Down

0 comments on commit 032059a

Please sign in to comment.