forked from openshift/cluster-api-provider-baremetal
-
Notifications
You must be signed in to change notification settings - Fork 0
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 openshift#112 from Nordix/v1alpha2
Initial PR on v1alpha2 migration (inc. openshift#111)
- Loading branch information
Showing
8,459 changed files
with
8,843 additions
and
2,885,216 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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,13 +1,11 @@ | ||
language: go | ||
sudo: false | ||
go: | ||
- "1.11.5" | ||
- "1.12" | ||
before_install: | ||
- go get sigs.k8s.io/kustomize | ||
- ./tools/install_kubebuilder.sh | ||
- make generate | ||
env: | ||
- TARGET=fmt | ||
- TARGET=vet | ||
- TARGET=unit | ||
script: KUBEBUILDER_ASSETS="$(pwd)/kubebuilder/bin/" make $TARGET | ||
script: KUBEBUILDER_ASSETS="$(pwd)/hack/tools/bin/" make $TARGET |
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,15 +1,47 @@ | ||
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.10 AS builder | ||
WORKDIR /go/src/github.com/metal3-io/cluster-api-provider-baremetal | ||
COPY . . | ||
RUN go build -o machine-controller-manager ./cmd/manager | ||
RUN go build -o manager ./vendor/sigs.k8s.io/cluster-api/cmd/manager | ||
|
||
FROM registry.svc.ci.openshift.org/openshift/origin-v4.0:base | ||
#RUN INSTALL_PKGS=" \ | ||
# libvirt-libs openssh-clients genisoimage \ | ||
# " && \ | ||
# yum install -y $INSTALL_PKGS && \ | ||
# rpm -V $INSTALL_PKGS && \ | ||
# yum clean all | ||
COPY --from=builder /go/src/github.com/metal3-io/cluster-api-provider-baremetal/manager / | ||
COPY --from=builder /go/src/github.com/metal3-io/cluster-api-provider-baremetal/machine-controller-manager / | ||
# Copyright 2019 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Build the manager binary on golang image | ||
FROM registry.hub.docker.com/library/golang:1.12.9 as builder | ||
WORKDIR /workspace | ||
|
||
# Run this with docker build --build_arg $(go env GOPROXY) to override the goproxy | ||
ARG goproxy=https://proxy.golang.org | ||
ENV GOPROXY=$goproxy | ||
|
||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
# Cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
# Copy the sources | ||
COPY main.go main.go | ||
COPY api/ api/ | ||
COPY baremetal/ baremetal/ | ||
COPY controllers/ controllers/ | ||
|
||
# Build | ||
ARG ARCH | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \ | ||
go build -a -ldflags '-extldflags "-static"' \ | ||
-o manager . | ||
|
||
# Copy the controller-manager into a thin image | ||
FROM gcr.io/distroless/static:latest | ||
WORKDIR / | ||
COPY --from=builder /workspace/manager . | ||
USER nobody | ||
ENTRYPOINT ["/manager"] |
Oops, something went wrong.