-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/HEAD' into git-ctf
# Conflicts: # go.sum
- Loading branch information
Showing
34 changed files
with
360 additions
and
320 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 |
---|---|---|
|
@@ -22,6 +22,7 @@ bin | |
/hack | ||
/LICENSES | ||
/local | ||
/gen | ||
|
||
/pkg/test* | ||
|
||
|
@@ -35,3 +36,4 @@ bin | |
|
||
!go.* | ||
!**/*.go | ||
!.git |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
name: User Story | ||
about: User Story | ||
labels: | ||
labels: kind/feature | ||
title: <User Story> - Title | ||
--- | ||
|
||
|
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,9 +1,27 @@ | ||
# see https://github.com/actions/labeler?tab=readme-ov-file#match-object to configure correctly | ||
dependencies: | ||
kind/dependency: | ||
- any: | ||
- head-branch: 'dependencies/*' | ||
- head-branch: 'dependabot/*' | ||
github-actions: | ||
- changed-files: | ||
- any-glob-to-any-file: ['go.mod', 'go.sum'] | ||
component/github-actions: | ||
- any: | ||
- changed-files: | ||
- any-glob-to-any-file: ['.github/**'] | ||
area/documentation: | ||
- any: | ||
- changed-files: | ||
- any-glob-to-any-file: ['docs/**', 'examples/**'] | ||
component/ocm-cli: | ||
- any: | ||
- changed-files: | ||
- any-glob-to-any-file: ['components/ocmcli/**', 'cmds/ocm/**'] | ||
component/ocm-spec: | ||
- any: | ||
- changed-files: | ||
- any-glob-to-any-file: ['resources/**'] | ||
kind/skip-release-notes: | ||
- any: | ||
- changed-files: | ||
- any-glob-to-any-file: ['.github/**'] | ||
- any-glob-to-any-file: ['flake.lock', 'flake.nix'] |
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,28 +1,30 @@ | ||
changelog: | ||
# ../workflows/pull_request.yaml#verify-labels one_of: kind/chore,kind/bugfix,kind/feature,kind/dependency,kind/refactor | ||
exclude: | ||
labels: | ||
- 'kind/skip-release-notes' | ||
- 'wontfix' | ||
- 'triage/wont-fix' | ||
- 'triage/invalid' | ||
- 'dev/wont-fix' | ||
- 'dev/cant-reproduce' | ||
# if an issue matches more than one category, the first one in the list will be used | ||
# Example: | ||
# Labels: kind/chore, kind/dependency => Category: Dependencies | ||
categories: | ||
- title: '‼️ Breaking Changes' | ||
labels: | ||
- 'breaking-change' | ||
- title: '🚀 Features' | ||
labels: | ||
- 'kind/enhancement' | ||
- 'feature' | ||
- 'enhancement' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'kind/bug' | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- title: '🧰 Maintenance' | ||
labels: | ||
- 'chore' | ||
- title: '⬆️ Dependencies' | ||
labels: | ||
- 'dependencies' | ||
- title: '‼️ Breaking Changes' | ||
labels: | ||
- '!BREAKING-CHANGE!' | ||
- title: '🚀 Features' | ||
labels: | ||
- 'kind/feature' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'kind/bugfix' | ||
- title: '⬆️ Dependencies' | ||
labels: | ||
- 'kind/dependency' | ||
- title: '🧰 Maintenance' | ||
labels: | ||
- 'kind/chore' | ||
- 'kind/refactor' | ||
- title: 'Other Changes' | ||
labels: | ||
- "*" |
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,8 @@ | ||
# These settings are synced to GitHub by https://probot.github.io/apps/settings/ | ||
|
||
# see: https://github.com/open-component-model/.github/blob/main/.github/settings.yml | ||
_extends: .github | ||
|
||
labels: | ||
- name: repo/ocm | ||
color: bfd4f2 |
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
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,45 +1,38 @@ | ||
ARG GO_VERSION="1.23" | ||
ARG ALPINE_VERSION="3.20" | ||
FROM --platform=$BUILDPLATFORM golang:1.23-alpine3.20 AS build | ||
|
||
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS build | ||
RUN apk add --no-cache make git | ||
|
||
WORKDIR /src | ||
RUN go env -w GOMODCACHE=/root/.cache/go-build | ||
|
||
COPY go.mod go.sum *.go VERSION ./ | ||
|
||
ARG GO_PROXY="https://proxy.golang.org" | ||
ENV GOPROXY=${GO_PROXY} | ||
RUN --mount=type=cache,target=/root/.cache/go-build go mod download | ||
RUN go mod download | ||
|
||
COPY . . | ||
RUN --mount=type=cache,target=/root/.cache/go-build \ | ||
export VERSION=$(go run api/version/generate/release_generate.go print-rc-version) && \ | ||
export NOW=$(date -u +%FT%T%z) && \ | ||
go build -trimpath -ldflags \ | ||
"-s -w -X ocm.software/ocm/api/version.gitVersion=$VERSION -X ocm.software/ocm/api/version.buildDate=$NOW" \ | ||
-o /bin/ocm ./cmds/ocm/main.go | ||
|
||
FROM alpine:${ALPINE_VERSION} | ||
ENV BUILD_FLAGS="-trimpath" | ||
|
||
# Create group and user | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
RUN addgroup -g "${GID}" ocmGroup && adduser -u "${UID}" ocmUser -G ocmGroup -D | ||
# the GOARCH has not a default value to allow the binary be built according to the host where the command | ||
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon SO | ||
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore, | ||
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform. | ||
RUN make bin/ocm GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} | ||
|
||
COPY --from=build /bin/ocm /bin/ocm | ||
COPY --chmod=0755 components/ocmcli/ocm.sh /bin/ocm.sh | ||
FROM gcr.io/distroless/static-debian12:nonroot@sha256:6cd937e9155bdfd805d1b94e037f9d6a899603306030936a3b11680af0c2ed58 | ||
|
||
COPY --from=build /src/bin/ocm /usr/local/bin/ocm | ||
|
||
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys | ||
LABEL org.opencontainers.image.description="Open Component Model command line interface based on Alpine ${ALPINE_VERSION}" | ||
LABEL org.opencontainers.image.description="Open Component Model command line interface based on Distroless" | ||
LABEL org.opencontainers.image.vendor="SAP SE" | ||
LABEL org.opencontainers.image.licenses="Apache-2.0" | ||
LABEL org.opencontainers.image.url="https://ocm.software/" | ||
LABEL org.opencontainers.image.source="https://github.com/open-component-model/ocm" | ||
LABEL org.opencontainers.image.title="ocm" | ||
LABEL org.opencontainers.image.documentation="https://github.com/open-component-model/ocm/blob/main/docs/reference/ocm.md" | ||
LABEL org.opencontainers.image.base.name="alpine:${ALPINE_VERSION}" | ||
LABEL org.opencontainers.image.base.name="gcr.io/distroless/static-debian12:nonroot" | ||
|
||
USER ocmUser | ||
ENTRYPOINT ["/bin/ocm.sh"] | ||
CMD ["/bin/ocm"] | ||
ENTRYPOINT ["/usr/local/bin/ocm"] | ||
CMD ["version"] |
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
Oops, something went wrong.