Skip to content

Commit 345297c

Browse files
authored
docs: Add RELEASING.md (#1208)
... and move slow Docker build workflows that almost always succeed to a post_merge workflow to reduce CI time for PRs. Signed-off-by: James Alseth <james@jalseth.me>
1 parent 94bb769 commit 345297c

File tree

3 files changed

+90
-48
lines changed

3 files changed

+90
-48
lines changed

.github/workflows/post_merge.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: 'post_merge'
2+
on:
3+
push:
4+
branches:
5+
- 'master'
6+
7+
permissions: {}
8+
9+
jobs:
10+
docker-conftest:
11+
runs-on: ubuntu-latest
12+
env:
13+
IMAGE: openpolicyagent/conftest
14+
PLATFORMS: linux/amd64,linux/arm64
15+
steps:
16+
- name: checkout source
17+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # ratchet:actions/checkout@v5
18+
19+
- name: setup docker buildx
20+
run: docker buildx create --name conftestbuild --use
21+
22+
- name: Build Docker image
23+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # ratchet:docker/build-push-action@v6
24+
with:
25+
context: '.'
26+
push: false
27+
# The foo tag below validates putting one tag per line (like we do in the release flow)
28+
# works as expected.
29+
tags: |
30+
${{ env.IMAGE }}:latest
31+
${{ env.IMAGE }}:foo
32+
platforms: ${{ env.PLATFORMS }}
33+
34+
docker-examples:
35+
runs-on: ubuntu-latest
36+
env:
37+
IMAGE: openpolicyagent/conftest
38+
PLATFORMS: linux/amd64,linux/arm64
39+
steps:
40+
- name: checkout source
41+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # ratchet:actions/checkout@v5
42+
43+
- name: setup docker buildx
44+
run: docker buildx create --name conftestbuild --use
45+
46+
- name: Build Docker image
47+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # ratchet:docker/build-push-action@v6
48+
with:
49+
context: '.'
50+
target: examples
51+
push: false
52+
tags: ${{ env.IMAGE }}:examples
53+
platforms: ${{ env.PLATFORMS }}

.github/workflows/pr.yaml

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@ name: pr
22

33
on: [pull_request]
44

5-
65
permissions: {}
76

8-
env:
9-
IMAGE: openpolicyagent/conftest
10-
PLATFORMS: linux/amd64,linux/arm64
11-
127
jobs:
138
lint:
149
runs-on: ubuntu-latest
@@ -127,46 +122,3 @@ jobs:
127122
- name: test oci push/pull
128123
if: ${{ matrix.os == 'ubuntu-latest' }}
129124
run: ./scripts/push-pull-e2e.sh
130-
131-
docker-conftest:
132-
runs-on: ubuntu-latest
133-
needs:
134-
- validate
135-
steps:
136-
- name: checkout source
137-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v5
138-
139-
- name: setup docker buildx
140-
run: docker buildx create --name conftestbuild --use
141-
142-
- name: Build Docker image
143-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # ratchet:docker/build-push-action@v6
144-
with:
145-
context: .
146-
push: false
147-
# The foo tag below validates putting one tag per line (like we do in the release flow)
148-
# works as expected.
149-
tags: |
150-
${{ env.IMAGE }}:latest
151-
${{ env.IMAGE }}:foo
152-
platforms: ${{ env.PLATFORMS }}
153-
154-
docker-examples:
155-
runs-on: ubuntu-latest
156-
needs:
157-
- validate
158-
steps:
159-
- name: checkout source
160-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v5
161-
162-
- name: setup docker buildx
163-
run: docker buildx create --name conftestbuild --use
164-
165-
- name: Build Docker image
166-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # ratchet:docker/build-push-action@v6
167-
with:
168-
context: .
169-
target: examples
170-
push: false
171-
tags: ${{ env.IMAGE }}:examples
172-
platforms: ${{ env.PLATFORMS }}

RELEASING.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Releasing
2+
3+
conftest releases in the first week of each month, after the new version of Open
4+
Policy Agent is released. Patch releases are not generally created while we are
5+
on v0, but we may create one if there is a blocking bug in a newly released
6+
feature.
7+
8+
## New release
9+
10+
1. Check for any open
11+
[pull requests](https://github.com/open-policy-agent/conftest/pulls) that are
12+
ready to merge, and merge them.
13+
14+
1. Verify that all
15+
[post-merge CI tasks](https://github.com/open-policy-agent/conftest/actions/workflows/post_merge.yaml)
16+
have completed successfully.
17+
18+
1. Check out to the master branch and ensure you have the latest changes.
19+
20+
```sh
21+
git checkout master
22+
git pull
23+
```
24+
25+
1. Determine the next version number, and create a tag. You can check the
26+
[releases](https://github.com/open-policy-agent/conftest/releases) page to
27+
see the previous version if you do not know it.
28+
29+
```sh
30+
git tag v<VERSION>
31+
git push --tags
32+
```
33+
34+
1. Monitor the
35+
[release workflow](https://github.com/open-policy-agent/conftest/actions/workflows/release.yaml)
36+
and verify it does not error. This usually takes ~45min due to slow speeds of
37+
the Docker cross-compiles.

0 commit comments

Comments
 (0)