Skip to content

Commit

Permalink
Merge pull request #815 from jedevc/e2e-distribution-fixup
Browse files Browse the repository at this point in the history
fixup! e2e: add distribution tests
  • Loading branch information
jedevc committed Feb 22, 2023
2 parents d104333 + 4858a31 commit a3ae207
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/e2e/distribution/install.sh
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
set -eu

: "${DISTRIBUTION_VERSION:=registry:2}"
: "${DISTRIBUTION_VERSION:=2}"
: "${DISTRIBUTION_HOST:=localhost}"
: "${DISTRIBUTION_PORT:=8080}"

echo "::group::Starting ${DISTRIBUTION_VERSION}}"
echo "::group::Starting registry:${DISTRIBUTION_VERSION}"
(
set -x
docker run -d --name registry -p "5000:${DISTRIBUTION_PORT}" "${DISTRIBUTION_VERSION}"
docker run -d --name registry -p "${DISTRIBUTION_PORT}:5000" "registry:${DISTRIBUTION_VERSION}"
)
echo "::endgroup::"
3 changes: 2 additions & 1 deletion .github/workflows/e2e.yml
Expand Up @@ -27,6 +27,7 @@ env:
BUILDKIT_IMAGE: moby/buildkit:buildx-stable-1
HARBOR_VERSION: v2.7.0
NEXUS_VERSION: 3.47.1
DISTRIBUTION_VERSION: 2.8.1

jobs:
build:
Expand Down Expand Up @@ -173,7 +174,7 @@ jobs:
network=host
-
name: Login to Registry
if: github.event_name != 'pull_request' && env.REGISTRY_USER != ''
if: github.event_name != 'pull_request' && (env.REGISTRY_USER || matrix.username_secret) != ''
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY_FQDN || matrix.registry }}
Expand Down

0 comments on commit a3ae207

Please sign in to comment.