mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-03-12 15:52:12 +00:00
Compare commits
4 Commits
fix-create
...
burgerdev/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
884b217acf | ||
|
|
aec350f40a | ||
|
|
418e4d4926 | ||
|
|
f0c61dc217 |
33
.github/workflows/static-checks.yaml
vendored
33
.github/workflows/static-checks.yaml
vendored
@@ -150,3 +150,36 @@ jobs:
|
|||||||
needs: skipper
|
needs: skipper
|
||||||
if: ${{ needs.skipper.outputs.skip_static != 'yes' }}
|
if: ${{ needs.skipper.outputs.skip_static != 'yes' }}
|
||||||
uses: ./.github/workflows/govulncheck.yaml
|
uses: ./.github/workflows/govulncheck.yaml
|
||||||
|
|
||||||
|
codegen:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
needs: skipper
|
||||||
|
if: ${{ needs.skipper.outputs.skip_static != 'yes' }}
|
||||||
|
permissions:
|
||||||
|
contents: read # for checkout
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
|
- name: generate
|
||||||
|
run: make -C src/agent generate-protocols
|
||||||
|
- name: check for diff
|
||||||
|
run: |
|
||||||
|
diff=$(git diff)
|
||||||
|
if [[ -z "${diff}" ]]; then
|
||||||
|
echo "No diff detected."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat << EOF >> "${GITHUB_STEP_SUMMARY}"
|
||||||
|
Run \`make -C src/agent generate-protocols\` to update protobuf bindings.
|
||||||
|
|
||||||
|
\`\`\`diff
|
||||||
|
${diff}
|
||||||
|
\`\`\`
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "::error::Golang protobuf bindings need to be regenerated (see Github step summary for diff)."
|
||||||
|
exit 1
|
||||||
|
|||||||
@@ -217,4 +217,11 @@ codecov-html: check_tarpaulin
|
|||||||
|
|
||||||
##TARGET generate-protocols: generate/update grpc agent protocols
|
##TARGET generate-protocols: generate/update grpc agent protocols
|
||||||
generate-protocols:
|
generate-protocols:
|
||||||
|
image=$$(docker build -q \
|
||||||
|
--build-arg GO_VERSION=$$(yq '.languages.golang.version' $(CURDIR)/../../versions.yaml) \
|
||||||
|
--build-arg PROTOC_VERSION=$$(yq '.externals.protoc.version' $(CURDIR)/../../versions.yaml | grep -oE "[0-9.]+") \
|
||||||
|
--build-arg PROTOC_GEN_GO_VERSION=$$(yq '.externals.protoc-gen-go.version' $(CURDIR)/../../versions.yaml) \
|
||||||
|
--build-arg TTRPC_VERSION=$$(yq '.externals.ttrpc.version' $(CURDIR)/../../versions.yaml) \
|
||||||
|
$(CURDIR)/../../tools/packaging/static-build/codegen) && \
|
||||||
|
docker run --rm --workdir /kata/src/agent -v $(CURDIR)/../..:/kata --user $(shell id -u) $$image \
|
||||||
../libs/protocols/hack/update-generated-proto.sh all
|
../libs/protocols/hack/update-generated-proto.sh all
|
||||||
|
|||||||
23
tools/packaging/static-build/codegen/Dockerfile
Normal file
23
tools/packaging/static-build/codegen/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Copyright (c) 2025 Edgeless Systems gmbH
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
ARG GO_VERSION=
|
||||||
|
|
||||||
|
FROM busybox:1.37.0 AS resources
|
||||||
|
|
||||||
|
WORKDIR /usr/local
|
||||||
|
|
||||||
|
ARG PROTOC_VERSION=
|
||||||
|
RUN wget -O /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
|
||||||
|
unzip /tmp/protoc.zip
|
||||||
|
|
||||||
|
FROM golang:${GO_VERSION}
|
||||||
|
|
||||||
|
COPY --from=resources /usr/local /usr
|
||||||
|
|
||||||
|
ARG PROTOC_GEN_GO_VERSION=
|
||||||
|
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOC_GEN_GO_VERSION}
|
||||||
|
ARG TTRPC_VERSION=
|
||||||
|
RUN go install github.com/containerd/ttrpc/cmd/protoc-gen-go-ttrpc@${TTRPC_VERSION}
|
||||||
|
RUN go install github.com/containerd/ttrpc/cmd/protoc-gen-gogottrpc@${TTRPC_VERSION}
|
||||||
@@ -374,6 +374,21 @@ externals:
|
|||||||
package: "ArmVirtPkg/ArmVirtQemu.dsc"
|
package: "ArmVirtPkg/ArmVirtQemu.dsc"
|
||||||
package_output_dir: "ArmVirtQemu-AARCH64"
|
package_output_dir: "ArmVirtQemu-AARCH64"
|
||||||
|
|
||||||
|
protoc:
|
||||||
|
description: "Protobuf compiler"
|
||||||
|
url: "https://github.com/protocolbuffers/protobuf/releases"
|
||||||
|
version: "v21.12"
|
||||||
|
|
||||||
|
protoc-gen-go:
|
||||||
|
description: "Protobuf Go compiler"
|
||||||
|
url: "https://github.com/protocolbuffers/protobuf-go/releases"
|
||||||
|
version: "v1.28.1"
|
||||||
|
|
||||||
|
ttrpc:
|
||||||
|
description: "ttRPC libary and code generation utilities"
|
||||||
|
url: "https://github.com/containerd/ttrpc/releases"
|
||||||
|
version: "v1.2.7"
|
||||||
|
|
||||||
virtiofsd:
|
virtiofsd:
|
||||||
description: "vhost-user virtio-fs device backend written in Rust"
|
description: "vhost-user virtio-fs device backend written in Rust"
|
||||||
url: "https://gitlab.com/virtio-fs/virtiofsd"
|
url: "https://gitlab.com/virtio-fs/virtiofsd"
|
||||||
|
|||||||
Reference in New Issue
Block a user