Skip to content

Commit

Permalink
feat: run CI and mergify on release-pismo (#6338)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofman committed Sep 28, 2022
1 parent d7c97fe commit cf973d0
Show file tree
Hide file tree
Showing 10 changed files with 122 additions and 10 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/after-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# Require branches to be up to date before merging
on:
push:
branches: [master] # $default-branch
branches:
# $default-branch
- master
- release-pismo

jobs:
build:
Expand Down Expand Up @@ -49,10 +52,17 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: check credentials
run: npm whoami
- name: publish to NPM dev tag
- name: publish to NPM tag
run: |
if [ "${{ github.ref_name }}" = "release-pismo" ]; then
# A pismo dev release.
TAG=pismo-dev
else
# Just a dev release.
TAG=dev
fi
yarn lerna publish --conventional-prerelease --canary --exact \
--dist-tag=dev --preid=dev-$(git rev-parse --short=7 HEAD) \
--dist-tag=$TAG --preid=$TAG-$(git rev-parse --short=7 HEAD) \
--no-push --no-verify-access --yes
- name: notify on failure
if: failure()
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ag-solo-xs.yml.DISABLED
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ name: ag-solo on xs

on:
push:
branches: [master] # $default-branch
branches:
# $default-branch
- master
- release-pismo

jobs:
xs-build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deployment-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
push:
branches:
- master
- release-pismo
- beta
tags:
- '@agoric/sdk@*'
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: Build release Docker Images

on:
push:
branches: [master] # $default-branch
branches:
# $default-branch
- master
- release-pismo
tags:
- '@agoric/sdk@*'
workflow_dispatch:
Expand Down Expand Up @@ -58,11 +61,17 @@ jobs:
SDK_TAG=$(echo "${{ github.ref_name }}" | sed -ne 's!^@agoric/sdk@!!p')
case $SDK_TAG in
"")
# Just a dev release.
DOCKER_TAGS=dev
if [ "${{ github.ref_name }}" = "release-pismo" ]; then
# A pismo dev release.
DOCKER_TAGS=pismo-dev
else
# Just a dev release.
DOCKER_TAGS=dev
fi
;;
*)
# A tagged SDK release.
# The commit may or may not be a descendant of the current master branch
DOCKER_TAGS="latest $SDK_TAG"
;;
esac
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ on:
push:
tags:
- v*
branches: [master] # $default-branch
branches:
# $default-branch
- master
- release-pismo
pull_request:
permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- master
- release-pismo
- beta
pull_request:
types:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/pre-check-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ jobs:
if: >-
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'force:integration') || (
(github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'beta') &&
(
github.event.pull_request.base.ref == 'master' ||
github.event.pull_request.base.ref == 'release-pismo' ||
github.event.pull_request.base.ref == 'beta'
) &&
github.event.pull_request.draft == false &&
(
contains(github.event.pull_request.labels.*.name, 'automerge:squash') ||
Expand Down
80 changes: 80 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,33 @@ queue_rules:
# - check-success=getting-started (local-npm)
# - check-neutral=getting-started (local-npm)
# - check-skipped=getting-started (local-npm)
- name: pismo
conditions:
- base=release-pismo
# Require integration tests before merging only
- or:
- label=bypass:integration
- check-success=deployment-test
- check-neutral=deployment-test
- check-skipped=deployment-test
- or:
- label=bypass:integration
- check-skipped=getting-started
- check-success=getting-started (link-cli)
- check-neutral=getting-started (link-cli)
- check-skipped=getting-started (link-cli)
# FIXME: Enable this section to validate NPM deploys...
#- or:
# - label=bypass:integration
# - check-skipped=getting-started
# - check-success=getting-started (local-npm)
# - check-neutral=getting-started (local-npm)
# - check-skipped=getting-started (local-npm)

pull_request_rules:
- name: merge to master
conditions:
- base=master
- label=automerge:merge
- or:
- check-success=wait-integration-pre-checks
Expand All @@ -43,6 +66,7 @@ pull_request_rules:
method: merge
- name: rebase updates then merge to master
conditions:
- base=master
- label=automerge:rebase
- or:
- check-success=wait-integration-pre-checks
Expand All @@ -61,6 +85,7 @@ pull_request_rules:
update_method: rebase
- name: squash to master
conditions:
- base=master
- label=automerge:squash
- or:
- check-success=wait-integration-pre-checks
Expand All @@ -76,3 +101,58 @@ pull_request_rules:
queue:
name: main
method: squash
- name: merge to release-pismo
conditions:
- base=release-pismo
- label=automerge:merge
- or:
- check-success=wait-integration-pre-checks
- label=bypass:integration
- or:
- and: # breakage succeeds like we thought
- check-success=breakage
- -label=proto:expect-breakage
- and: # breakage fails like we thought
- check-failure=breakage
- label=proto:expect-breakage
actions:
queue:
name: pismo
method: merge
- name: rebase updates then merge to release-pismo
conditions:
- base=release-pismo
- label=automerge:rebase
- or:
- check-success=wait-integration-pre-checks
- label=bypass:integration
- or:
- and: # breakage succeeds like we thought
- check-success=breakage
- -label=proto:expect-breakage
- and: # breakage fails like we thought
- check-failure=breakage
- label=proto:expect-breakage
actions:
queue:
name: pismo
method: merge
update_method: rebase
- name: squash to release-pismo
conditions:
- base=release-pismo
- label=automerge:squash
- or:
- check-success=wait-integration-pre-checks
- label=bypass:integration
- or:
- and: # breakage succeeds like we thought
- check-success=breakage
- -label=proto:expect-breakage
- and: # breakage fails like we thought
- check-failure=breakage
- label=proto:expect-breakage
actions:
queue:
name: pismo
method: squash
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Supported Versions

The current `master` branch is supported with security updates.
The current `master` and `release-pismo` branches are supported with security updates.

## Coordinated Vulnerability Disclosure

Expand Down
1 change: 1 addition & 0 deletions golang/cosmos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ NAME := $(shell sed -ne 's/.*"name": "\([^"]*\)".*/\1/p' package.json)
VERSION := $(shell sed -ne 's/.*"version": "\([^"]*\)".*/\1/p' package.json)
GIT_COMMIT = $(shell hash=`git rev-parse --short HEAD 2>/dev/null`; if test -n "$$hash"; then echo $$hash`git diff --quiet || echo -dirty`; else cat git-revision.txt; fi)
PR_TARGET_REPO = ../../.git
# TODO: figure out how to handle other branches like pismo-release
PR_TARGET_BRANCH = master

default: all
Expand Down

0 comments on commit cf973d0

Please sign in to comment.