generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from m00g3n/add-app-gateway-k3d-integration-test
Migrate ACM prow pipelines to GHA
- Loading branch information
Showing
179 changed files
with
11,948 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: run-cra-k3d | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request_target: | ||
branches: [ main ] | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
jobs: | ||
run-cra-k3d: | ||
uses: "./.github/workflows/reusable-k3d-agent-test.yml" | ||
with: | ||
k3d-version: v5.6.0 | ||
secrets: | ||
compass-host: ${{ secrets.COMPASS_HOST }} | ||
compass-client-id: ${{ secrets.COMPASS_CLIENT_ID }} | ||
compass-client-secret: ${{ secrets.COMPASS_CLIENT_SECRET }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Run app-gateway integration tests on k3d | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: azure/setup-helm@v4.1.0 | ||
id: install | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Install k3d | ||
env: | ||
K3D_URL: https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | ||
DEFAULT_K3D_VERSION: v5.4.6 | ||
run: curl --silent --fail $K3D_URL | TAG=$DEFAULT_K3D_VERSION bash | ||
- name: Set up cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
/home/runner/work/application-connector-manager/application-connector-manager/bin | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Run unit tests | ||
run: make -C tests/hack/ci k3d-gateway-tests | ||
- name: Archive test results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: app-gateway-test-results | ||
path: application-gateway-test.log |
39 changes: 39 additions & 0 deletions
39
.github/workflows/kyma-integration-k3d-validator-tests.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Run app-con-validator integration tests on k3d | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: azure/setup-helm@v4.1.0 | ||
id: install | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Install k3d | ||
env: | ||
K3D_URL: https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | ||
DEFAULT_K3D_VERSION: v5.4.6 | ||
run: curl --silent --fail $K3D_URL | TAG=$DEFAULT_K3D_VERSION bash | ||
- name: Insall yq | ||
run: sudo add-apt-repository ppa:rmescandon/yq && sudo apt update && sudo apt install yq -y | ||
- name: Set up cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
/home/runner/work/application-connector-manager/application-connector-manager/bin | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Run unit tests | ||
run: make -C tests/hack/ci k3d-validator-tests | ||
- name: Archive test results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: application-connectivity-validator-test-results | ||
path: application-connectivity-validator-test.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: k3d CRA test | ||
on: | ||
workflow_call: | ||
inputs: | ||
k3d-version: | ||
required: true | ||
type: string | ||
default: v5.6.0 | ||
secrets: | ||
compass-host: | ||
required: true | ||
compass-client-id: | ||
required: true | ||
compass-client-secret: | ||
required: true | ||
jobs: | ||
test-cra: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: azure/setup-helm@v4.1.0 | ||
id: install-helm | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: install-k3d | ||
env: | ||
K3D_URL: https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | ||
DEFAULT_K3D_VERSION: ${{ inputs.k3d-version }} | ||
run: curl --silent --fail $K3D_URL | TAG=$DEFAULT_K3D_VERSION bash | ||
- name: setup-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
/home/runner/work/application-connector-manager/application-connector-manager/bin | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: run-tests | ||
env: | ||
COMPASS_CLIENT_ID: ${{ secrets.compass-client-id }} | ||
COMPASS_CLIENT_SECRET: ${{ secrets.compass-client-secret }} | ||
COMPASS_HOST: ${{ secrets.compass-host }} | ||
run: make -C tests/hack/ci k3d-agent-tests | ||
- name: archive-logs | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: compass-runtime-agent-test-results | ||
path: compass-runtime-agent-test.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Build the manager binary | ||
FROM golang:1.21.8 as builder | ||
FROM golang:1.22.1 as builder | ||
|
||
WORKDIR /workspace | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
deployments/ | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
resources/charts/gateway-test/certs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# image builder base on golang:1.22.1-alpine3.19 | ||
FROM golang@sha256:0466223b8544fb7d4ff04748acc4d75a608234bf4e79563bff208d2060c0dd79 as builder | ||
|
||
WORKDIR /compass-test/ | ||
|
||
COPY go.mod go.sum ./ | ||
RUN go mod download && go mod verify | ||
|
||
COPY . . | ||
|
||
RUN CGO_ENABLED=0 go test -v -c -o compass-test ./test/compass-runtime-agent/ | ||
|
||
FROM scratch | ||
|
||
COPY --from=builder /compass-test/compass-test / | ||
ENTRYPOINT [ "/compass-test" ] | ||
CMD ["-test.v", "-test.parallel", "1"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# image builder base on golang:1.22.1-alpine3.19 | ||
FROM golang@sha256:0466223b8544fb7d4ff04748acc4d75a608234bf4e79563bff208d2060c0dd79 as builder | ||
|
||
WORKDIR /validator-test/ | ||
|
||
COPY go.mod go.sum ./ | ||
RUN go mod download && go mod verify | ||
|
||
COPY . . | ||
|
||
RUN CGO_ENABLED=0 go test -v -c -o validator-test ./test/application-connectivity-validator/ | ||
|
||
FROM scratch | ||
|
||
COPY --from=builder /validator-test/validator-test / | ||
ENTRYPOINT [ "/validator-test" ] | ||
CMD ["-test.v"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# image builder base on golang:1.22.1-alpine3.19 | ||
FROM golang@sha256:0466223b8544fb7d4ff04748acc4d75a608234bf4e79563bff208d2060c0dd79 as builder | ||
|
||
WORKDIR /gateway-test/ | ||
|
||
COPY go.mod go.sum ./ | ||
RUN go mod download && go mod verify | ||
|
||
COPY . . | ||
|
||
RUN CGO_ENABLED=0 go test -v -c -o gateway-test ./test/application-gateway/ | ||
|
||
FROM scratch | ||
|
||
COPY --from=builder /gateway-test/gateway-test / | ||
ENTRYPOINT [ "/gateway-test" ] | ||
CMD ["-test.v"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# image builder base on golang:1.22.1-alpine3.19 | ||
FROM golang@sha256:0466223b8544fb7d4ff04748acc4d75a608234bf4e79563bff208d2060c0dd79 as builder | ||
|
||
WORKDIR /mock-app/ | ||
|
||
COPY go.mod go.sum ./ | ||
RUN go mod download && go mod verify | ||
|
||
COPY . . | ||
|
||
|
||
RUN CGO_ENABLED=0 go build -v -o mock-app ./tools/external-api-mock-app | ||
|
||
FROM scratch | ||
COPY --from=builder /mock-app/mock-app . | ||
ENTRYPOINT [ "/mock-app" ] | ||
CMD [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
GATEWAY_TEST_IMAGE = "$(DOCKER_PUSH_REPOSITORY)$(DOCKER_PUSH_DIRECTORY)/gateway-test:$(DOCKER_TAG)" | ||
VALIDATOR_TEST_IMAGE = "$(DOCKER_PUSH_REPOSITORY)$(DOCKER_PUSH_DIRECTORY)/connectivity-validator-test:$(DOCKER_TAG)" | ||
COMPASS_TEST_IMAGE = "$(DOCKER_PUSH_REPOSITORY)$(DOCKER_PUSH_DIRECTORY)/compass-runtime-agent-test:$(DOCKER_TAG)" | ||
MOCK_APP_IMAGE = "$(DOCKER_PUSH_REPOSITORY)$(DOCKER_PUSH_DIRECTORY)/mock-app:$(DOCKER_TAG)" | ||
|
||
REGISTRY_PORT ?= 5001 | ||
|
||
publish-gateway-test: image-gateway-test | ||
docker push $(GATEWAY_TEST_IMAGE) | ||
|
||
image-gateway-test: | ||
docker build -t $(GATEWAY_TEST_IMAGE) -f Dockerfile.gateway . | ||
|
||
publish-mock-app: image-mock-app | ||
docker push $(MOCK_APP_IMAGE) | ||
|
||
image-mock-app: | ||
docker build -t $(MOCK_APP_IMAGE) -f Dockerfile.mockapp . | ||
|
||
publish-validator-test: image-validator-test | ||
docker push $(VALIDATOR_TEST_IMAGE) | ||
|
||
image-validator-test: | ||
docker build -t $(VALIDATOR_TEST_IMAGE) -f Dockerfile.connectivity-validator . | ||
|
||
publish-compass-runtime-agent-test: image-compass-runtime-agent-test | ||
docker push $(COMPASS_TEST_IMAGE) | ||
|
||
.PHONY: image-compass-runtime-agent-test | ||
image-compass-runtime-agent-test: | ||
@echo "::group::image-compass-runtime-agent-test" | ||
@docker build -t $(COMPASS_TEST_IMAGE) -f ${PWD}/tests/Dockerfile.compass-runtime-agent . | ||
@echo "::endgroup::" | ||
|
||
.PHONY: compass-runtime-agent-test-image | ||
compass-runtime-agent-test-image: \ | ||
image-compass-runtime-agent-test \ | ||
publish-compass-runtime-agent-test |
Oops, something went wrong.