Skip to content

Commit

Permalink
chore(ci): migrate release pipeline (#3070)
Browse files Browse the repository at this point in the history
migrate release pipeline from Github Action to Buildkite.
  • Loading branch information
huangjw806 authored Jun 8, 2022
1 parent 5a5bd55 commit 47160d8
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
![RisingWave Logo](./docs/images/logo-title.svg)

[![Slack](https://badgen.net/badge/Slack/Join%20RisingWave/0abd59?icon=slack)](https://join.slack.com/t/risingwave-community/shared_invite/zt-120rft0mr-d8uGk3d~NZiZAQWPnElOfw)
[![CI](https://github.com/singularity-data/risingwave/actions/workflows/main.yml/badge.svg)](https://github.com/singularity-data/risingwave/actions/workflows/main.yml)
[![Build status](https://badge.buildkite.com/9394d2bca0f87e2e97aa78b25f765c92d4207c0b65e7f6648f.svg)](https://buildkite.com/singularity-data/main)
[![codecov](https://codecov.io/gh/singularity-data/risingwave/branch/main/graph/badge.svg?token=EB44K9K38B)](https://codecov.io/gh/singularity-data/risingwave)

Expand Down
24 changes: 24 additions & 0 deletions ci/scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Exits as soon as any line fails.
set -euo pipefail

echo "--- Install gh cli"
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | \
dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | \
tee /etc/apt/sources.list.d/github-cli.list > /dev/null
apt update -yy && apt install gh -yy

echo "--- Release create"
gh release create "${BUILDKITE_TAG}" --generate-notes -d -p

echo "--- Download artifacts"
mkdir -p target/debug && cd target/debug
buildkite-agent artifact download risingwave-release .
mv risingwave-release risingwave
chmod +x risingwave
tar -czvf risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz risingwave

echo "--- Release upload asset"
gh release upload "${BUILDKITE_TAG}" risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz
17 changes: 17 additions & 0 deletions ci/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,20 @@ steps:
- shellcheck#v1.2.0:
files: ./**/*.sh
timeout_in_minutes: 10

- label: "release"
command: "ci/scripts/release.sh"
if: build.tag != null
depends_on: "build"
plugins:
- seek-oss/aws-sm#v2.3.1:
env:
GITHUB_TOKEN: github-token
- docker-compose#v3.9.0:
run: rw-build-env
config: ci/docker-compose.yml
mount-buildkite-agent: true
environment:
- GITHUB_TOKEN
- BUILDKITE_TAG
timeout_in_minutes: 5

0 comments on commit 47160d8

Please sign in to comment.