You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/10/21 07:47:13 UTC
[shardingsphere] branch master updated: Refactor : integrate the different build job together (#21677)
This is an automated email from the ASF dual-hosted git repository.
zhaojinchao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new ba171ecc7da Refactor : integrate the different build job together (#21677)
ba171ecc7da is described below
commit ba171ecc7da0ed9d686a72b52acc428993c2889f
Author: 孙念君 Nianjun Sun <su...@apache.org>
AuthorDate: Fri Oct 21 15:47:07 2022 +0800
Refactor : integrate the different build job together (#21677)
---
.github/workflows/docker-release.yml | 2 +-
.github/workflows/nightly-build.yml | 36 +++++++++++++++++--
.github/workflows/nightly-graalvm-image.yml | 55 -----------------------------
3 files changed, 34 insertions(+), 59 deletions(-)
diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml
index d8460dff2ac..bffe2fd0b81 100644
--- a/.github/workflows/docker-release.yml
+++ b/.github/workflows/docker-release.yml
@@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- - uses: docker/login-action@v1
+ - uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml
index 207b5a79d9f..ad0ad101650 100644
--- a/.github/workflows/nightly-build.yml
+++ b/.github/workflows/nightly-build.yml
@@ -25,10 +25,11 @@ env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Djacoco.skip=true -DskipITs -DskipTests -Dspotless.apply.skip=true -Drat.skip=true
HUB: ghcr.io/apache/shardingsphere
PROXY: ghcr.io/apache/shardingsphere-proxy
+ PROXY_NATIVE: ghcr.io/apache/shardingsphere-proxy-native
jobs:
upload-to-nightlies:
- if: (github.repository == 'apache/shardingsphere')
+ if: github.repository == 'apache/shardingsphere'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
@@ -57,7 +58,7 @@ jobs:
remote_user: ${{ secrets.NIGHTLIES_RSYNC_USER }}
remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }}
- build-nightly-image:
+ build-proxy-image:
if: github.repository == 'apache/shardingsphere'
runs-on: ubuntu-latest
permissions:
@@ -79,7 +80,7 @@ jobs:
shardingsphere-maven-third-party-cache-
shardingsphere-maven-third-party-
- name: Log in to the Container registry
- uses: docker/login-action@v1.10.0
+ uses: docker/login-action@v2
with:
registry: ${{ env.HUB }}
username: ${{ github.actor }}
@@ -88,3 +89,32 @@ jobs:
- uses: docker/setup-buildx-action@v1
- name: Push docker image
run: ./mvnw -am -pl distribution/proxy -B -Prelease,docker.buildx.push -DskipTests -Dproxy.image.repository=${{ env.PROXY }} -Dproxy.image.tag=${{ github.sha }} clean install
+
+ build-proxy-native-image:
+ if: github.repository == 'apache/shardingsphere'
+ timeout-minutes: 90
+ permissions:
+ contents: read
+ packages: write
+ name: GraalVM Native Image on ${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest]
+ fail-fast: false
+ steps:
+ - uses: actions/checkout@v3
+ - uses: graalvm/setup-graalvm@v1
+ with:
+ version: 'releases'
+ java-version: '17'
+ components: 'native-image'
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ cache: 'maven'
+ - uses: docker/login-action@v2
+ with:
+ registry: ${{ env.HUB }}
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+ - name: Push docker image
+ run: ./mvnw -am -pl distribution/proxy-native -B -DskipTests -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotless.apply.skip=true -Pnative,docker.buildx.push.native -Dproxy.image.repository=${{ env.PROXY }} -Dproxy.image.tag=${{ github.sha }} clean package
diff --git a/.github/workflows/nightly-graalvm-image.yml b/.github/workflows/nightly-graalvm-image.yml
deleted file mode 100644
index 881dc881aca..00000000000
--- a/.github/workflows/nightly-graalvm-image.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-name: Nightly - Build GraalVM Native Image
-
-on:
- schedule:
- - cron: '0 20 */1 * *' # once a day. UTC time
-
-env:
- HUB: ghcr.io/apache/shardingsphere
- PROXY: ghcr.io/apache/shardingsphere-proxy-native
-
-jobs:
- build:
- if: github.repository == 'apache/shardingsphere'
- timeout-minutes: 90
- permissions:
- contents: read
- packages: write
- name: GraalVM Native Image on ${{ matrix.os }}
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-latest]
- fail-fast: false
- steps:
- - uses: actions/checkout@v3
- - uses: graalvm/setup-graalvm@v1
- with:
- version: 'dev'
- java-version: '17'
- components: 'native-image'
- github-token: ${{ secrets.GITHUB_TOKEN }}
- cache: 'maven'
- - uses: docker/login-action@v1.10.0
- with:
- registry: ${{ env.HUB }}
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
- - name: Push docker image
- run: ./mvnw -am -pl distribution/proxy-native -B -DskipTests -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotless.apply.skip=true -Pnative,docker.buildx.push.native -Dproxy.image.repository=${{ env.PROXY }} -Dproxy.image.tag=${{ github.sha }} clean package