Skip to content

Commit

Permalink
STAC-21039: Allow unbranded build of agent/cluster agent
Browse files Browse the repository at this point in the history
  • Loading branch information
craffit committed May 13, 2024
1 parent 6ff0f8e commit 00c3320
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tasks/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from .trace_agent import build as trace_agent_build
from .utils import (
REPO_PATH,
BRANDED,
bin_name,
cache_version,
generate_config,
Expand Down Expand Up @@ -1270,7 +1271,8 @@ def omnibus_build(
deps(ctx)

# sts
apply_branding(ctx)
if BRANDED:
apply_branding(ctx)

# base dir (can be overridden through env vars, command line takes precedence)
base_dir = base_dir or os.environ.get("OMNIBUS_BASE_DIR")
Expand Down
5 changes: 4 additions & 1 deletion tasks/cluster_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
load_release_versions,
do_go_rename, # sts
do_sed_rename, # sts
BRANDED, # sts
)

# constants
Expand Down Expand Up @@ -117,7 +118,9 @@ def build(
Example invokation:
inv cluster-agent.build
"""
apply_branding(ctx)
# sts
if BRANDED:
apply_branding(ctx)
build_common(
ctx,
BIN_PATH,
Expand Down
1 change: 1 addition & 0 deletions tasks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# constants
DEFAULT_BRANCH = "master" # sts
GITHUB_ORG = os.getenv('AGENT_GITHUB_ORG') or "StackVista"
BRANDED = GITHUB_ORG == "StackVista"
REPO_NAME = os.getenv('AGENT_REPO_NAME') or "stackstate-agent"
GITHUB_REPO_NAME = f"{GITHUB_ORG}/{REPO_NAME}"
REPO_PATH = f"github.com/{GITHUB_REPO_NAME}"
Expand Down

0 comments on commit 00c3320

Please sign in to comment.