Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI workflow releasing Fleet charts against a test repo #2296

Merged
merged 6 commits into from
Apr 10, 2024

Conversation

weyfonk
Copy link
Contributor

@weyfonk weyfonk commented Apr 5, 2024

This adds new workflow release-against-test-charts.yml, which, when triggered manually:

  1. Builds Fleet images and Rancher-compatible Fleet charts from the provided ref
  2. Pushes Docker images to ttl.sh and charts to a feature branch on the specified test charts repo, using the specified rancher/charts branch as its base.

Created Fleet charts use hard-coded version 999.9.9+up9.9.9 to prevent collisions with existing versions on the base rancher/charts branch.

Refers to #1640.

This has been tested by:

  1. Running this workflow against weyfonk/fleet's master, with default rancher/charts branch dev-v2.9 and default test charts repo fleetrepoci/charts (see output)
  2. Building Rancher 2.9 locally from branch release/v2.9
  3. Installing Rancher in a local k3d cluster as follows:
helm upgrade --install rancher rancher-latest/rancher --devel \
     --namespace cattle-system --create-namespace \
     --set hostname=<url> \
     --set bootstrapPassword=admin \
     --set replicas=1 \
     --set rancherImage=test-tan/rancher --set rancherImageTag=dev \
     --set "extraEnv[0].name=CATTLE_CHART_DEFAULT_URL" --set "extraEnv[0].value=https://github.com/fleetrepoci/charts" \
     --set "extraEnv[1].name=CATTLE_CHART_DEFAULT_BRANCH" --set "extraEnv[1].value=fleetci-dev-v2.8-20240405112731" \
     --set "extraEnv[2].name=CATTLE_FLEET_VERSION" --set "extraEnv[2].value=999.9.9+up9.9.9"

weyfonk added 6 commits April 5, 2024 13:50
This workflow builds Fleet from the specified branch, pushes Docker
images and packages charts with hard-coded version number
`999.9.9+up9.9.9`, which it edits for Rancher compatibility and pushes
to a custom branch on a rharts repository, using the specified
`rancher/charts` branch as its base.

Created Docker images are pushed to ttl.sh [1], with 1h as expiration
time.

This is meant to be eventually used by a separate workflow running tests
against Rancher. In the meantime, it can be used for manual testing,
installing Rancher with flags:
* `CATTLE_CHART_DEFAULT_URL` set to the test charts repo
* `CATTLE_CHART_DEFAULT_BRANCH` set to the branch created by this
  workflow
* `CATTLE_FLEET_VERSION` set to `999.9.9+up9.9.9`

[1]: https://ttl.sh/
Fleet no longer uses image `rancher/gitjob`.
2.9 is the Rancher minor currently being worked on.
That workflow, which has been renamed, would need further edits to
install Rancher pointing to the test charts repo hosting charts for the
Fleet HEAD.
Triggering this workflow on pushes is not needed for now, and was only
used to speed up testing.
@weyfonk weyfonk marked this pull request as ready for review April 5, 2024 12:03
@weyfonk weyfonk requested a review from a team as a code owner April 5, 2024 12:03
@weyfonk weyfonk merged commit f72b45f into rancher:main Apr 10, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants