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

[ISSUE #6140]Use apache/rocketmq-ci docker repo in CI #6135

Merged
merged 22 commits into from
Feb 21, 2023
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
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
32 changes: 26 additions & 6 deletions .github/workflows/pr-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
types:
- completed

env:
DOCKER_REPO: apache/rocketmq-ci

jobs:
docker:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -50,14 +53,20 @@ jobs:
repository: apache/rocketmq-docker.git
ref: master
path: rocketmq-docker
- name: docker-login
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and save docker images
id: build-images
run: |
cd rocketmq-docker/image-build-ci
version=${{ github.event.pull_request.number || github.ref_name }}-$(uuidgen)
mkdir versionlist
touch versionlist/"${version}-`echo ${{ matrix.base-image }} | sed -e "s/:/-/g"`"
sh ./build-image-local.sh ${version} ${{ matrix.base-image }} ${{ matrix.java-version }} "cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com/cicd/rocketmq" ${{ secrets.DOCKER_REPO_USERNAME }} ${{ secrets.DOCKER_REPO_PASSWORD }}
sh ./build-image-local.sh ${version} ${{ matrix.base-image }} ${{ matrix.java-version }} ${DOCKER_REPO}
- uses: actions/upload-artifact@v3
name: Upload distribution tar
with:
Expand Down Expand Up @@ -94,18 +103,29 @@ jobs:
matrix:
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
steps:
- uses: alibaba/cloud-native-test-ci-tool@v0.0.1
- uses: alibaba/cloud-native-test-ci-tool@v1
name: Deploy rocketmq
with:
action: "deploy"
ask-config: "${{ secrets.ASK_CONFIG }}"
test-version: "${{ matrix.version }}"
docker-repo-username: "${{ secrets.DOCKER_REPO_USERNAME }}"
docker-repo-password: "${{ secrets.DOCKER_REPO_PASSWORD }}"
chart-git: "https://ghproxy.com/https://github.com/apache/rocketmq-docker.git"
chart-branch: "master"
chart-path: "./rocketmq-k8s-helm"
job-id: ${{ strategy.job-index }}
helm-values: |
nameserver:
image:
repository: ${{env.DOCKER_REPO}}
tag: ${{ matrix.version }}
broker:
image:
repository: ${{env.DOCKER_REPO}}
tag: ${{ matrix.version }}
proxy:
image:
repository: ${{env.DOCKER_REPO}}
tag: ${{ matrix.version }}
e2e-test:
if: ${{ success() }}
Expand All @@ -117,7 +137,7 @@ jobs:
matrix:
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
steps:
- uses: alibaba/cloud-native-test-ci-tool@v0.0.1
- uses: alibaba/cloud-native-test-ci-tool@v1
name: e2e test
with:
action: "test"
Expand Down Expand Up @@ -154,7 +174,7 @@ jobs:
matrix:
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
steps:
- uses: alibaba/cloud-native-test-ci-tool@v0.0.1
- uses: alibaba/cloud-native-test-ci-tool@v1
name: clean
with:
action: "clean"
Expand Down
33 changes: 25 additions & 8 deletions .github/workflows/push-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ concurrency:

env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120

DOCKER_REPO: apache/rocketmq-ci

jobs:
dist-tar:
name: Build dist tar
Expand Down Expand Up @@ -56,14 +57,20 @@ jobs:
with:
name: rocketmq
path: rocketmq
- name: docker-login
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and save docker images
id: build-images
run: |
cd rocketmq-docker/image-build-ci
version=${{ github.event.pull_request.number || github.ref_name }}-$(uuidgen)
mkdir versionlist
touch versionlist/"${version}-`echo ${{ matrix.base-image }} | sed -e "s/:/-/g"`"
sh ./build-image-local.sh ${version} ${{ matrix.base-image }} ${{ matrix.java-version }} "cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com/cicd/rocketmq" ${{ secrets.DOCKER_REPO_USERNAME }} ${{ secrets.DOCKER_REPO_PASSWORD }}
sh ./build-image-local.sh ${version} ${{ matrix.base-image }} ${{ matrix.java-version }} ${DOCKER_REPO}
- uses: actions/upload-artifact@v3
name: Upload distribution tar
with:
Expand Down Expand Up @@ -101,19 +108,29 @@ jobs:
matrix:
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
steps:
- uses: alibaba/cloud-native-test-ci-tool@v0.0.1
- uses: alibaba/cloud-native-test-ci-tool@v1
name: Deploy rocketmq
with:
action: "deploy"
ask-config: "${{ secrets.ASK_CONFIG }}"
test-version: "${{ matrix.version }}"
docker-repo-username: "${{ secrets.DOCKER_REPO_USERNAME }}"
docker-repo-password: "${{ secrets.DOCKER_REPO_PASSWORD }}"
chart-git: "https://ghproxy.com/https://github.com/apache/rocketmq-docker.git"
chart-branch: "master"
chart-path: "./rocketmq-k8s-helm"
job-id: ${{ strategy.job-index }}

helm-values: |
nameserver:
image:
repository: ${{env.DOCKER_REPO}}
tag: ${{ matrix.version }}
broker:
image:
repository: ${{env.DOCKER_REPO}}
tag: ${{ matrix.version }}
proxy:
image:
repository: ${{env.DOCKER_REPO}}
tag: ${{ matrix.version }}
e2e-test:
if: ${{ success() }}
name: E2E Test
Expand All @@ -124,7 +141,7 @@ jobs:
matrix:
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
steps:
- uses: alibaba/cloud-native-test-ci-tool@v0.0.1
- uses: alibaba/cloud-native-test-ci-tool@v1
name: e2e test
with:
action: "test"
Expand Down Expand Up @@ -160,7 +177,7 @@ jobs:
matrix:
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
steps:
- uses: alibaba/cloud-native-test-ci-tool@v0.0.1
- uses: alibaba/cloud-native-test-ci-tool@v1
name: clean
with:
action: "clean"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Apache RocketMQ
## Apache RocketMQ

[![Build Status][maven-build-image]][maven-build-url]
[![CodeCov][codecov-image]][codecov-url]
Expand Down