Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix e2e test command #2708

Merged
merged 2 commits into from
Mar 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,27 @@ jobs:
- name: Test
run: make test

validate-dockerfiles:
name: Validate Dockerfiles
runs-on: ubuntu-latest
container: ghcr.io/kedacore/build-tools:main
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 1

- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
dockerfiles:
- 'Dockerfile*'

- name: Build images
if: steps.filter.outputs.dockerfiles == 'true'
run: make docker-build

validate-build-tools:
name: Validate build-tools
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Build the manager binary
ARG BUILDPLATFORM=linux/amd64
FROM --platform=$BUILDPLATFORM golang:1.17.3 AS builder

ARG BUILD_VERSION=main
Expand Down Expand Up @@ -27,7 +28,8 @@ COPY pkg/ pkg/

# Build
# https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/
ARG TARGETOS TARGETARCH
ARG TARGETOS=linux
ARG TARGETARCH=amd64
RUN VERSION=${BUILD_VERSION} GIT_COMMIT=${GIT_COMMIT} GIT_VERSION=${GIT_VERSION} TARGET_OS=$TARGETOS ARCH=$TARGETARCH make manager

# Use distroless as minimal base image to package the manager binary
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.adapter
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Build the adapter binary
ARG BUILDPLATFORM=linux/amd64
FROM --platform=$BUILDPLATFORM golang:1.17.3 as builder

ARG BUILD_VERSION=main
Expand Down Expand Up @@ -29,7 +30,8 @@ RUN mkdir -p /apiserver.local.config/certificates && chmod -R 777 /apiserver.loc

# Build
# https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/
ARG TARGETOS TARGETARCH
ARG TARGETOS=linux
ARG TARGETARCH=amd64
RUN VERSION=${BUILD_VERSION} GIT_COMMIT=${GIT_COMMIT} GIT_VERSION=${GIT_VERSION} TARGET_OS=$TARGETOS ARCH=$TARGETARCH make adapter

# Use distroless as minimal base image to package the manager binary
Expand Down