generated from ironcore-dev/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing pieces to initial commit
- Loading branch information
Showing
5 changed files
with
54 additions
and
54 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 |
---|---|---|
@@ -1,26 +1,22 @@ | ||
FROM golang:1.22.0 as builder | ||
FROM golang:1.22.1 as builder | ||
ARG GOARCH | ||
|
||
WORKDIR /workspace | ||
WORKDIR /metal-provider | ||
|
||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
COPY hack/ hack/ | ||
RUN --mount=type=ssh --mount=type=secret,id=github_pat GITHUB_PAT_PATH=/run/secrets/github_pat ./hack/setup-git-redirect.sh \ | ||
&& mkdir -p -m 0600 ~/.ssh \ | ||
&& ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts \ | ||
&& go mod download | ||
RUN go mod download | ||
|
||
COPY apis/ apis/ | ||
COPY client/applyconfiguration/ client/applyconfiguration/ | ||
COPY metal-provider/ metal-provider/ | ||
COPY pkg/ pkg/ | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} go build -a -o /metal-provider metal-provider/main.go | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} go build -a -o /irictl-machine github.com/ironcore-dev/ironcore/irictl-machine/cmd/irictl-machine | ||
COPY internal/ internal/ | ||
COPY servers/ servers/ | ||
COPY *.go ./ | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} go build -a -o metal-provider . | ||
|
||
FROM debian:bookworm-20240211-slim | ||
|
||
WORKDIR / | ||
|
||
USER 65532:65532 | ||
ENTRYPOINT ["/metal-provider"] | ||
|
||
COPY --from=builder /metal-provider . | ||
COPY --from=builder /irictl-machine . | ||
COPY --from=builder /metal-provider/metal-provider . |
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,33 @@ | ||
SHELL = /usr/bin/env bash -o pipefail | ||
.SHELLFLAGS = -ec | ||
|
||
.PHONY: all | ||
all: build | ||
|
||
.PHONY: help | ||
help: ## Display this help. | ||
@awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) | ||
|
||
.PHONY: fmt | ||
fmt: ## Run go fmt against code. | ||
@go fmt ./... | ||
|
||
.PHONY: vet | ||
vet: ## Run go vet against code. | ||
@go vet ./... | ||
|
||
.PHONY: test | ||
test: fmt vet ## Run tests. | ||
@go run github.com/onsi/ginkgo/v2/ginkgo -r --race --randomize-suites --randomize-all --keep-going --timeout=9223372036s -v | ||
|
||
.PHONY: build | ||
build: fmt vet ## Build manager binary. | ||
@go build -o metal-provider . | ||
|
||
.PHONY: addlicense | ||
addlicense: ## Add license headers to all go files. | ||
find . -name '*.go' -exec go run github.com/google/addlicense -f hack/license-header.txt {} + | ||
|
||
.PHONY: checklicense | ||
checklicense: ## Check that every file has a license header present. | ||
find . -name '*.go' -exec go run github.com/google/addlicense -check -c 'IronCore authors' {} + |
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