chore(autotest): build broker 5.0 packges
This commit is contained in:
parent
167de6c975
commit
9a9a26a9a0
|
@ -398,121 +398,123 @@ jobs:
|
||||||
# file: source/deploy/docker/Dockerfile
|
# file: source/deploy/docker/Dockerfile
|
||||||
# context: source
|
# context: source
|
||||||
#
|
#
|
||||||
# delete-artifact:
|
delete-artifact:
|
||||||
#
|
|
||||||
# runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
# strategy:
|
strategy:
|
||||||
# matrix:
|
matrix:
|
||||||
# otp:
|
otp:
|
||||||
# - 23.2.7.2-emqx-2
|
- 23.2.7.2-emqx-2
|
||||||
# - 24.1.1-emqx-1
|
- 24.1.1-emqx-1
|
||||||
# needs: [prepare, mac, linux, docker]
|
# needs: [prepare, mac, linux, docker]
|
||||||
# steps:
|
needs: [mac]
|
||||||
# - uses: geekyeggo/delete-artifact@v1
|
steps:
|
||||||
# with:
|
- uses: geekyeggo/delete-artifact@v1
|
||||||
# name: source-${{ matrix.otp }}
|
with:
|
||||||
#
|
name: source-${{ matrix.otp }}
|
||||||
# upload:
|
|
||||||
# runs-on: ubuntu-20.04
|
upload:
|
||||||
#
|
runs-on: ubuntu-20.04
|
||||||
# if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
#
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
|
||||||
# needs: [prepare, mac, linux, docker]
|
# needs: [prepare, mac, linux, docker]
|
||||||
#
|
needs: [mac]
|
||||||
# strategy:
|
|
||||||
# matrix:
|
strategy:
|
||||||
# profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
|
matrix:
|
||||||
# otp:
|
profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
|
||||||
# - 24.1.1-emqx-1
|
otp:
|
||||||
#
|
- 24.1.1-emqx-1
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v2
|
steps:
|
||||||
# - name: get_version
|
- uses: actions/checkout@v2
|
||||||
# run: |
|
- name: get_version
|
||||||
# echo 'version<<EOF' >> $GITHUB_ENV
|
run: |
|
||||||
# echo ${{ github.ref }} | sed -r "s ^refs/heads/|^refs/tags/(.*) \1 g" >> $GITHUB_ENV
|
echo 'version<<EOF' >> $GITHUB_ENV
|
||||||
# echo 'EOF' >> $GITHUB_ENV
|
echo ${{ github.ref }} | sed -r "s ^refs/heads/|^refs/tags/(.*) \1 g" >> $GITHUB_ENV
|
||||||
# - uses: actions/download-artifact@v2
|
echo 'EOF' >> $GITHUB_ENV
|
||||||
# with:
|
- uses: actions/download-artifact@v2
|
||||||
# name: ${{ matrix.profile }}-${{ matrix.otp }}
|
with:
|
||||||
# path: ./_packages/${{ matrix.profile }}
|
name: ${{ matrix.profile }}-${{ matrix.otp }}
|
||||||
# - name: install dos2unix
|
path: ./_packages/${{ matrix.profile }}
|
||||||
# run: sudo apt-get update && sudo apt install -y dos2unix
|
- name: install dos2unix
|
||||||
# - name: get packages
|
run: sudo apt-get update && sudo apt install -y dos2unix
|
||||||
# run: |
|
- name: get packages
|
||||||
# set -e -u
|
run: |
|
||||||
# cd _packages/${{ matrix.profile }}
|
set -e -u
|
||||||
# for var in $( ls |grep emqx |grep -v sha256); do
|
cd _packages/${{ matrix.profile }}
|
||||||
# dos2unix $var.sha256
|
for var in $( ls |grep emqx |grep -v sha256); do
|
||||||
# echo "$(cat $var.sha256) $var" | sha256sum -c || exit 1
|
dos2unix $var.sha256
|
||||||
# done
|
echo "$(cat $var.sha256) $var" | sha256sum -c || exit 1
|
||||||
# cd -
|
done
|
||||||
# - name: upload aws s3
|
cd -
|
||||||
# run: |
|
- name: upload aws s3
|
||||||
# set -e -u
|
run: |
|
||||||
# if [ "${{ matrix.profile }}" == "emqx" ];then
|
set -e -u
|
||||||
# broker="emqx-ce"
|
if [ "${{ matrix.profile }}" == "emqx" ];then
|
||||||
# else
|
broker="emqx-ce"
|
||||||
# broker=${{ matrix.profile }}
|
else
|
||||||
# fi
|
broker=${{ matrix.profile }}
|
||||||
# aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
|
fi
|
||||||
# aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
# aws configure set default.region ${{ secrets.AWS_DEFAULT_REGION }}
|
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
#
|
aws configure set default.region ${{ secrets.AWS_DEFAULT_REGION }}
|
||||||
# aws s3 cp --recursive _packages/${{ matrix.profile }} s3://${{ secrets.AWS_S3_BUCKET }}/$broker/${{ env.version }}
|
|
||||||
# aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_ID }} --paths "/$broker/${{ env.version }}/*"
|
aws s3 cp --recursive _packages/${{ matrix.profile }} s3://${{ secrets.AWS_S3_BUCKET }}/$broker/${{ env.version }}
|
||||||
# - uses: Rory-Z/upload-release-asset@v1
|
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_ID }} --paths "/$broker/${{ env.version }}/*"
|
||||||
# if: github.event_name == 'release' && matrix.profile != 'emqx-ee'
|
- uses: Rory-Z/upload-release-asset@v1
|
||||||
# with:
|
if: github.event_name == 'release' && matrix.profile != 'emqx-ee'
|
||||||
# repo: emqx
|
with:
|
||||||
# path: "_packages/${{ matrix.profile }}/emqx-*"
|
repo: emqx
|
||||||
# token: ${{ github.token }}
|
path: "_packages/${{ matrix.profile }}/emqx-*"
|
||||||
# - uses: Rory-Z/upload-release-asset@v1
|
token: ${{ github.token }}
|
||||||
# if: github.event_name == 'release' && matrix.profile == 'emqx-ee'
|
- uses: Rory-Z/upload-release-asset@v1
|
||||||
# with:
|
if: github.event_name == 'release' && matrix.profile == 'emqx-ee'
|
||||||
# repo: emqx-enterprise
|
with:
|
||||||
# path: "_packages/${{ matrix.profile }}/emqx-*"
|
repo: emqx-enterprise
|
||||||
# token: ${{ github.token }}
|
path: "_packages/${{ matrix.profile }}/emqx-*"
|
||||||
# - name: update to emqx.io
|
token: ${{ github.token }}
|
||||||
# if: github.event_name == 'release'
|
- name: update to emqx.io
|
||||||
# run: |
|
if: github.event_name == 'release'
|
||||||
# set -e -x -u
|
run: |
|
||||||
# curl -w %{http_code} \
|
set -e -x -u
|
||||||
# --insecure \
|
curl -w %{http_code} \
|
||||||
# -H "Content-Type: application/json" \
|
--insecure \
|
||||||
# -H "token: ${{ secrets.EMQX_IO_TOKEN }}" \
|
-H "Content-Type: application/json" \
|
||||||
# -X POST \
|
-H "token: ${{ secrets.EMQX_IO_TOKEN }}" \
|
||||||
# -d "{\"repo\":\"emqx/emqx\", \"tag\": \"${{ env.version }}\" }" \
|
-X POST \
|
||||||
# ${{ secrets.EMQX_IO_RELEASE_API }}
|
-d "{\"repo\":\"emqx/emqx\", \"tag\": \"${{ env.version }}\" }" \
|
||||||
# - name: update repo.emqx.io
|
${{ secrets.EMQX_IO_RELEASE_API }}
|
||||||
# if: github.event_name == 'release' && endsWith(github.repository, 'enterprise') && matrix.profile == 'emqx-ee'
|
- name: update repo.emqx.io
|
||||||
# run: |
|
if: github.event_name == 'release' && endsWith(github.repository, 'enterprise') && matrix.profile == 'emqx-ee'
|
||||||
# curl --silent --show-error \
|
run: |
|
||||||
# -H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
|
curl --silent --show-error \
|
||||||
# -H "Accept: application/vnd.github.v3+json" \
|
-H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
|
||||||
# -X POST \
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
# -d "{\"ref\":\"v1.0.3\",\"inputs\":{\"version\": \"${{ env.version }}\", \"emqx_ee\": \"true\"}}" \
|
-X POST \
|
||||||
# "https://api.github.com/repos/emqx/emqx-ci-helper/actions/workflows/update_emqx_repos.yaml/dispatches"
|
-d "{\"ref\":\"v1.0.3\",\"inputs\":{\"version\": \"${{ env.version }}\", \"emqx_ee\": \"true\"}}" \
|
||||||
# - name: update repo.emqx.io
|
"https://api.github.com/repos/emqx/emqx-ci-helper/actions/workflows/update_emqx_repos.yaml/dispatches"
|
||||||
# if: github.event_name == 'release' && endsWith(github.repository, 'emqx') && matrix.profile == 'emqx'
|
- name: update repo.emqx.io
|
||||||
# run: |
|
if: github.event_name == 'release' && endsWith(github.repository, 'emqx') && matrix.profile == 'emqx'
|
||||||
# curl --silent --show-error \
|
run: |
|
||||||
# -H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
|
curl --silent --show-error \
|
||||||
# -H "Accept: application/vnd.github.v3+json" \
|
-H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
|
||||||
# -X POST \
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
# -d "{\"ref\":\"v1.0.3\",\"inputs\":{\"version\": \"${{ env.version }}\", \"emqx_ce\": \"true\"}}" \
|
-X POST \
|
||||||
# "https://api.github.com/repos/emqx/emqx-ci-helper/actions/workflows/update_emqx_repos.yaml/dispatches"
|
-d "{\"ref\":\"v1.0.3\",\"inputs\":{\"version\": \"${{ env.version }}\", \"emqx_ce\": \"true\"}}" \
|
||||||
# - name: update homebrew packages
|
"https://api.github.com/repos/emqx/emqx-ci-helper/actions/workflows/update_emqx_repos.yaml/dispatches"
|
||||||
# if: github.event_name == 'release' && endsWith(github.repository, 'emqx') && matrix.profile == 'emqx'
|
- name: update homebrew packages
|
||||||
# run: |
|
if: github.event_name == 'release' && endsWith(github.repository, 'emqx') && matrix.profile == 'emqx'
|
||||||
# if [ -z $(echo $version | grep -oE "(alpha|beta|rc)\.[0-9]") ]; then
|
run: |
|
||||||
# curl --silent --show-error \
|
if [ -z $(echo $version | grep -oE "(alpha|beta|rc)\.[0-9]") ]; then
|
||||||
# -H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
|
curl --silent --show-error \
|
||||||
# -H "Accept: application/vnd.github.v3+json" \
|
-H "Authorization: token ${{ secrets.CI_GIT_TOKEN }}" \
|
||||||
# -X POST \
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
# -d "{\"ref\":\"v1.0.3\",\"inputs\":{\"version\": \"${{ env.version }}\"}}" \
|
-X POST \
|
||||||
# "https://api.github.com/repos/emqx/emqx-ci-helper/actions/workflows/update_emqx_homebrew.yaml/dispatches"
|
-d "{\"ref\":\"v1.0.3\",\"inputs\":{\"version\": \"${{ env.version }}\"}}" \
|
||||||
# fi
|
"https://api.github.com/repos/emqx/emqx-ci-helper/actions/workflows/update_emqx_homebrew.yaml/dispatches"
|
||||||
# - uses: geekyeggo/delete-artifact@v1
|
fi
|
||||||
# with:
|
- uses: geekyeggo/delete-artifact@v1
|
||||||
# name: ${{ matrix.profile }}
|
with:
|
||||||
|
name: ${{ matrix.profile }}
|
||||||
|
|
Loading…
Reference in New Issue