Skip to content

Commit

Permalink
Handle ign- prefix in release.py calls (#1105)
Browse files Browse the repository at this point in the history
* Handle ign- prefix in release.py calls
* Use gz- prefix for -source jobs
* Create test to be sure that release is calling the right jobs

---------
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero authored Jan 10, 2024
1 parent 7dabc85 commit 7250033
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
22 changes: 22 additions & 0 deletions check_releasepy.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ exec_releasepy_test()
gz-foo 1.2.3 token ${test_params}""
}

exec_ignition_releasepy_test()
{
test_params=${1}

./release.py \
--dry-run \
--no-sanity-checks \
ign-foo 1.2.3 token ${test_params}""
}

expect_job_run()
{
output="${1}" job="${2}"
Expand Down Expand Up @@ -81,3 +91,15 @@ expect_job_not_run "${bump_linux_test}" "generic-release-homebrew_pull_request_u
expect_job_not_run "${bump_linux_test}" "gz-foo-source"
expect_number_of_jobs "${bump_linux_test}" "6"
expect_param "${bump_linux_test}" "RELEASE_VERSION=2"

ignition_test=$(exec_ignition_releasepy_test "--source-repo-uri https://github.org/gazebosim/gz-foo")
expect_job_run "${ignition_test}" "gz-foo-source"
expect_job_not_run "${ignition_test}" "ignition-foo-source"
expect_number_of_jobs "${ignition_test}" "1"

ignition_source_tarball_uri_test=$(exec_ignition_releasepy_test "--source-tarball-uri https://gazebosim/gz-foo-1.2.3.tar.gz")
expect_job_run "${ignition_source_tarball_uri_test}" "ignition-foo-debbuilder"
expect_job_run "${ignition_source_tarball_uri_test}" "generic-release-homebrew_pull_request_updater"
expect_job_not_run "${ignition_source_tarball_uri_test}" "ignition-foo-source"
expect_number_of_jobs "${ignition_source_tarball_uri_test}" "7"
expect_param "${ignition_source_tarball_uri_test}" "SOURCE_TARBALL_URI=https%3A%2F%2Fgazebosim%2Fgz-foo-1.2.3.tar.gz"
6 changes: 5 additions & 1 deletion release.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ def parse_args(argv):
args.package = args.package.replace('ign-', 'gz-')

args.package_alias = args.package
if args.package.startswith('ign-'):
args.package_alias = args.package.replace('ign-', 'ignition-')

DRY_RUN = args.dry_run
if args.upload_to_repository == 'nightly':
Expand Down Expand Up @@ -521,6 +523,8 @@ def go(argv):
if not args.release_version:
args.release_version = 1

package_alias_force_gz = args.package_alias.replace('ignition-','gz-')

print(f"Downloading releasing info for {args.package}")
# Sanity checks and dicover supported distributions before proceed.
repo_dir, args.release_repo_branch = download_release_repository(args.package, args.release_repo_branch)
Expand Down Expand Up @@ -632,7 +636,7 @@ def go(argv):
params['SOURCE_REPO_REF'] = tag_repo(args) \
if not args.source_repo_ref else args.source_repo_ref

call_jenkins_build(f"{args.package_alias}-source",
call_jenkins_build(f'{package_alias_force_gz}-source',
params,
'Source',
args.version)
Expand Down

0 comments on commit 7250033

Please sign in to comment.