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

[DEV-1096] Improve release processes #304

Merged
merged 142 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
60aad86
[DEV-1096] Play with releases
Mar 24, 2022
4bc6d8a
[DEV-1096] Add file for pointing the end of linting
Mar 24, 2022
ba1078f
[DEV-1096] Move to another action
Mar 24, 2022
a0b04e4
[DEV-1096] fix linter workflow
Mar 24, 2022
8acd74c
[DEV-1096] Move to regexp
Mar 24, 2022
8f471c2
[DEV-1096] Wait for tests for release
Mar 24, 2022
2a020a5
[DEV-1096] fix deps
Mar 24, 2022
380ecd5
[DEV-1096] Debug debian passing
Mar 24, 2022
1e6a2ab
[DEV-1096] Fix jobs in tests
Mar 24, 2022
023ab73
[DEV-1096] Make release jobs
Mar 24, 2022
fdb9998
[DEV-1096] Get rid of debug
Mar 24, 2022
68e6aa1
[DEV-1096] No needs
Mar 24, 2022
3bfdb89
[DEV-1096] Debug
Mar 24, 2022
f7b6239
[DEV-1096] Debug
Mar 24, 2022
2e15721
[DEV-1096] Fix VERSION setting
Mar 24, 2022
73ecdf2
[DEV-1096] Add checkout
Mar 24, 2022
df47a06
[DEV-1096] Fix RCVERSION
Mar 24, 2022
3374f47
[DEV-1096] Add all the steps
Mar 25, 2022
6202859
[DEV-1096] Small fixes
Mar 25, 2022
d46dce6
[DEV-1096] Test real release
Mar 25, 2022
174cfcb
[DEV-1096] Debug release
Mar 25, 2022
7cdcc7b
[DEV-1096] Fix image publishing
Mar 25, 2022
136b48a
[DEV-1096] Fix "wait" jobs
Mar 25, 2022
0f3b95d
[DEV-1096] Small improvements
Mar 25, 2022
ab3fd61
[DEV-1096] Debug linetr
Mar 28, 2022
0776798
[DEV-1096] Fix shellcheck
Mar 28, 2022
bfc2092
[DEV-1096] Remove another quotes
Mar 28, 2022
562810c
[DEV-1096] Fix quotes expanding
Mar 28, 2022
5e63ac0
[DEV-1096] Finalize release checks
Mar 28, 2022
4c0bb9a
[DEV-1096] Add images building for release pipelines too
Mar 28, 2022
f8a127f
[DEV-1096] Move to sha of commit
Mar 28, 2022
149217a
[DEV-1096] Return back gihutb.ref for tests
Mar 29, 2022
f50da5b
[DEV-1096] Comment links checking for debugging
Mar 29, 2022
bf29de6
[DEV-1096] Make it ready to merge
Mar 29, 2022
5de48ff
[DEV-1096] Get links chaeckings back
Mar 30, 2022
1a2a9f1
Update release.yml
ankurdotb Apr 5, 2022
6bfe01a
fix: Only run one instance of linter for specific ref
ankurdotb Apr 7, 2022
de38d0d
chore: Bump Checkout action version
ankurdotb Apr 7, 2022
1e8d5da
fix: Remove broken timeout argument
ankurdotb Apr 7, 2022
f2d5e45
Update lint.yml
ankurdotb Apr 7, 2022
1961682
Update lint.yml
ankurdotb Apr 7, 2022
b1f2c37
Made style consistent throughout Lint action
ankurdotb Apr 7, 2022
ebf4066
Create dispatcher workflow
ankurdotb Apr 8, 2022
bb1fe96
Splitting out build
ankurdotb Apr 8, 2022
de86a4a
Fix YAML formatting errors
ankurdotb Apr 8, 2022
3342581
Remove wait on lint
ankurdotb Apr 8, 2022
64ffa15
Formatting fix
ankurdotb Apr 8, 2022
aaa325a
Specify Go version for linting
ankurdotb Apr 8, 2022
184b807
Update lint.yml
ankurdotb Apr 8, 2022
b40792f
Update lint.yml
ankurdotb Apr 8, 2022
1e15598
Update lint.yml
ankurdotb Apr 8, 2022
ce026a0
Make Ubuntu version consistent
ankurdotb Apr 8, 2022
97904f7
Change test.yml to build.yml
ankurdotb Apr 8, 2022
f1f2fd8
Add a cache for Go setup
ankurdotb Apr 8, 2022
fe82fb3
Add cache to linter
ankurdotb Apr 8, 2022
8b25805
Update lint.yml
ankurdotb Apr 8, 2022
2edf22c
Test removing go setup from build
ankurdotb Apr 8, 2022
5df9661
Update build.yml
ankurdotb Apr 8, 2022
f6595b3
Restore Go setup
ankurdotb Apr 8, 2022
1964ea9
Combine build tarball and Debian into single job
ankurdotb Apr 8, 2022
099463c
Split out tests
ankurdotb Apr 8, 2022
4947dc5
Update build.yml
ankurdotb Apr 8, 2022
c5a9c24
Temporarily turning off Github Actions
ankurdotb Apr 8, 2022
3bfb6a1
Go lint cache debug
ankurdotb Apr 8, 2022
0cf5897
Chore: Added Github CodeQL Action
jay-dee7 Mar 24, 2022
9c55ba1
Incorporating CodeQL into build
ankurdotb Apr 8, 2022
52ca9c1
Update build.yml
ankurdotb Apr 8, 2022
1a2b889
Update build.yml
ankurdotb Apr 8, 2022
74ac1eb
Update build.yml
ankurdotb Apr 8, 2022
08a5df3
Update build-deb.sh
ankurdotb Apr 8, 2022
338c1ce
Added CodeQL test
ankurdotb Apr 8, 2022
e50ac1e
Shift CodeQL to test
ankurdotb Apr 8, 2022
34dac41
Add workflow output
ankurdotb Apr 8, 2022
96394f1
Update build.yml
ankurdotb Apr 8, 2022
f3a35ac
Update build.yml
ankurdotb Apr 8, 2022
c8d7ff6
Update build.yml
ankurdotb Apr 8, 2022
8daec0f
Update build.yml
ankurdotb Apr 8, 2022
6141784
Update build.yml
ankurdotb Apr 8, 2022
da5e4eb
Update build.yml
ankurdotb Apr 8, 2022
d2e00f3
Update build.yml
ankurdotb Apr 8, 2022
c62c64f
Update build.yml
ankurdotb Apr 8, 2022
f65493b
Calling test.yml
ankurdotb Apr 8, 2022
7e91493
Update test.yml
ankurdotb Apr 8, 2022
5e79443
Update test.yml
ankurdotb Apr 8, 2022
4411684
CodeQL fix
ankurdotb Apr 8, 2022
90e81d3
Testing runner permissions
ankurdotb Apr 8, 2022
093346a
Trying to fix setup test
ankurdotb Apr 8, 2022
9940204
Remove cache
ankurdotb Apr 8, 2022
61368bd
Update test.yml
ankurdotb Apr 8, 2022
ce6e2a7
Remove CodeQL from Test workflow
ankurdotb Apr 8, 2022
065dc3b
Update test.yml
ankurdotb Apr 8, 2022
380a11d
Final test
ankurdotb Apr 9, 2022
0c1aa4f
Update test.yml
ankurdotb Apr 9, 2022
37b56db
Update test.yml
ankurdotb Apr 9, 2022
33a4a6e
Update build.yml
ankurdotb Apr 9, 2022
da4acbc
Update test.yml
ankurdotb Apr 9, 2022
aea4392
Update test.yml
ankurdotb Apr 9, 2022
9dff040
Update test.yml
ankurdotb Apr 9, 2022
4d47d2d
Minor copyedits on Test workflow
ankurdotb Apr 9, 2022
1f26075
lint
ankurdotb Apr 9, 2022
46c85f1
Update lint.yml
ankurdotb Apr 9, 2022
d5d4678
Lint
ankurdotb Apr 9, 2022
b95de2f
Save
ankurdotb Apr 9, 2022
df69e31
Fixed chain version number
ankurdotb Apr 11, 2022
f16b12c
Version number
ankurdotb Apr 11, 2022
c9f53a9
build(tooling): DEV-1237 Fix issues with build and test workflows (#309)
ankurdotb Apr 11, 2022
e234ac8
Testing new release pipeline for lint
ankurdotb Apr 11, 2022
d92a102
Fixing SC2126 Shellcheck failure
ankurdotb Apr 11, 2022
64da679
Test releasing stuff
ankurdotb Apr 11, 2022
c7243bc
Testing a different way to set release version
ankurdotb Apr 11, 2022
c11e53e
Another test of release tag
ankurdotb Apr 11, 2022
5bcd77d
Fixing SC2086
ankurdotb Apr 11, 2022
e9f522b
Last try with ncipollo
ankurdotb Apr 11, 2022
22ddf5d
I guess another last try?
ankurdotb Apr 11, 2022
38c1246
Try different way of filtering
ankurdotb Apr 11, 2022
aa2d698
Fix runs on
ankurdotb Apr 11, 2022
f95eb34
Update dispatch.yml
ankurdotb Apr 11, 2022
4c0d912
Update dispatch.yml
ankurdotb Apr 11, 2022
5aae82d
Update dispatch.yml
ankurdotb Apr 11, 2022
ba66372
Fixing 775 permissions
ankurdotb Apr 11, 2022
754ff96
Setting release version differently
ankurdotb Apr 11, 2022
7aa5c71
Trigger build
ankurdotb Apr 11, 2022
8b84dd8
Trigger release
ankurdotb Apr 11, 2022
2458ac8
Update build.yml
ankurdotb Apr 11, 2022
417b621
Update build.yml
ankurdotb Apr 11, 2022
0d1035f
Update build.yml
ankurdotb Apr 11, 2022
b36c2ab
Update build.yml
ankurdotb Apr 11, 2022
5fc2d51
Revert build.yml
ankurdotb Apr 12, 2022
bb072d7
Update build.yml
ankurdotb Apr 12, 2022
c5d9c90
Release tagging
ankurdotb Apr 12, 2022
d9e1555
Fixed artifact path
ankurdotb Apr 12, 2022
cc971e3
Switching release action
ankurdotb Apr 12, 2022
75d4904
Release tag
ankurdotb Apr 12, 2022
fb9cb17
Fixed condition
ankurdotb Apr 12, 2022
13b4387
Update release.yml
ankurdotb Apr 12, 2022
5d5f84a
build(tooling): Fix release artifact version numbers
Apr 12, 2022
f4e5f22
build test
ankurdotb Apr 12, 2022
98ba3a8
Update build.yml
ankurdotb Apr 12, 2022
2002625
Test build
ankurdotb Apr 12, 2022
f48004c
build(tooling): Fix variables in workflow for release versions
Apr 12, 2022
2ae2536
FInal release test
ankurdotb Apr 12, 2022
870bf71
Merge branch 'main' into DEV-1096
ankurdotb Apr 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 130 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: "Build"
on:
workflow_call:
outputs:
VERSION:
description: "Build version number"
value: ${{ jobs.build-binary.outputs.VERSION }}
defaults:
run:
shell: bash


jobs:
go-unit-tests:
name: "Golang unit tests"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.17'

- name: Run Golang unit tests
run: go test -v ./...

build-binary:
name: "Node binary"
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.set-version.outputs.VERSION }}

steps:
- uses: actions/setup-go@v3
with:
go-version: '1.17'

- name: Fetch Golang protoc compiler plugins
env:
GOLANG_PROTOBUF_VERSION: 1.3.5
GOGO_PROTOBUF_VERSION: 1.3.2
GRPC_GATEWAY_VERSION: 1.14.7
# Taken from: tendermintdev/sdk-proto-gen:v0.2
run: |
go get \
github.com/golang/protobuf/protoc-gen-go@v"$GOLANG_PROTOBUF_VERSION" \
github.com/gogo/protobuf/protoc-gen-gogo@v"$GOGO_PROTOBUF_VERSION" \
github.com/gogo/protobuf/protoc-gen-gogofast@v"$GOGO_PROTOBUF_VERSION" \
github.com/gogo/protobuf/protoc-gen-gogofaster@v"$GOGO_PROTOBUF_VERSION" \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v"$GRPC_GATEWAY_VERSION" \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v"$GRPC_GATEWAY_VERSION" \
github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@latest
- name: Install buf
env:
PREFIX: "/usr/local"
VERSION: "1.0.0-rc8"
run: |
curl -sSL "https://github.com/bufbuild/buf/releases/download/v${VERSION}/buf-$(uname -s)-$(uname -m).tar.gz" | \
sudo tar -xvzf - -C "${PREFIX}" --strip-components 1

- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to fetch version

- name: Build node binary
run: |
make proto-gen build

- name: Store artifact
uses: actions/upload-artifact@v3
with:
name: cheqd-noded
path: build/cheqd-noded

- name: Set version number
id: set-version
run: |
VERSION=$(build/cheqd-noded version 2>&1)
echo ::set-output name=VERSION::"$VERSION"
- name: Install fpm
run: |
sudo apt-get install ruby ruby-dev rubygems build-essential
sudo gem install --no-document fpm

- name: Build Debian package
working-directory: ./build-tools
run: |
./build-deb.sh "../build/cheqd-noded"

- name: Store Debian package artifact
uses: actions/upload-artifact@v3
env:
VERSION: ${{ steps.set-version.outputs.VERSION }}
with:
name: cheqd-node_${{ env.VERSION }}_amd64.deb
path: build-tools/output/cheqd-node_${{ env.VERSION }}_amd64.deb

build-docker-images:
name: "Docker images"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to fetch version

- name: Build cheqd-cli Docker image 'cheqd-noded' as entrypoint
# TODO: Get rid of UID and GID
run: docker build --target base -t cheqd-cli -f docker/Dockerfile --build-arg UID="$(id -u)" --build-arg GID="$(id -g)" .

- name: Build cheqd-node Docker image with 'node-start' as entrypoint
run: docker build --target node -t cheqd-node -f docker/Dockerfile --build-arg UID="$(id -u)" --build-arg GID="$(id -g)" .

- name: Save cheqd-cli Docker image
run: docker save -o cheqd-cli-image.tar cheqd-cli

- name: Store cheqd-cli artifact
uses: actions/upload-artifact@v3
with:
name: cheqd-cli-image.tar
path: cheqd-cli-image.tar

- name: Save cheqd-node Docker image
run: docker save -o cheqd-node-image.tar cheqd-node

- name: Store cheqd-node artifact
uses: actions/upload-artifact@v3
with:
name: cheqd-node-image.tar
path: cheqd-node-image.tar
25 changes: 23 additions & 2 deletions .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
name: "Workflow Dispatch"
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on: [ push, workflow_dispatch ]

jobs:

call-lint:
name: "Lint"
uses: ./.github/workflows/lint.yml

call-test:
call-build:
name: "Build"
needs: call-lint
uses: ./.github/workflows/build.yml

call-test:
name: "Test"
needs: call-build
uses: ./.github/workflows/test.yml
with:
VERSION: ${{ needs.call-build.outputs.VERSION }}

call-release:
name: "Release"
needs: [call-test, call-build]
if: startsWith(github.ref, 'refs/tags/v')
uses: ./.github/workflows/release.yml
with:
RELEASE_VERSION: ${{ needs.call-build.outputs.VERSION }}
57 changes: 33 additions & 24 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,64 @@
name: Lint
name: "Lint"
on: workflow_call
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:

sh-euox-pipefail-check:
name: "Lint: Check for 'set -euox pipefail' in shell scripts"
name: "Shell pipefail check"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Check that all shell scripts use 'set -euox pipefail'
run: bash .github/scripts/ensure_set_euox_pipefail.sh

# We can't use VALIDATE_GO from super linter because of this issue:
# https://github.com/github/super-linter/issues/143
go-lint:
name: "Lint: Golang"
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
args: --timeout 5m0s

- name: Run 'set -euox pipefail' check
run: bash ./.github/scripts/ensure_set_euox_pipefail.sh

md-link-check:
name: "Lint: Check for broken Markdown links"
name: "Broken Markdown links"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Check if Markdown links are valid

- name: Run Markdown link check
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: '.github/linters/mlc_config.json'
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'

go-lint:
# We can't use VALIDATE_GO from super linter because of this issue:
# https://github.com/github/super-linter/issues/143
name: "Golang"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version: '1.17'

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
args: --timeout 5m0s

super-lint:
name: "Lint: Super Linter"
name: "Super Linter"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to fetch version

- name: Run Super Linter
uses: github/super-linter/slim@v4
env:
Expand Down
Loading