Skip to content

Commit

Permalink
[Bug][docker] fix workflows and scaleph-api dockerfile error (#657)
Browse files Browse the repository at this point in the history
* feature: image tag

* feature: image tag

* feature: image tag

* feature: rename workflow files

* feature: optimize flink kubernetes template

* feature: optimize flink kubernetes template
  • Loading branch information
kalencaya authored Dec 6, 2023
1 parent 7a0003b commit 6d9391e
Show file tree
Hide file tree
Showing 16 changed files with 199 additions and 80 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
name: Docker-Build
# 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: CI-Docker-Build

on:
push:
Expand Down Expand Up @@ -46,6 +62,9 @@ jobs:
platforms: amd64,arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Fetch Project Version
run: |
echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >>$GITHUB_ENV
- name: Build scaleph-dist
run: mvn -B -U -T 4C clean package -Pdist -DskipTests -Dfast
- name: Build scaleph-ui-react-dist
Expand All @@ -63,5 +82,5 @@ jobs:
platforms: linux/amd64,linux/arm64
file: tools/docker/build/${{ matrix.image }}/Dockerfile
tags: |
${{ env.HUB }}/${{ matrix.image }}:${{ github.sha }},
${{ env.HUB }}/${{ matrix.image }}:${{ env.PROJECT_VERSION }},
${{ env.HUB }}/${{ matrix.image }}:latest
24 changes: 22 additions & 2 deletions .github/workflows/ci.yml → .github/workflows/ci-maven.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
name: CI
# 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: CI-Maven

on:
pull_request:
Expand Down Expand Up @@ -28,9 +44,13 @@ jobs:
java-version: ${{ matrix.jdk }}
distribution: temurin
cache: maven
- name: Build scaleph-dist
timeout-minutes: 360
run: mvn -B -U -T 4C clean package -Pdist -DskipTests -Dfast
- name: Build with Maven
timeout-minutes: 360
run: mvn -B -U -T 4C clean package --file pom.xml
run: mvn -B -U -T 4C clean package
- name: Build scaleph-file-fetcher
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/ci-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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: CI-NPM

on:
pull_request:
paths-ignore: ['docs/**', '**/*.md', '**/*.drawio', '**/*.svg' ]
push:
paths-ignore: ['docs/**', '**/*.md', '**/*.drawio', '**/*.svg' ]
schedule:
- cron: '0 20 * * *' # automatic test while every day on 04:00 am at UTC+10
workflow_dispatch:

jobs:
build:
if: github.repository == 'flowerfine/scaleph'
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build scaleph-ui-react-dist
run: mvn -B -U package -pl scaleph-ui-react -am -DskipTests
- name: Build with NPM
timeout-minutes: 360
run: cd scaleph-ui-react && npm install && npm run build --prod
16 changes: 16 additions & 0 deletions .github/workflows/release-dist-bin.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# 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: Release dist bin

permissions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: Docker-Build-Flink
name: Relase-Docker-Flink

on:
workflow_dispatch:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: Docker-Build-Seatunnel
name: Release-Docker-SeaTunnel

on:
workflow_dispatch:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: Docker-Build-Sql-Template
name: Release-Docker-Build-Sql-Template

on:
workflow_dispatch:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
name: Docker-Release
# 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: Release-Docker-Scaleph-Master

on:
workflow_dispatch:
Expand Down Expand Up @@ -40,6 +56,9 @@ jobs:
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Fetch Project Version
run: |
echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >>$GITHUB_ENV
- name: Build scaleph-dist
run: mvn -B -U -T 4C clean package -Pdist -DskipTests -Dfast
- name: Build scaleph-ui-react-dist
Expand All @@ -57,5 +76,5 @@ jobs:
platforms: linux/amd64,linux/arm64
file: tools/docker/build/${{ matrix.image }}/Dockerfile
tags: |
${{ env.HUB }}/${{ matrix.image }}:${{ github.sha }},
${{ env.HUB }}/${{ matrix.image }}:${{ env.PROJECT_VERSION }},
${{ env.HUB }}/${{ matrix.image }}:latest
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
name: Release
# 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: Release-Docker-Scaleph-Tag

on:
push:
Expand Down Expand Up @@ -53,5 +69,5 @@ jobs:
platforms: linux/amd64,linux/arm64
file: tools/docker/build/${{ matrix.image }}/Dockerfile
tags: |
${{ env.HUB }}/${{ matrix.image }}:${{ github.sha }},
${{ env.HUB }}/${{ matrix.image }}:${{ github.ref_name }}
${{ env.HUB }}/${{ matrix.image }}:${{ github.ref_name }},
${{ env.HUB }}/${{ matrix.image }}:latest
16 changes: 16 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# 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: SonarCloud

on:
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/test.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/web-ide.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# 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: Web-IDE

on:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# scaleph

[![Gihub Actions](https://github.com/flowerfine/scaleph/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/flowerfine/scaleph/actions) [![Total Lines](https://tokei.rs/b1/github/flowerfine/scaleph?category=lines)](https://github.com/flowerfine/scaleph) [![Last commit](https://img.shields.io/github/last-commit/flowerfine/scaleph.svg)](https://github.com/flowerfine/scaleph) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flowerfine_scaleph&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=flowerfine_scaleph) [![codecov](https://codecov.io/gh/flowerfine/scaleph/branch/master/graph/badge.svg)](https://codecov.io/gh/flowerfine/scaleph/branch/master) [![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=flat&logo=docker&logoColor=white)](https://github.com/orgs/flowerfine/packages?repo_name=scaleph)
[![Gihub Actions](https://github.com/flowerfine/scaleph/actions/workflows/ci-maven.yml/badge.svg?branch=master)](https://github.com/flowerfine/scaleph/actions) [![Total Lines](https://tokei.rs/b1/github/flowerfine/scaleph?category=lines)](https://github.com/flowerfine/scaleph) [![Last commit](https://img.shields.io/github/last-commit/flowerfine/scaleph.svg)](https://github.com/flowerfine/scaleph) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flowerfine_scaleph&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=flowerfine_scaleph) [![codecov](https://codecov.io/gh/flowerfine/scaleph/branch/master/graph/badge.svg)](https://codecov.io/gh/flowerfine/scaleph/branch/master) [![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=flat&logo=docker&logoColor=white)](https://github.com/orgs/flowerfine/packages?repo_name=scaleph)

The Scaleph project features data integration, develop, job schedule and orchestration and aims to run on cloud environment.

Expand Down
34 changes: 17 additions & 17 deletions scaleph-api/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,33 @@ spring:
datasource:
master:
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://127.0.0.1:3306/scaleph?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useAffectedRows=true
username: root
password: 123456
jdbc-url: jdbc:mysql://${MYSQL_HOST:127.0.0.1}:${MYSQL_PORT:3306}/scaleph?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useAffectedRows=true
username: ${MYSQL_USERNAME:root}
password: ${MYSQL_PASSWORD:123456}
log:
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://127.0.0.1:3306/scaleph?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useAffectedRows=true
username: root
jdbc-url: jdbc:mysql://${MYSQL_HOST:127.0.0.1}:${MYSQL_PORT:3306}/scaleph?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useAffectedRows=true
username: ${MYSQL_USERNAME:root}
password: 123456
sakura:
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://127.0.0.1:3306/sakura?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useAffectedRows=true
username: root
password: 123456
jdbc-url: jdbc:mysql://${MYSQL_HOST:127.0.0.1}:${MYSQL_PORT:3306}/sakura?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useAffectedRows=true
username: ${MYSQL_USERNAME:root}
password: ${MYSQL_PASSWORD:123456}
quartz:
properties:
org.quartz:
dataSource:
quartzDS:
driver: com.mysql.cj.jdbc.Driver
URL: jdbc:mysql://127.0.0.1:3306/scaleph?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useAffectedRows=true
user: root
password: 123456
URL: jdbc:mysql://${MYSQL_HOST:127.0.0.1}:${MYSQL_PORT:3306}/scaleph?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useAffectedRows=true
user: ${MYSQL_USERNAME:root}
password: ${MYSQL_PASSWORD:123456}
redis:
database: 0
host: 127.0.0.1
port: 6379
password: 123456
host: ${REDIS_HOST:127.0.0.1}
port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD:123456}

app:
host: localhost:4200
Expand All @@ -55,9 +55,9 @@ file-system:
type: s3
proxy: false
bucket: ${spring.application.name}
endPoint: http://127.0.0.1:9000
accessKey: admin
secretKey: password
endPoint: ${MINIO_ENDPOINT:http://127.0.0.1:9000}
accessKey: ${MINIO_ACCESS_KEY:admin}
secretKey: ${MINIO_SECRET_KEY:password}
# type: oss
# bucket: ${spring.application.name}
# endPoint: Aliyun OSS endpoint to connect to
Expand Down
Loading

0 comments on commit 6d9391e

Please sign in to comment.