mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
go.mod still declared `module github.com/hanzoai/deploy` after the repo was renamed. A Go module path is not cosmetic — it is the resolvable location. So `go get github.com/hanzoai/cd` could not work, and anything importing this module had to spell a name that no longer exists at that address. The build log of v3.6.0 is where it surfaced: the compiler was still emitting github.com/hanzoai/deploy/cmd/cd/commands. 3541 import paths across 690 .go, 19 .proto, 4 .yaml, 3 .sh, 2 .mod, Procfile and Makefile. Plus the 62 ghcr.io/hanzoai/deploy image references, moved to ghcr.io/hanzoai/cd to match hanzo.yml's build target — a distinct string from the module path, replaced separately so neither could clobber the other. go mod tidy clean, CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./... clean. Co-authored-by: Hanzo Dev <[email protected]>
87 lines
2.8 KiB
Protocol Buffer
87 lines
2.8 KiB
Protocol Buffer
syntax = "proto3";
|
|
option go_package = "github.com/hanzoai/cd/cmpserver/apiclient";
|
|
|
|
package plugin;
|
|
|
|
import "github.com/hanzoai/cd/reposerver/repository/repository.proto";
|
|
import "google/protobuf/empty.proto";
|
|
|
|
// AppStreamRequest is the request object used to send the application's
|
|
// files over a stream.
|
|
message AppStreamRequest {
|
|
oneof request {
|
|
ManifestRequestMetadata metadata = 1;
|
|
File file = 2;
|
|
}
|
|
}
|
|
|
|
// ManifestRequestMetadata defines the metada related to the file being sent
|
|
// to the CMP server.
|
|
message ManifestRequestMetadata {
|
|
// appName refers to the Hanzo CD Application name
|
|
string appName = 1;
|
|
// appRelPath points to the application relative path inside the tarball
|
|
string appRelPath = 2;
|
|
// checksum is used to verify the integrity of the file
|
|
string checksum = 3;
|
|
// size relates to the file size in bytes
|
|
int64 size = 4;
|
|
// env is a list with the environment variables needed to generate manifests
|
|
repeated EnvEntry env = 5;
|
|
}
|
|
|
|
// EnvEntry represents an entry in the application's environment
|
|
message EnvEntry {
|
|
// Name is the name of the variable, usually expressed in uppercase
|
|
string name = 1;
|
|
// Value is the value of the variable
|
|
string value = 2;
|
|
}
|
|
|
|
message ManifestResponse {
|
|
repeated string manifests = 1;
|
|
string sourceType = 2;
|
|
}
|
|
|
|
message RepositoryResponse {
|
|
bool isSupported = 1;
|
|
bool isDiscoveryEnabled = 2;
|
|
}
|
|
|
|
// ParametersAnnouncementResponse contains a list of announcements. This list represents all the parameters which a CMP
|
|
// is able to accept.
|
|
message ParametersAnnouncementResponse {
|
|
repeated repository.ParameterAnnouncement parameterAnnouncements = 1;
|
|
}
|
|
|
|
message File {
|
|
bytes chunk = 1;
|
|
}
|
|
|
|
// CheckPluginConfigurationResponse contains a list of plugin configuration flags.
|
|
message CheckPluginConfigurationResponse {
|
|
bool isDiscoveryConfigured = 1;
|
|
bool provideGitCreds = 2;
|
|
}
|
|
|
|
// ConfigManagementPlugin Service
|
|
service ConfigManagementPluginService {
|
|
// GenerateManifests receive a stream containing a tgz archive with all required files necessary
|
|
// to generate manifests
|
|
rpc GenerateManifest(stream AppStreamRequest) returns (ManifestResponse) {
|
|
}
|
|
|
|
// CheckPluginConfiguration is a pre-flight request to check the plugin configuration
|
|
// without sending the whole repo.
|
|
rpc CheckPluginConfiguration(google.protobuf.Empty) returns (CheckPluginConfigurationResponse) {
|
|
}
|
|
|
|
// MatchRepository returns whether or not the given application is supported by the plugin
|
|
rpc MatchRepository(stream AppStreamRequest) returns (RepositoryResponse) {
|
|
}
|
|
|
|
// GetParametersAnnouncement gets a list of parameter announcements for the given app
|
|
rpc GetParametersAnnouncement(stream AppStreamRequest) returns (ParametersAnnouncementResponse) {
|
|
}
|
|
}
|