From af7537dc3e48722a6f45c3fed8a2be6a340d156b Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 10 Feb 2023 06:15:35 +0100 Subject: [PATCH] e2e: local nexus Signed-off-by: CrazyMax --- .github/e2e/nexus/docker-compose.yml | 8 +++ .github/e2e/nexus/env | 9 +++ .github/e2e/nexus/install.sh | 93 ++++++++++++++++++++++++++++ .github/workflows/e2e.yml | 5 ++ 4 files changed, 115 insertions(+) create mode 100644 .github/e2e/nexus/docker-compose.yml create mode 100644 .github/e2e/nexus/env create mode 100755 .github/e2e/nexus/install.sh diff --git a/.github/e2e/nexus/docker-compose.yml b/.github/e2e/nexus/docker-compose.yml new file mode 100644 index 0000000..0b5c965 --- /dev/null +++ b/.github/e2e/nexus/docker-compose.yml @@ -0,0 +1,8 @@ +services: + nexus: + image: sonatype/nexus3:${NEXUS_VERSION:-latest} + volumes: + - "./data:/nexus-data" + ports: + - "8081:8081" + - "8082:8082" diff --git a/.github/e2e/nexus/env b/.github/e2e/nexus/env new file mode 100644 index 0000000..798d957 --- /dev/null +++ b/.github/e2e/nexus/env @@ -0,0 +1,9 @@ +REGISTRY_FQDN=localhost:8082 +REGISTRY_USER=admin +REGISTRY_PASSWORD=Nexus12345 +REGISTRY_SLUG=localhost:8082/test-docker-action + +NEXUS_HOST=localhost +NEXUS_PORT=8081 +NEXUS_REGISTRY_PORT=8082 +NEXUS_REPO=test-docker-action diff --git a/.github/e2e/nexus/install.sh b/.github/e2e/nexus/install.sh new file mode 100755 index 0000000..7f4f82d --- /dev/null +++ b/.github/e2e/nexus/install.sh @@ -0,0 +1,93 @@ +#!/usr/bin/env bash +set -eu + +SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) + +: "${NEXUS_VERSION:=3.47.1}" +: "${NEXUS_HOST:=localhost}" +: "${NEXUS_PORT:=8081}" +: "${NEXUS_REGISTRY_PORT:=8082}" +: "${REGISTRY_USER:=admin}" +: "${REGISTRY_PASSWORD:=Nexus12345}" + +: "${NEXUS_REPO:=test-docker-action}" + +createrepo_post_data() { + cat <