api, linux/runcopts: ensure output is current
Ensure that the descriptors are re-generated on the CI and block merges that don't include updates. We also enable the `check-protos` check as part of this process. The installation process for protobufs has been fixed to support protobuild. Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
843b35c9f2
commit
157cfb1ad2
@ -36,9 +36,8 @@ before_install:
|
|||||||
- uname -r
|
- uname -r
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- wget https://github.com/google/protobuf/releases/download/v3.1.0/protoc-3.1.0-linux-x86_64.zip -O /tmp/protoc-3.1.0-linux-x86_64.zip
|
- wget https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip -O /tmp/protoc-3.3.0-linux-x86_64.zip
|
||||||
- unzip -o -d /tmp/protobuf /tmp/protoc-3.1.0-linux-x86_64.zip
|
- sudo unzip -o -d /usr/local /tmp/protoc-3.3.0-linux-x86_64.zip
|
||||||
- export PATH=$PATH:/tmp/protobuf/bin/
|
|
||||||
- go get -u github.com/vbatts/git-validation
|
- go get -u github.com/vbatts/git-validation
|
||||||
- sudo wget https://github.com/crosbymichael/runc/releases/download/ctd-4/runc -O /bin/runc; sudo chmod +x /bin/runc
|
- sudo wget https://github.com/crosbymichael/runc/releases/download/ctd-4/runc -O /bin/runc; sudo chmod +x /bin/runc
|
||||||
- wget https://github.com/xemul/criu/archive/v3.0.tar.gz -O /tmp/criu.tar.gz
|
- wget https://github.com/xemul/criu/archive/v3.0.tar.gz -O /tmp/criu.tar.gz
|
||||||
@ -57,6 +56,7 @@ script:
|
|||||||
- make setup
|
- make setup
|
||||||
- make vet
|
- make vet
|
||||||
- make ineffassign
|
- make ineffassign
|
||||||
|
- if [ "$GOOS" = "linux" ]; then make check-protos check-api-descriptors; fi
|
||||||
- make build
|
- make build
|
||||||
- make binaries
|
- make binaries
|
||||||
- if [ "$GOOS" = "linux" ]; then sudo make install ; fi
|
- if [ "$GOOS" = "linux" ]; then sudo make install ; fi
|
||||||
|
8
Makefile
8
Makefile
@ -83,12 +83,18 @@ protos: bin/protoc-gen-gogoctrd ## generate protobuf
|
|||||||
@echo "$(WHALE) $@"
|
@echo "$(WHALE) $@"
|
||||||
@PATH=${ROOTDIR}/bin:${PATH} protobuild ${PACKAGES}
|
@PATH=${ROOTDIR}/bin:${PATH} protobuild ${PACKAGES}
|
||||||
|
|
||||||
checkprotos: protos ## check if protobufs needs to be generated again
|
check-protos: protos ## check if protobufs needs to be generated again
|
||||||
@echo "$(WHALE) $@"
|
@echo "$(WHALE) $@"
|
||||||
@test -z "$$(git status --short | grep ".pb.go" | tee /dev/stderr)" || \
|
@test -z "$$(git status --short | grep ".pb.go" | tee /dev/stderr)" || \
|
||||||
((git diff | cat) && \
|
((git diff | cat) && \
|
||||||
(echo "$(ONI) please run 'make generate' when making changes to proto files" && false))
|
(echo "$(ONI) please run 'make generate' when making changes to proto files" && false))
|
||||||
|
|
||||||
|
check-api-descriptors: protos ## check that protobuf changes aren't present.
|
||||||
|
@echo "$(WHALE) $@"
|
||||||
|
@test -z "$$(git status --short | grep ".pb.txt" | tee /dev/stderr)" || \
|
||||||
|
((git diff $$(find . -name '*.pb.txt') | cat) && \
|
||||||
|
(echo "$(ONI) please run 'make protos' when making changes to proto files and check-in the generated descriptor file changes" && false))
|
||||||
|
|
||||||
# Depends on binaries because vet will silently fail if it can't load compiled
|
# Depends on binaries because vet will silently fail if it can't load compiled
|
||||||
# imports
|
# imports
|
||||||
vet: ## run go vet
|
vet: ## run go vet
|
||||||
|
@ -2888,6 +2888,7 @@ file {
|
|||||||
name: "github.com/containerd/containerd/api/types/task/task.proto"
|
name: "github.com/containerd/containerd/api/types/task/task.proto"
|
||||||
package: "containerd.v1.types"
|
package: "containerd.v1.types"
|
||||||
dependency: "gogoproto/gogo.proto"
|
dependency: "gogoproto/gogo.proto"
|
||||||
|
dependency: "google/protobuf/timestamp.proto"
|
||||||
message_type {
|
message_type {
|
||||||
name: "Process"
|
name: "Process"
|
||||||
field {
|
field {
|
||||||
@ -2954,6 +2955,18 @@ file {
|
|||||||
type: TYPE_UINT32
|
type: TYPE_UINT32
|
||||||
json_name: "exitStatus"
|
json_name: "exitStatus"
|
||||||
}
|
}
|
||||||
|
field {
|
||||||
|
name: "exited_at"
|
||||||
|
number: 10
|
||||||
|
label: LABEL_OPTIONAL
|
||||||
|
type: TYPE_MESSAGE
|
||||||
|
type_name: ".google.protobuf.Timestamp"
|
||||||
|
options {
|
||||||
|
65010: 1
|
||||||
|
65001: 0
|
||||||
|
}
|
||||||
|
json_name: "exitedAt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
enum_type {
|
enum_type {
|
||||||
name: "Status"
|
name: "Status"
|
||||||
|
@ -5,17 +5,31 @@ file {
|
|||||||
message_type {
|
message_type {
|
||||||
name: "RuncOptions"
|
name: "RuncOptions"
|
||||||
field {
|
field {
|
||||||
name: "criu_path"
|
name: "runtime"
|
||||||
number: 1
|
number: 1
|
||||||
label: LABEL_OPTIONAL
|
label: LABEL_OPTIONAL
|
||||||
type: TYPE_STRING
|
type: TYPE_STRING
|
||||||
|
json_name: "runtime"
|
||||||
|
}
|
||||||
|
field {
|
||||||
|
name: "runtime_root"
|
||||||
|
number: 2
|
||||||
|
label: LABEL_OPTIONAL
|
||||||
|
type: TYPE_STRING
|
||||||
|
json_name: "runtimeRoot"
|
||||||
|
}
|
||||||
|
field {
|
||||||
|
name: "criu_path"
|
||||||
|
number: 3
|
||||||
|
label: LABEL_OPTIONAL
|
||||||
|
type: TYPE_STRING
|
||||||
json_name: "criuPath"
|
json_name: "criuPath"
|
||||||
}
|
}
|
||||||
field {
|
field {
|
||||||
name: "systemd_cgroup"
|
name: "systemd_cgroup"
|
||||||
number: 2
|
number: 4
|
||||||
label: LABEL_OPTIONAL
|
label: LABEL_OPTIONAL
|
||||||
type: TYPE_STRING
|
type: TYPE_BOOL
|
||||||
json_name: "systemdCgroup"
|
json_name: "systemdCgroup"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user