Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/app/piped/trigger/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func buildDeployment(
},
GitPath: app.GitPath,
CloudProvider: app.CloudProvider,
PlatformProvider: app.PlatformProvider,
Labels: app.Labels,
Status: model.DeploymentStatus_DEPLOYMENT_PENDING,
StatusReason: "The deployment is waiting to be planned",
Expand Down
1,823 changes: 919 additions & 904 deletions pkg/app/server/service/pipedservice/service.pb.go

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions pkg/app/server/service/pipedservice/service.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/app/server/service/pipedservice/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ message ReportStatResponse {
message ReportPipedMetaRequest {
string version = 1;
repeated model.Piped.CloudProvider cloud_providers = 2;
repeated model.Piped.PlatformProvider platform_providers = 6;
repeated model.ApplicationGitRepository repositories = 3;
model.Piped.SecretEncryption secret_encryption = 4;
string config = 5;
Expand Down
3 changes: 2 additions & 1 deletion pkg/datastore/deploymentstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ func TestAddDeployment(t *testing.T) {
Repo: &model.ApplicationGitRepository{Id: "id"},
Path: "path",
},
CloudProvider: "cloud-provider",
CloudProvider: "cloud-provider",
PlatformProvider: "platform-provider",
Trigger: &model.DeploymentTrigger{
Commit: &model.Commit{
Hash: "hash",
Expand Down
198 changes: 107 additions & 91 deletions pkg/model/application.pb.go

Large diffs are not rendered by default.

13 changes: 3 additions & 10 deletions pkg/model/application.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion pkg/model/application.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ message Application {
ApplicationGitPath git_path = 7 [(validate.rules).message.required = true];
// The name of cloud provider where to deploy this application.
// This must be one of the provider names registered in the piped.
string cloud_provider = 8 [(validate.rules).string.min_len = 1];
string cloud_provider = 8 [deprecated=true];
// The name of platform provider where to deploy this application.
// This must be one of the provider names registered in the piped.
// TODO: Add validation for this field.
string platform_provider = 15;
// Additional description about application.
string description = 9;
// Custom attributes to identify applications.
Expand Down
184 changes: 138 additions & 46 deletions pkg/model/piped.pb.go

Large diffs are not rendered by default.

158 changes: 158 additions & 0 deletions pkg/model/piped.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion pkg/model/piped.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ message Piped {
string type = 2 [(validate.rules).string.min_len = 1];
}

message PlatformProvider {
string name = 1 [(validate.rules).string.min_len = 1];
string type = 2 [(validate.rules).string.min_len = 1];
}

message SecretEncryption {
string type = 1 [(validate.rules).string = {in: ["KEY_PAIR", "GCP_KMS", "AWS_KMS", "NONE"]}];
string public_key = 2;
Expand All @@ -54,13 +59,16 @@ message Piped {
// Unix time when the piped is started up.
int64 started_at = 8;
// List of configured cloud providers.
repeated CloudProvider cloud_providers = 9;
// Deprecated: use PlatformProvider instead.
repeated CloudProvider cloud_providers = 9 [deprecated=true];
// List of configured repositories.
repeated ApplicationGitRepository repositories = 10;
// The latest connection status of piped.
ConnectionStatus status = 11 [(validate.rules).enum.defined_only = true];
// Currently applied config.
string config = 12;
// List of configured platform providers.
repeated PlatformProvider platform_providers = 16;
// The public key/service account for encrypting the secret data.
SecretEncryption secret_encryption = 21;

Expand Down
4 changes: 4 additions & 0 deletions web/model/application_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export class Application extends jspb.Message {
getCloudProvider(): string;
setCloudProvider(value: string): Application;

getPlatformProvider(): string;
setPlatformProvider(value: string): Application;

getDescription(): string;
setDescription(value: string): Application;

Expand Down Expand Up @@ -85,6 +88,7 @@ export namespace Application {
kind: pkg_model_common_pb.ApplicationKind,
gitPath?: pkg_model_common_pb.ApplicationGitPath.AsObject,
cloudProvider: string,
platformProvider: string,
description: string,
labelsMap: Array<[string, string]>,
mostRecentlySuccessfulDeployment?: ApplicationDeploymentReference.AsObject,
Expand Down
30 changes: 30 additions & 0 deletions web/model/application_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ proto.model.Application.toObject = function(includeInstance, msg) {
kind: jspb.Message.getFieldWithDefault(msg, 6, 0),
gitPath: (f = msg.getGitPath()) && pkg_model_common_pb.ApplicationGitPath.toObject(includeInstance, f),
cloudProvider: jspb.Message.getFieldWithDefault(msg, 8, ""),
platformProvider: jspb.Message.getFieldWithDefault(msg, 15, ""),
description: jspb.Message.getFieldWithDefault(msg, 9, ""),
labelsMap: (f = msg.getLabelsMap()) ? f.toObject(includeInstance, undefined) : [],
mostRecentlySuccessfulDeployment: (f = msg.getMostRecentlySuccessfulDeployment()) && proto.model.ApplicationDeploymentReference.toObject(includeInstance, f),
Expand Down Expand Up @@ -209,6 +210,10 @@ proto.model.Application.deserializeBinaryFromReader = function(msg, reader) {
var value = /** @type {string} */ (reader.readString());
msg.setCloudProvider(value);
break;
case 15:
var value = /** @type {string} */ (reader.readString());
msg.setPlatformProvider(value);
break;
case 9:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
Expand Down Expand Up @@ -337,6 +342,13 @@ proto.model.Application.serializeBinaryToWriter = function(message, writer) {
f
);
}
f = message.getPlatformProvider();
if (f.length > 0) {
writer.writeString(
15,
f
);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
Expand Down Expand Up @@ -562,6 +574,24 @@ proto.model.Application.prototype.setCloudProvider = function(value) {
};


/**
* optional string platform_provider = 15;
* @return {string}
*/
proto.model.Application.prototype.getPlatformProvider = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, ""));
};


/**
* @param {string} value
* @return {!proto.model.Application} returns this
*/
proto.model.Application.prototype.setPlatformProvider = function(value) {
return jspb.Message.setProto3StringField(this, 15, value);
};


/**
* optional string description = 9;
* @return {string}
Expand Down
Loading