Skip to content

Commit

Permalink
AAKaaS originHash (#4843)
Browse files Browse the repository at this point in the history
* originHash

* analysis output

* unit tests
  • Loading branch information
tiloKo authored Mar 5, 2024
1 parent a675ed2 commit c0e56d2
Show file tree
Hide file tree
Showing 21 changed files with 200 additions and 39 deletions.
2 changes: 1 addition & 1 deletion cmd/abapAddonAssemblyKitCheckCVs.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func runAbapAddonAssemblyKitCheckCVs(config *abapAddonAssemblyKitCheckCVsOptions
log.Entry().Info("╚══════════════════════════════╝")

conn := new(abapbuild.Connector)
if err := conn.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, *utils); err != nil {
if err := conn.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, *utils, ""); err != nil {
return err
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/abapAddonAssemblyKitCheckPV.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func runAbapAddonAssemblyKitCheckPV(config *abapAddonAssemblyKitCheckPVOptions,
log.Entry().Info("╚═════════════════════════════╝")

conn := new(abapbuild.Connector)
if err := conn.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, utils); err != nil {
if err := conn.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, utils, ""); err != nil {
return err
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/abapAddonAssemblyKitCreateTargetVector.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func abapAddonAssemblyKitCreateTargetVector(config abapAddonAssemblyKitCreateTar

func runAbapAddonAssemblyKitCreateTargetVector(config *abapAddonAssemblyKitCreateTargetVectorOptions, telemetryData *telemetry.CustomData, client piperhttp.Sender, cpe *abapAddonAssemblyKitCreateTargetVectorCommonPipelineEnvironment) error {
conn := new(abapbuild.Connector)
if err := conn.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, client); err != nil {
if err := conn.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, client, config.AbapAddonAssemblyKitOriginHash); err != nil {
return err
}

Expand Down
20 changes: 16 additions & 4 deletions cmd/abapAddonAssemblyKitCreateTargetVector_generated.go

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

2 changes: 1 addition & 1 deletion cmd/abapAddonAssemblyKitPublishTargetVector.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func abapAddonAssemblyKitPublishTargetVector(config abapAddonAssemblyKitPublishT
func runAbapAddonAssemblyKitPublishTargetVector(config *abapAddonAssemblyKitPublishTargetVectorOptions, telemetryData *telemetry.CustomData, utils *aakaas.AakUtils) error {

conn := new(abapbuild.Connector)
if err := conn.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, *utils); err != nil {
if err := conn.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, *utils, config.AbapAddonAssemblyKitOriginHash); err != nil {
return err
}
conn.MaxRuntime = (*utils).GetMaxRuntime()
Expand Down
26 changes: 19 additions & 7 deletions cmd/abapAddonAssemblyKitPublishTargetVector_generated.go

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

4 changes: 2 additions & 2 deletions cmd/abapAddonAssemblyKitRegisterPackages.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func runAbapAddonAssemblyKitRegisterPackages(config *abapAddonAssemblyKitRegiste
}

conn := new(abapbuild.Connector)
if err := conn.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, client); err != nil {
if err := conn.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, client, config.AbapAddonAssemblyKitOriginHash); err != nil {
return err
}

Expand All @@ -49,7 +49,7 @@ func runAbapAddonAssemblyKitRegisterPackages(config *abapAddonAssemblyKitRegiste
}

conn2 := new(abapbuild.Connector) // we need a second connector without the added Header
if err := conn2.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, client); err != nil {
if err := conn2.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, client, config.AbapAddonAssemblyKitOriginHash); err != nil {
return err
}

Expand Down
20 changes: 16 additions & 4 deletions cmd/abapAddonAssemblyKitRegisterPackages_generated.go

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

2 changes: 1 addition & 1 deletion cmd/abapAddonAssemblyKitReleasePackages.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func abapAddonAssemblyKitReleasePackages(config abapAddonAssemblyKitReleasePacka
func runAbapAddonAssemblyKitReleasePackages(config *abapAddonAssemblyKitReleasePackagesOptions, telemetryData *telemetry.CustomData, utils *aakaas.AakUtils,
cpe *abapAddonAssemblyKitReleasePackagesCommonPipelineEnvironment) error {
conn := new(abapbuild.Connector)
if err := conn.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, *utils); err != nil {
if err := conn.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, *utils, config.AbapAddonAssemblyKitOriginHash); err != nil {
return err
}
var addonDescriptor abaputils.AddonDescriptor
Expand Down
24 changes: 18 additions & 6 deletions cmd/abapAddonAssemblyKitReleasePackages_generated.go

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

2 changes: 1 addition & 1 deletion cmd/abapAddonAssemblyKitReserveNextPackages.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func runAbapAddonAssemblyKitReserveNextPackages(config *abapAddonAssemblyKitRese

log.Entry().Infof("... initializing connection to AAKaaS @ %v", config.AbapAddonAssemblyKitEndpoint)
conn := new(abapbuild.Connector)
if err := conn.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, *utils); err != nil {
if err := conn.InitAAKaaS(config.AbapAddonAssemblyKitEndpoint, config.Username, config.Password, *utils, config.AbapAddonAssemblyKitOriginHash); err != nil {
return err
}

Expand Down
24 changes: 18 additions & 6 deletions cmd/abapAddonAssemblyKitReserveNextPackages_generated.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/abap/aakaas/targetVector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func TestTargetVectorCreate(t *testing.T) {
mc := abapbuild.NewMockClient()
mc.AddData(AAKaaSHead)
mc.AddData(AAKaaSTVCreatePost)
errInitConn := conn.InitAAKaaS("", "dummyUser", "dummyPassword", &mc)
errInitConn := conn.InitAAKaaS("", "dummyUser", "dummyPassword", &mc, "")
assert.NoError(t, errInitConn)

errInitTV := targetVector.InitNew(&addonDescriptor)
Expand All @@ -171,7 +171,7 @@ func TestTargetVectorPublish(t *testing.T) {
mc := abapbuild.NewMockClient()
mc.AddData(AAKaaSHead)
mc.AddData(AAKaaSTVPublishTestPost)
errInitConn := conn.InitAAKaaS("", "dummyUser", "dummyPassword", &mc)
errInitConn := conn.InitAAKaaS("", "dummyUser", "dummyPassword", &mc, "")
assert.NoError(t, errInitConn)

//act
Expand Down
Loading

0 comments on commit c0e56d2

Please sign in to comment.