This is an automated email from the ASF dual-hosted git repository. shenlin pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/rocketmq-eventbridge.git
commit ab2b6e12d784f8d4a0ef3d38ab3db7471be7c070 Author: wangkai <wang...@zhongan.com> AuthorDate: Mon Sep 18 20:00:35 2023 +0800 1.modify maven publish --- .github/workflows/maven-publish.yml | 36 +++++++++++++----------------------- azure-pipelines.yml | 28 +++++++++++++++------------- 2 files changed, 28 insertions(+), 36 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index e49d5f0..e3c3d8c 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -1,34 +1,24 @@ # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path - -name: Maven Package and Publish - -on: - release: - types: [created] +name: Redis runner example +on: push jobs: - build: - + # Label of the runner job + runner-job: + # You must use a Linux environment when using service containers or container jobs runs-on: ubuntu-latest permissions: contents: read packages: write steps: - - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Build with Maven - run: mvn -B package --file pom.xml + # Downloads a copy of the code in your repository before running CI tests + - name: Create RocketMQ container + run: | + docker pull rocketmqinc/rocketmq:4.9.1 + docker run -d --name rocketmq -p 9876:9876 -v /path/to/config:/opt/rocketmq-4.9.4/conf apache/rocketmq:4.9.4 - - name: Publish to GitHub Packages Apache Maven - run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml - env: - GITHUB_TOKEN: ${{ github.token }} + - name: Wait for RocketMQ container to be ready + run: | + docker exec rocketmq sh -c 'while ! nc -z localhost 9876; do sleep 1; done' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f53e97b..b93cf06 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,17 +3,19 @@ # Add steps that build, run tests, deploy, and more: # https://aka.ms/yaml -trigger: -- main +trigger: none -pool: - vmImage: ubuntu-latest - -steps: -- script: echo Hello, world! - displayName: 'Run a one-line script' - -- script: | - echo Add other tasks to build, test, and deploy your project. - echo See https://aka.ms/yaml - displayName: 'Run a multi-line script' +jobs: + - job: RunTest + workspace: + clean: all + pool: + vmImage: 'ubuntu-latest' + steps: + - task: Docker@2 + displayName: Login to ACR + inputs: + command: login + containerRegistry: my-acr + - script: | + docker run my-registry.azurecr.io/somerepo/rnd-hello:latest