Skip to content

Commit

Permalink
Rename deploysource's revision to commit_hash (#5450)
Browse files Browse the repository at this point in the history
* Rename deploysource's revision to commit_hash

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>

* Fix the failed test

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>

---------

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
  • Loading branch information
Warashi authored Dec 25, 2024
1 parent d66440b commit 437d26f
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 72 deletions.
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/deploysource/deploysource.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type DeploySource struct {
func (d *DeploySource) ToPluginDeploySource() *deployment.DeploymentSource {
return &deployment.DeploymentSource{
ApplicationDirectory: d.AppDir,
Revision: d.Revision,
CommitHash: d.Revision,
ApplicationConfig: d.ApplicationConfig,
ApplicationConfigFilename: d.ApplicationConfigFilename,
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/kubernetes/deployment/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (a *DeploymentService) loadManifests(ctx context.Context, deploy *model.Dep
manifests, err := a.loader.LoadManifests(ctx, provider.LoaderInput{
PipedID: deploy.GetPipedId(),
AppID: deploy.GetApplicationId(),
CommitHash: deploymentSource.GetRevision(),
CommitHash: deploymentSource.GetCommitHash(),
AppName: deploy.GetApplicationName(),
AppDir: deploymentSource.GetApplicationDirectory(),
ConfigFilename: deploymentSource.GetApplicationConfigFilename(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func TestDeploymentService_executeK8sSyncStage(t *testing.T) {
RunningDeploymentSource: nil,
TargetDeploymentSource: &deployment.DeploymentSource{
ApplicationDirectory: filepath.Join(examplesDir(), "kubernetes", "simple"),
Revision: "0123456789",
CommitHash: "0123456789",
ApplicationConfig: cfg,
ApplicationConfigFilename: "app.pipecd.yaml",
},
Expand Down
132 changes: 66 additions & 66 deletions pkg/plugin/api/v1alpha1/deployment/api.pb.go

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

2 changes: 1 addition & 1 deletion pkg/plugin/api/v1alpha1/deployment/api.pb.validate.go

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

4 changes: 2 additions & 2 deletions pkg/plugin/api/v1alpha1/deployment/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ message ExecutePluginInput {
message DeploymentSource {
// The application directory where the source code is located.
string application_directory = 1;
// The git commit revision of the source code.
string revision = 2;
// The git commit hash of the source code.
string commit_hash = 2;
// The configuration of the application which is specific for plugins.
bytes application_config = 3;
// The filename of the application configuration file.
Expand Down

0 comments on commit 437d26f

Please sign in to comment.