Skip to content

Commit

Permalink
onboard to oci-factory (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucabello authored Aug 17, 2023
1 parent 4f1b44d commit 240f23f
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 22 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/build-rock.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/pull-request.yaml
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
18 changes: 18 additions & 0 deletions .github/workflows/rock-release-dev.yaml
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: loki
14 changes: 14 additions & 0 deletions .github/workflows/rock-release-oci-factory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Open a PR to OCI Factory

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build:
uses: canonical/observability/.github/workflows/rock-release-oci-factory.yaml@main
secrets: inherit
with:
rock-name: loki
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
uses: canonical/observability/.github/workflows/update-rock.yaml@main
uses: canonical/observability/.github/workflows/rock-update.yaml@main
with:
rock-name: loki
source-repo: grafana/loki
Expand Down
File renamed without changes.
File renamed without changes.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# loki-rock

[![Build ROCK](https://github.com/canonical/loki-rock/actions/workflows/build-rock.yaml/badge.svg)](https://github.com/canonical/loki-rock/actions/workflows/build-rock.yaml)
[![Open a PR to OCI Factory](https://github.com/canonical/loki-rock/actions/workflows/rock-release-oci-factory.yaml/badge.svg)](https://github.com/canonical/loki-rock/actions/workflows/rock-release-oci-factory.yaml)
[![Publish to GHCR:dev](https://github.com/canonical/loki-rock/actions/workflows/rock-release-dev.yaml/badge.svg)](https://github.com/canonical/loki-rock/actions/workflows/rock-release-dev.yaml)
[![Update ROCK](https://github.com/canonical/loki-rock/actions/workflows/rock-update.yaml/badge.svg)](https://github.com/canonical/loki-rock/actions/workflows/rock-update.yaml)

Automation for building a ROCK for Loki. Every fourth hour, the automation checks whether
a new release has been cut in the upstream Loki repo, and if so, creates a pull request with
the new version info.
[ROCKs](https://canonical-rockcraft.readthedocs-hosted.com/en/latest/) for [Loki](https://grafana.com/oss/loki/).
This repository holds all the necessary files to build ROCKs for the upstream versions we support. The Loki ROCK is used by the [loki-k8s-operator](https://github.com/canonical/loki-k8s-operator) charm.

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/loki:dev](https://ghcr.io/canonical/loki:dev), when merging to main, for development purposes.

Once the PR gets merged, a new ROCK is built and published on ghcr.io/canonical/loki.

0 comments on commit 240f23f

Please sign in to comment.