Skip to content

Commit

Permalink
[ISSUE apache#6140]Use apache/rocketmq-ci docker repo in CI (apache#6135
Browse files Browse the repository at this point in the history
)

* Create pr-ci.yml

* Create pr-e2e-test.yml

* Create push-ci.yml

* Update push-ci.yml

* Update push-ci.yml

* Update pr-ci.yml

* Update README.md

* improve performance

* Update README.md

* Update push-ci.yml

* Create README.md

* modify docker repo

* Update push-ci.yml

* Update pr-e2e-test.yml

* use apache/rocketmq-ci docker repo

* Revert "Create README.md"

This reverts commit be678f1.

---------

Co-authored-by: yueya <102146039+cryptoya@users.noreply.github.com>
Co-authored-by: 月伢 <yuanchen.zyc@alibaba-inc.com>
  • Loading branch information
3 people authored and mxsm committed Feb 23, 2023
1 parent c63219e commit 1e2bf26
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 14 deletions.
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

0 comments on commit 1e2bf26

Please sign in to comment.