mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-08 18:36:48 +00:00
* Feat(rollout): fill rolloutBatches if empty when scale up/down (#2569) * Feat: fill rolloutBatches if empty * Fix: fix unit-test * Test: add more test Fix: lint Fix: fix lint * Update release.yml (#2537) * Feat: add registry, merge registry and cap center (#2528) * Feat: add registry command * Refactor: comp/trait command combine with registry * Feat: refactor `vela comp/trait` * Fix: import * Fix: fix if type is autodetects.core.oam.dev * Fix: fix list from url * Fix: test * Feat: add test * Fix: remove dup test * Fix: test * Fix: test * Fix: fix label filter * Fix: reviewable * Fix test * fix personal repo in test * Fix test * Fix test * add some boundary check * reviewable * Fix: fix nocalhost trait (#2577) * fix incorrect addon status (#2576) * Fix(cli): client-side throttling in vela CLI (#2581) * fix cli throttling * fix import * set to a lower value * remove addon with no defs (#2574) * Feat: vela logs support multicluster (#2593) * Feat: add basic multiple cluster logs * fix context * Fix select style * Fix select style * remove useless env * fix naming * Feat: vela cluster support use ocm to join/list/detach cluster (#2599) * Feat: add render component and apply component remaining (#2587) * Feat: add render component and apply component remaining * fix ut * fix e2e * allow import package in custom status cue template (#2585) Co-authored-by: chwetion <chwetion@foxmail.com> * Fix: abnormal aux name (#2612) * Feat: store workflow step def properties in cm (#2592) * Fix: fix notification def * Feat: store workflow step def properties in cm * fix ci * fix data race * Fix: change Initializer to Application for addon Observability (#2615) In this doc, updated the Observability implementation from initializer to Application. I also store definitions as it's not well stored in vela-templates/addons/observability * Fix: fix backport param (#2611) * Fix: add owner reference in workflow context cm (#2573) * Fix: add owner reference in workflow context cm * fix ci * delete useless test case * Fix: op.delete bugs (#2622) * Fix: op.delete some bugs * Fix: app status update error Fix: make reviewable * Fix: show reconcile error log (#2626) * Feat: add reconcile timeout configuration for vela-core (#2630) * Fix: patch status retry while conflict happens (#2629) * Fix: allow definition schema cm can be same name in different definition type (#2618) * Fix: fix definition schema cm name * fix ut * fix ut * fix show * add switch default case * Feat: remove envbinding policy into workflow (#2556) Fix: add more test * Feat: add vela prob to test cluster (#2635) * Fix: upgrade stern lib to avoid panic for vela logs (#2650) * Fix: filter loggable workload in vela logs (#2651) * Fix: filter loggable workload in vela logs * reviewable * Feat: add vela exec for multi cluster (#2299) fix support vela exec * Fix: health check will check for multiclusters (#2645) * Fix: minor fix for vela cli printing (#2655) * Fix: minor fix for vela cli printing * add dockerfile go mod cache * Feat: support apiserver-related multicluster features (#2625) * Feat: remove envbinding policy into workflow Feat: add support for env change (env gc) Fix: fix rollout timeout setting bug * Feat: support disable trait and env without workflow * Fix: add hint for replaced value Co-authored-by: wyike <wangyike_wyk@163.com> Co-authored-by: basefas <basefas@hotmail.com> Co-authored-by: qiaozp <47812250+chivalryq@users.noreply.github.com> Co-authored-by: Tianxin Dong <dongtianxin.tx@alibaba-inc.com> Co-authored-by: yangsoon <yangsoonlx@gmail.com> Co-authored-by: Chwetion <137953601@qq.com> Co-authored-by: chwetion <chwetion@foxmail.com> Co-authored-by: Jian.Li <74582607+leejanee@users.noreply.github.com> Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com> Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
145 lines
6.1 KiB
YAML
145 lines
6.1 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch: { }
|
|
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
name: build
|
|
strategy:
|
|
matrix:
|
|
TARGETS: [ linux/amd64, darwin/amd64, windows/amd64, linux/arm64, darwin/arm64 ]
|
|
env:
|
|
VELA_VERSION_KEY: github.com/oam-dev/kubevela/version.VelaVersion
|
|
VELA_GITVERSION_KEY: github.com/oam-dev/kubevela/version.GitRevision
|
|
GO_BUILD_ENV: GO111MODULE=on CGO_ENABLED=0
|
|
DIST_DIRS: find * -type d -exec
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.16
|
|
- name: Get release
|
|
id: get_release
|
|
uses: bruceadams/get-release@v1.2.2
|
|
- name: Get version
|
|
run: echo "VELA_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
|
- name: Get matrix
|
|
id: get_matrix
|
|
run: |
|
|
TARGETS=${{matrix.TARGETS}}
|
|
echo ::set-output name=OS::${TARGETS%/*}
|
|
echo ::set-output name=ARCH::${TARGETS#*/}
|
|
- name: Get ldflags
|
|
id: get_ldflags
|
|
run: |
|
|
LDFLAGS="-s -w -X ${{ env.VELA_VERSION_KEY }}=${{ env.VELA_VERSION }} -X ${{ env.VELA_GITVERSION_KEY }}=git-$(git rev-parse --short HEAD)"
|
|
echo "LDFLAGS=${LDFLAGS}" >> $GITHUB_ENV
|
|
- name: Build
|
|
run: |
|
|
${{ env.GO_BUILD_ENV }} GOOS=${{ steps.get_matrix.outputs.OS }} GOARCH=${{ steps.get_matrix.outputs.ARCH }} \
|
|
go build -ldflags "${{ env.LDFLAGS }}" \
|
|
-o _bin/vela/${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}/vela -v \
|
|
./references/cmd/cli/main.go
|
|
${{ env.GO_BUILD_ENV }} GOOS=${{ steps.get_matrix.outputs.OS }} GOARCH=${{ steps.get_matrix.outputs.ARCH }} \
|
|
go build -ldflags "${{ env.LDFLAGS }}" \
|
|
-o _bin/kubectl-vela/${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}/kubectl-vela -v \
|
|
./cmd/plugin/main.go
|
|
- name: Compress
|
|
run: |
|
|
echo "\n## Release Info\nVERSION: ${{ env.VELA_VERSION }}" >> README.md && \
|
|
echo "GIT_COMMIT: ${GITHUB_SHA}\n" >> README.md && \
|
|
cd _bin/vela && \
|
|
${{ env.DIST_DIRS }} cp ../../LICENSE {} \; && \
|
|
${{ env.DIST_DIRS }} cp ../../README.md {} \; && \
|
|
${{ env.DIST_DIRS }} tar -zcf vela-{}.tar.gz {} \; && \
|
|
${{ env.DIST_DIRS }} zip -r vela-{}.zip {} \; && \
|
|
cd ../kubectl-vela && \
|
|
${{ env.DIST_DIRS }} cp ../../LICENSE {} \; && \
|
|
${{ env.DIST_DIRS }} cp ../../README.md {} \; && \
|
|
${{ env.DIST_DIRS }} tar -zcf kubectl-vela-{}.tar.gz {} \; && \
|
|
${{ env.DIST_DIRS }} zip -r kubectl-vela-{}.zip {} \; && \
|
|
cd .. && \
|
|
sha256sum vela/vela-* kubectl-vela/kubectl-vela-* >> sha256-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.txt \
|
|
- name: Upload Vela tar.gz
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
|
asset_path: ./_bin/vela/vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz
|
|
asset_name: vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz
|
|
asset_content_type: binary/octet-stream
|
|
- name: Upload Vela zip
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
|
asset_path: ./_bin/vela/vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
|
|
asset_name: vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
|
|
asset_content_type: binary/octet-stream
|
|
- name: Upload Kubectl-Vela tar.gz
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
|
asset_path: ./_bin/kubectl-vela/kubectl-vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz
|
|
asset_name: kubectl-vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz
|
|
asset_content_type: binary/octet-stream
|
|
- name: Upload Kubectl-Vela zip
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
|
asset_path: ./_bin/kubectl-vela/kubectl-vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
|
|
asset_name: kubectl-vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
|
|
asset_content_type: binary/octet-stream
|
|
- name: Post sha256
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: sha256sums
|
|
path: ./_bin/sha256-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.txt
|
|
retention-days: 1
|
|
|
|
upload-sha256sums-plugin-homebrew:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
name: upload-sha256sums
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Get release
|
|
id: get_release
|
|
uses: bruceadams/get-release@v1.2.2
|
|
- name: Download sha256sums
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: sha256sums
|
|
- shell: bash
|
|
run: |
|
|
for file in *
|
|
do
|
|
cat ${file} >> sha256sums.txt
|
|
done
|
|
- name: Upload Checksums
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
with:
|
|
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
|
asset_path: sha256sums.txt
|
|
asset_name: sha256sums.txt
|
|
asset_content_type: text/plain
|
|
- name: Update kubectl plugin version in krew-index
|
|
uses: rajatjindal/krew-release-bot@v0.0.38
|
|
- name: Update Homebrew formula
|
|
uses: dawidd6/action-homebrew-bump-formula@v3
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
formula: kubevela
|
|
tag: ${{ github.ref }}
|
|
revision: ${{ github.sha }}
|
|
force: false
|