forked from admin/brencher
feat(configs): add hermes_voice_gateway stack
Deploys the voice-gateway compose from Org1/hermes-voice-gateway (fork in hermes/hermes-voice-gateway). Image is built by Gitea Actions on tag push and published to gitea.rudolf.keenetic.link/hermes/hermes-voice-gateway under semver tags, so buildDocker=None and version is hardcoded to v0.1.1 instead of auto-<sha>. Bumping the release means updating this constant plus the compose.yaml image tag in Org1/hermes-voice-gateway.
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
from enironment import Environment
|
||||
from steps.checks import SimpleLog, UrlCheck
|
||||
from steps.docker import DockerComposeBuild, DockerSwarmCheck, DockerSwarmDeploy
|
||||
from steps.git import GitClone, CheckoutMerged, GitUnmerge
|
||||
from steps.shared_state import SharedStateHolderInMemory
|
||||
|
||||
# Voice gateway image is built by Gitea Actions in Org1/hermes-voice-gateway
|
||||
# (release workflow on tag push -> gitea.rudolf.keenetic.link/hermes/hermes-voice-gateway:<tag>).
|
||||
# brencher only deploys; buildDocker is None, no local image build.
|
||||
# version is hardcoded to v0.1.1 instead of "auto-<sha>" because the image is
|
||||
# published under a semver tag by Gitea Actions, not auto-<sha>. When bumping
|
||||
# the voice-gateway release, update this string AND the compose.yaml image tag.
|
||||
VOICE_GATEWAY_VERSION = "v0.1.1"
|
||||
|
||||
clone = GitClone(remotes=[
|
||||
{"name": "gitea_hermes", "url": "https://gitea.rudolf.keenetic.link/hermes/hermes-voice-gateway"},
|
||||
{"name": "gitea_org1", "url": "https://gitea.rudolf.keenetic.link/Org1/hermes-voice-gateway"},
|
||||
])
|
||||
|
||||
dockerSwarmCheck = DockerSwarmCheck(
|
||||
stack_name="hermes_voice_gateway",
|
||||
)
|
||||
unmerge = GitUnmerge(clone, dockerSwarmCheck)
|
||||
|
||||
state = SharedStateHolderInMemory(unmerge=None)
|
||||
|
||||
checkoutMerged = CheckoutMerged(clone,
|
||||
desired_branches=state,
|
||||
push=False,
|
||||
git_user_email="rudolfss13@gmail.com",
|
||||
git_user_name="brencher_bot",
|
||||
)
|
||||
|
||||
deployDocker = DockerSwarmDeploy(
|
||||
wd=clone,
|
||||
buildDocker=None,
|
||||
stackChecker=dockerSwarmCheck,
|
||||
envs=lambda: {
|
||||
"version": VOICE_GATEWAY_VERSION,
|
||||
},
|
||||
stack_name="hermes_voice_gateway",
|
||||
docker_compose_path="compose.yaml",
|
||||
)
|
||||
|
||||
checkPing = UrlCheck(
|
||||
url="http://voice-gateway.keenetic.link:8765/healthz",
|
||||
expected={},
|
||||
)
|
||||
|
||||
logUrls = SimpleLog(message={
|
||||
"userLinks": {
|
||||
"Voice gateway": "http://voice-gateway.keenetic.link:8765/",
|
||||
},
|
||||
})
|
||||
|
||||
__all__ = ["hermes_voice_gateway"]
|
||||
hermes_voice_gateway = Environment(
|
||||
id="hermes_voice_gateway",
|
||||
state=state,
|
||||
pipeline=[
|
||||
clone,
|
||||
state,
|
||||
checkoutMerged,
|
||||
dockerSwarmCheck,
|
||||
unmerge,
|
||||
deployDocker,
|
||||
checkPing,
|
||||
logUrls,
|
||||
],
|
||||
)
|
||||
Reference in New Issue
Block a user