Repository navigation
Make the control repo branch configurable - #209
Merged
Merged
Conversation
Add a `control_branch` parameter to the `basic_aio` plan (defaulting to `production`) and a matching `CONTROL_BRANCH` variable to the Vagrantfile. With `control_repo`, the plan checks that r10k deployed the branch's environment and sets `environment` in every target's `[agent]` section of puppet.conf before the first agent runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
control_branchparameter to thebasic_aioplan, defaulting toproduction, and a matchingCONTROL_BRANCHvariable to the Vagrantfile. This lets an environment run a branch other thanproduction, such as a PR branch in CI. That's the next step, in a separate PR.With
control_repo, the plan:puppet config set environment <branch> --section agenton every target before the first agent run, so both the first runs and the puppet service use that environment.The branch has to be a valid environment name, meaning letters, digits, and underscores. Both the plan parameter and the Vagrantfile check this. r10k would otherwise skip a branch like
my-featureor deploy it under a different name. The README notes that the control repo still needs aproductionbranch, because the server fails to process reports without that environment. #210's CI turned this up.basic_aio::preflightaccepts the parameter so command lines still work with only the plan name changed.Testing
CONTROL_BRANCH=ci_test vagrant upon a clone with a localci_testbranch builtproductionandci_testenvironments. Bothpuppetandagenthaveenvironment = ci_testand reportUsing environment 'ci_test', and a second agent run on each exited 0.CONTROL_BRANCH=no_such_branch vagrant provisionfailed with "The control repo has no no_such_branch branch" before changing the agents.bolt plan showparses both plans.🤖 Generated with Claude Code