fix(hermes): reuse authenticated image checkout
This commit is contained in:
parent
41233f94a9
commit
ad487b5e1c
@ -152,8 +152,6 @@ spec:
|
||||
;;
|
||||
esac
|
||||
test "${#EXPECTED_SOURCE_REVISION}" -eq 40
|
||||
git fetch --no-tags origin main
|
||||
git checkout --detach origin/main
|
||||
actual_revision="$(git rev-parse HEAD)"
|
||||
test "${actual_revision}" = "$(git rev-parse origin/main)"
|
||||
git merge-base --is-ancestor "${EXPECTED_SOURCE_REVISION}" "${actual_revision}"
|
||||
|
||||
@ -152,8 +152,6 @@ spec:
|
||||
;;
|
||||
esac
|
||||
test "${#EXPECTED_SOURCE_REVISION}" -eq 40
|
||||
git fetch --no-tags origin main
|
||||
git checkout --detach origin/main
|
||||
actual_revision="$(git rev-parse HEAD)"
|
||||
test "${actual_revision}" = "$(git rev-parse origin/main)"
|
||||
git merge-base --is-ancestor "${EXPECTED_SOURCE_REVISION}" "${actual_revision}"
|
||||
|
||||
@ -99,6 +99,8 @@ def test_pipeline_requires_reviewed_main_and_runtime_credentials() -> None:
|
||||
assert 'test "${PUBLISH_IMAGE}" = "true"' in source
|
||||
assert 'test "${CONFIRM_PUBLISH}" = "PUBLISH HERMES AGENT"' in source
|
||||
assert "git rev-parse origin/main" in source
|
||||
assert "git fetch --no-tags origin main" not in source
|
||||
assert 'git merge-base --is-ancestor "${EXPECTED_SOURCE_REVISION}"' in source
|
||||
assert "credentialsId: 'harbor-robot'" in source
|
||||
assert "set +x" in source
|
||||
assert "umask 077" in source
|
||||
|
||||
@ -96,6 +96,7 @@ def test_pipeline_builds_latest_main_containing_reviewed_anchor() -> None:
|
||||
source = PIPELINE.read_text(encoding="utf-8")
|
||||
assert 'test "${CONFIRM_PUBLISH}" = "PUBLISH HERMES WEBUI"' in source
|
||||
assert 'test "${actual_revision}" = "$(git rev-parse origin/main)"' in source
|
||||
assert "git fetch --no-tags origin main" not in source
|
||||
assert 'git merge-base --is-ancestor "${EXPECTED_SOURCE_REVISION}"' in source
|
||||
assert "dockerfiles/Dockerfile.hermes-webui" in source
|
||||
assert "ci/scripts/hermes_webui_release.py" in source
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user