-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
68 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Pull Requests | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
pull-request: | ||
name: PR | ||
uses: canonical/observability/.github/workflows/rock-pull-request.yaml@main | ||
secrets: inherit |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: "Publish ROCK to GHCR:dev" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
workflow_dispatch: {} | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
uses: canonical/observability/.github/workflows/rock-release-dev.yaml@main | ||
secrets: inherit | ||
with: | ||
rock-name: traefik |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Update ROCK | ||
|
||
on: | ||
workflow_dispatch: {} | ||
schedule: | ||
- cron: '0 0,4,8,12,16,20 * * *' | ||
|
||
jobs: | ||
build: | ||
uses: canonical/observability/.github/workflows/rock-update.yaml@main | ||
with: | ||
rock-name: traefik | ||
source-repo: traefik/traefik | ||
check-go: true | ||
update-script: | | ||
# The caller must provide \$application_src and \$rockcraft_yaml | ||
# \$application_src: The root folder of the cloned upstream project | ||
# \$rockcraft_yaml: Path of the rockcraft.yaml to update | ||
# | ||
## traefik-frontend dependency | ||
source_tag=$(yq .parts.traefik.source-tag) | ||
tag="\$source_tag" yq -i '.parts.traefik-frontend.source-tag = strenv(tag)' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
# traefik-rock | ||
|
||
[![Build ROCK](https://github.com/canonical/traefik-rock/actions/workflows/build-rock.yaml/badge.svg)](https://github.com/canonical/traefik-rock/actions/workflows/build-rock.yaml) | ||
[![Open a PR to OCI Factory](https://github.com/canonical/traefik-rock/actions/workflows/rock-release-oci-factory.yaml/badge.svg)](https://github.com/canonical/traefik-rock/actions/workflows/rock-release-oci-factory.yaml) | ||
[![Publish to GHCR:dev](https://github.com/canonical/traefik-rock/actions/workflows/rock-release-dev.yaml/badge.svg)](https://github.com/canonical/traefik-rock/actions/workflows/rock-release-dev.yaml) | ||
[![Update ROCK](https://github.com/canonical/traefik-rock/actions/workflows/rock-update.yaml/badge.svg)](https://github.com/canonical/traefik-rock/actions/workflows/rock-update.yaml) | ||
|
||
Automation for building a ROCK for Traefik. Every fourth hour, the automation checks whether | ||
a new release has been cut in the upstream Traefik repo, and if so, creates a pull request with | ||
the new version info. | ||
[ROCKs](https://canonical-rockcraft.readthedocs-hosted.com/en/latest/) for [Traefik](https://traefik.io/). | ||
This repository holds all the necessary files to build ROCKs for the upstream versions we support. The Traefik ROCK is used by the [traefik-k8s-operator](https://github.com/canonical/traefik-k8s-operator) charm. | ||
|
||
Once the PR gets merged, a new ROCK is built and published on ghcr.io/canonical/traefik. | ||
The ROCKs on this repository are built with [OCI Factory](https://github.com/canonical/oci-factory/), which also takes care of periodically rebuilding the images. | ||
|
||
Automation takes care of: | ||
* validating PRs, by simply trying to build the ROCK; | ||
* pulling upstream releases, creating a PR with the necessary files to be manually reviewed; | ||
* releasing to GHCR at [ghcr.io/canonical/traefik:dev](https://ghcr.io/canonical/traefik:dev), when merging to main, for development purposes. | ||
|
||
# Manual verification: | ||
``` | ||
rockcraft -v | ||
skopeo --insecure-policy copy oci-archive:traefik_2.9.6_amd64.rock docker-daemon:trfk | ||
docker run --rm -p 8080:8080 trfk | ||
``` | ||
|
||
cleanup: | ||
`docker rmi -f trfk` |