Skip to content

Commit

Permalink
APIGOV-28713 - add dataplane type in root init (#263)
Browse files Browse the repository at this point in the history
* APIGOV-28713 - add dataplane type in root init

* APIGOV-28713 - add agent name in build args
  • Loading branch information
jcollins-axway authored Sep 6, 2024
1 parent 7c37c60 commit cf85b2b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ build-discovery:
-ldflags="-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildTime=${TIME}' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildVersion=${VERSION}' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildCommitSha=${COMMIT_ID}' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.SDKBuildVersion=${SDK_VERSION}'" \
-X 'github.com/Axway/agent-sdk/pkg/cmd.SDKBuildVersion=${SDK_VERSION}' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildAgentName=MulesoftDiscoveryAgent'" \
-o bin/discovery ./cmd/discovery/main.go
@echo "discovery agent binary placed at bin/discovery"

Expand All @@ -69,7 +70,8 @@ build-traceability:
-ldflags="-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildTime=${TIME}' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildVersion=${VERSION}' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildCommitSha=${COMMIT_ID}' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.SDKBuildVersion=${SDK_VERSION}'" \
-X 'github.com/Axway/agent-sdk/pkg/cmd.SDKBuildVersion=${SDK_VERSION}' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildAgentName=MulesoftTraceabilityAgent'" \
-o bin/traceability ./cmd/traceability/main.go
@echo "traceability agent binary placed at bin/traceability"

Expand Down
5 changes: 5 additions & 0 deletions pkg/cmd/discovery/root.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package discovery

import (
"github.com/Axway/agent-sdk/pkg/apic"
"github.com/Axway/agent-sdk/pkg/migrate"
"github.com/Axway/agent-sdk/pkg/util"
"github.com/Axway/agent-sdk/pkg/util/log"
Expand Down Expand Up @@ -36,6 +37,10 @@ func init() {
run, // Callback for executing the agent
corecfg.DiscoveryAgent, // Agent Type (Discovery or Traceability)
)

// set the dataplane type that will be added to the agent spec
corecfg.AgentDataPlaneType = apic.Mulesoft.String()

config.AddConfigProperties(RootCmd.GetProperties())

migrate.MatchAttr(
Expand Down
5 changes: 5 additions & 0 deletions pkg/cmd/traceability/root.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package traceability

import (
"github.com/Axway/agent-sdk/pkg/apic"
corecmd "github.com/Axway/agent-sdk/pkg/cmd"
"github.com/Axway/agent-sdk/pkg/cmd/service"
corecfg "github.com/Axway/agent-sdk/pkg/config"
Expand Down Expand Up @@ -37,6 +38,10 @@ func init() {
run,
corecfg.TraceabilityAgent,
)

// set the dataplane type that will be added to the agent spec
corecfg.AgentDataPlaneType = apic.Mulesoft.String()

config.AddConfigProperties(RootCmd.GetProperties())
RootCmd.AddCommand(service.GenServiceCmd("pathConfig"))
}
Expand Down

0 comments on commit cf85b2b

Please sign in to comment.