Skip to content
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
3 changes: 1 addition & 2 deletions .github/actions/setup-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ runs:
go-
- name: Setup deps
shell: bash
run: |
make install-build-deps
run: make install-build-deps
20 changes: 0 additions & 20 deletions .github/workflows/cache-dependencies.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/ecr-publish-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ jobs:
registry-type: public

- name: Build and push image
run: |
PATH=$PATH:$(go env GOPATH)/bin make -f Makefile.docker push-build-image
run: make -f Makefile.docker push-build-image
12 changes: 2 additions & 10 deletions .github/workflows/release-candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,14 @@ jobs:
rc:
name: Push release candidate tag
runs-on: ubuntu-latest
container: public.ecr.aws/eksctl/eksctl-build:f1de3fc49c019576763ca2e0e84e360e9dfb787c
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
token: ${{ secrets.EKSCTLBOT_TOKEN }}
fetch-depth: 0
- name: Cache go-build and mod
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0
with:
path: |
~/.cache/go-build/
~/go/pkg/mod/
key: go-${{ hashFiles('go.sum') }}
restore-keys: |
go-
- name: Setup build environment
uses: ./.github/actions/setup-build
- name: Setup identity as eksctl-bot
uses: ./.github/actions/setup-identity
with:
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,14 @@ jobs:
rc:
name: Push release tag
runs-on: ubuntu-latest
container: public.ecr.aws/eksctl/eksctl-build:f1de3fc49c019576763ca2e0e84e360e9dfb787c
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
token: ${{ secrets.EKSCTLBOT_TOKEN }}
fetch-depth: 0
- name: Cache go-build and mod
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0
with:
path: |
~/.cache/go-build/
~/go/pkg/mod/
key: go-${{ hashFiles('go.sum') }}
restore-keys: |
go-
- name: Setup build environment
uses: ./.github/actions/setup-build
- name: Setup identity as eksctl-bot
uses: ./.github/actions/setup-identity
with:
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/test-and-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
uses: ./.github/actions/setup-build
- name: Unit test
run: |
PATH=$PATH:$(go env GOPATH)/bin make build
PATH=$PATH:$(go env GOPATH)/bin make unit-test-no-generate
make build
make unit-test-no-generate
lint:
name: Lint
runs-on: ubuntu-latest
Expand All @@ -30,8 +30,7 @@ jobs:
- name: Setup build environment
uses: ./.github/actions/setup-build
- name: Lint
run: |
PATH=$PATH:$(go env GOPATH)/bin make lint
run: make lint
image:
name: Build and check image
runs-on: ubuntu-latest
Expand All @@ -43,5 +42,4 @@ jobs:
- name: Setup build environment
uses: ./.github/actions/setup-build
- name: build
run: |
PATH=$PATH:$(go env GOPATH)/bin make -f Makefile.docker check-build-image-manifest-up-to-date
run: make -f Makefile.docker check-build-image-manifest-up-to-date
27 changes: 14 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
ARG BUILD_IMAGE=public.ecr.aws/eksctl/eksctl-build:f1de3fc49c019576763ca2e0e84e360e9dfb787c
FROM $BUILD_IMAGE as build
# syntax=docker/dockerfile:1
FROM public.ecr.aws/docker/library/golang:1.24.0 AS builder

WORKDIR /src
COPY . .

COPY . /src
RUN --mount=type=cache,target=/go/pkg/mod <<EOT
go mod download
EOT

RUN make test
RUN make build \
&& cp ./eksctl /out/usr/local/bin/eksctl
RUN make build-integration-test \
&& mkdir -p /out/usr/local/share/eksctl \
&& cp -r integration/data/*.yaml integration/scripts /out/usr/local/share/eksctl \
&& cp ./eksctl-integration-test /out/usr/local/bin/eksctl-integration-test
RUN <<EOT
make install-build-deps
make build
chown 65532 eksctl
EOT

FROM scratch
COPY --from=build /out /
ENTRYPOINT ["eksctl"]
FROM public.ecr.aws/eks-distro/kubernetes/go-runner:v0.16.4-eks-1-32-6 AS go-runner
COPY --from=builder /src/eksctl /eksctl
ENTRYPOINT ["/eksctl"]