pctl is a cli tool for interacting with Profiles
For operational documentation please visit the Profiles Documentation.
In order to run CLI commands you need a profiles catalog controller up and running along with its API in a cluster.
To get a local setup clone the Profiles repo and run make local-env
.
This will deploy a local kind cluster with the catalog controller and API running. Once the environment is setup
run the following to use pctl against it:
examples/profile-catalog-source.yaml
file in the profiles repo
kubectl apply -f profiles/examples/profile-catalog-source.yaml
profiles
cluster (kubectl config current-context
should return kind-profiles
)pctl
binary with make build
.In order to keep versioning parity and drift to a minimum with Profiles the following development process must be in place:
pctl
do a replace
to a local location like this: go mod edit -replace github.com/weaveworks/profiles=<profiles location>
This has the benefit of being really simple, but the counter is that the PR checks will fail because this can't build on CI. The better way is to use a dev tag pin if you want CI to be happy as well for most in-place checks and verifications.
There are some manual steps right now, should be streamlined soon.
Steps:
Create a new release notes file:
touch docs/release_notes/<version>.md
Copy-and paste the release notes from the draft on the releases page into this file.
Note: sometimes the release drafter is a bit of a pain, verify that the notes are
correct by doing something like: git log --first-parent tag1..tag2
.
Update the var Version
in pkg/version/release.go
file to be the desired version.
PR the release notes and version bump into main.
Navigate to the Actions
tab and manually trigger the Release
job. When the job finishes verify that:
Note that <version>
must be in the following format: v0.0.1
.
make integration
for integration tests (This will set up the required env, no need to do anything beforehand.
Note: if you have a local-env
running and have created profile catalog sources in it, this will influence your tests.)make unit
for unit testsmake test
to run all testsThere are two configurable values in the integration tests as the time of this writing.
PCTL_TEST_REPOSITORY_URL
-- configures the remote test repository for the create-pr
test. This needs to be a
repository the user has push access to and access to create a pull request in GitHub.GIT_TOKEN
-- it is used by create-pr
test to creating a pull request on GitHub. Without this token the test
doesn't run.See make help
for all development commands.