Skip to content

Commit

Permalink
Adding support for Auto Releases with a previously created track
Browse files Browse the repository at this point in the history
Change-Id: Ib3bf5a5eddd436a029bf4a5375a67f172f043495
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34218
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
e-liner authored and dcrowell77 committed Feb 3, 2017
1 parent b90b803 commit 989c9e4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/build/citest/auto-release
Expand Up @@ -62,7 +62,7 @@ function build {
### Push tag to gerrit, create track and checkin files
git push ssh://hostboot-us@gerrit-server/hostboot $RELEASE_NAME || exit -1
git checkout gerrit/master || exit -1
hbRelease pre-release --level $RELEASE_NAME --release $FIPS_RELEASE --checkInDir $CMVC_DIR --released $PREVIOUS_RELEASE|| exit -1
hbRelease pre-release --level $RELEASE_NAME --release $FIPS_RELEASE --checkInDir $CMVC_DIR --released $PREVIOUS_RELEASE --track $EXISTING_TRACK || exit -1
# Check if feature was successfully created and if so set $FEATURE
if [ -f $CMVC_FEATURE_FILE ]; then
FEATURE=`cat $CMVC_FEATURE_FILE`;
Expand Down
34 changes: 22 additions & 12 deletions src/build/tools/hbRelease
Expand Up @@ -413,11 +413,13 @@ sub execute_pre_release
my $level = "";
my $checkInDir = "";
my $released = "";
my $track = "";

GetOptions("release:s" => \$release);
GetOptions("level:s" => \$level);
GetOptions("checkInDir:s" => \$checkInDir);
GetOptions("released:s" => \$released);
GetOptions("track:s" => \$track);

die "Missing release" if ($release eq "");
die "Missing level" if ($level eq "");
Expand All @@ -430,21 +432,29 @@ sub execute_pre_release
$CMVC_FILES .= "src/hbfw/img/hostboot_securerom.bin ";
}

# CMVC open feature
my $open_feature = "Feature -open -component $globals{component}";
$open_feature .= " -remarks \"Hostboot Release - $level\" -verbose";
# Get the Feature number from the output, should be the only numbers.
my $feature = run_system_command($open_feature);
$feature =~ s/[^0-9]//g;

# CMVC assign feature
run_system_command("Feature -assign $feature -owner $globals{cmvcUser} -verbose");
if($track eq "")
{
# CMVC open feature
my $open_feature = "Feature -open -component $globals{component}";
$open_feature .= " -remarks \"Hostboot Release - $level\" -verbose";
# Get the Feature number from the output, should be the only numbers.
my $feature = run_system_command($open_feature);
$feature =~ s/[^0-9]//g;

# CMVC assign feature
run_system_command("Feature -assign $feature -owner $globals{cmvcUser} -verbose");

# CMVC accept feature
run_system_command("Feature -accept $feature -verbose");
# CMVC accept feature
run_system_command("Feature -accept $feature -verbose");

# CMVC create track
run_system_command("Track -create -release $release -feature $feature -verbose");
# CMVC create track
run_system_command("Track -create -release $release -feature $feature -verbose");
}
else
{
$feature = $track;
}

# Add in cmvc coReqs and cmvc preReqs
execute_cmvc_reqs($feature,$level,$released,$release);
Expand Down

0 comments on commit 989c9e4

Please sign in to comment.