Skip to content

Commit c53574e

Browse files
committed
Update structure for v1.3.0
Signed-off-by: yutao04 <[email protected]>
1 parent 8776135 commit c53574e

File tree

524 files changed

+50885
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

524 files changed

+50885
-0
lines changed

.github/workflows/codeql-analysis.yml

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches:
17+
- main
18+
- master
19+
- release-*
20+
pull_request:
21+
# The branches below must be a subset of the branches above
22+
branches:
23+
- main
24+
- master
25+
- release-*
26+
schedule:
27+
- cron: '37 23 * * 1'
28+
29+
jobs:
30+
analyze:
31+
name: Analyze
32+
runs-on: ubuntu-latest
33+
permissions:
34+
actions: read
35+
contents: read
36+
security-events: write
37+
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
language: [ 'java' ]
42+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
43+
# Learn more:
44+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
45+
46+
steps:
47+
- name: Checkout repository
48+
uses: actions/checkout@v2
49+
50+
# Initializes the CodeQL tools for scanning.
51+
- name: Initialize CodeQL
52+
uses: github/codeql-action/init@v1
53+
with:
54+
languages: ${{ matrix.language }}
55+
# If you wish to specify custom queries, you can do so here or in a config file.
56+
# By default, queries listed here will override any specified in a config file.
57+
# Prefix the list here with "+" to use these queries and those in the config file.
58+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
59+
60+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
61+
# If this step fails, then you should remove it and run the build manually (see below)
62+
- name: Autobuild
63+
uses: github/codeql-action/autobuild@v1
64+
65+
# ℹ️ Command-line programs to run using the OS shell.
66+
# 📚 https://git.io/JvXDl
67+
68+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
69+
# and modify them (or add more) to build your code if your project
70+
# uses a compiled language
71+
72+
#- run: |
73+
# make bootstrap
74+
# make release
75+
76+
- name: Perform CodeQL Analysis
77+
uses: github/codeql-action/analyze@v1

.github/workflows/docker-build.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This workflow will build a Java project with Maven
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
name: Docker Build
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- release-*
9+
tags:
10+
- 'v*'
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
- name: Set up JDK 8
19+
uses: actions/setup-java@v2
20+
with:
21+
java-version: '8'
22+
distribution: 'adopt'
23+
- name: Build with Maven
24+
run: mvn -B package --file pom.xml -Dmaven.test.skip
25+
- name: Docker meta
26+
id: meta
27+
uses: docker/metadata-action@v4
28+
with:
29+
images: ${{ secrets.DOCKER_HUB_USERNAME }}/api-plane
30+
flavor: latest=true
31+
tags: |
32+
type=ref,event=branch
33+
type=ref,event=pr
34+
type=semver,pattern={{version}}
35+
- name: Login to Docker Hub
36+
uses: docker/login-action@v2
37+
with:
38+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
39+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
40+
- name: Set up Docker Buildx
41+
uses: docker/setup-buildx-action@v1
42+
- name: Build and Push
43+
uses: docker/build-push-action@v2
44+
with:
45+
context: .
46+
file: ./hango-api-plane-server/Dockerfile
47+
push: ${{ github.ref_type == 'tag' }}
48+
tags: ${{ steps.meta.outputs.tags }}

.github/workflows/java_ci.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will build a Java project with Maven
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
name: Java CI with Maven
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
- release-*
10+
tags:
11+
- 'v*'
12+
pull_request:
13+
branches:
14+
- main
15+
- master
16+
- release-*
17+
18+
jobs:
19+
test:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Set up JDK 8
24+
uses: actions/setup-java@v2
25+
with:
26+
java-version: '8'
27+
distribution: 'adopt'
28+
- name: Run unit test
29+
run: mvn test
30+
- name: Build with Maven
31+
run: mvn -B package --file pom.xml
32+
check-license-lines:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@master
36+
- name: Check License Lines
37+
uses: kt3k/[email protected]
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow integrates Scan with GitHub's code scanning feature
2+
# Scan is a free open-source security tool for modern DevOps teams
3+
# Visit https://slscan.io/en/latest/integrations/github-actions/ for help
4+
name: Scan
5+
6+
# This section configures the trigger for the workflow. Feel free to customize depending on your convention
7+
on:
8+
push:
9+
branches:
10+
- main
11+
- master
12+
- release-*
13+
pull_request:
14+
branches:
15+
- main
16+
- master
17+
- release-*
18+
19+
jobs:
20+
Scan-Build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v1
24+
- name: Cache multiple paths
25+
uses: actions/cache@v2
26+
with:
27+
path: |
28+
${{ github.workspace }}/db
29+
key: ${{ runner.os }}-${{ hashFiles('requirements*.txt') }}
30+
- name: Perform Scan
31+
uses: ShiftLeftSecurity/scan-action@master
32+
env:
33+
VDB_HOME: ${{ github.workspace }}/db
34+
WORKSPACE: ""
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
with:
37+
output: reports
38+
- name: Upload report
39+
uses: github/codeql-action/upload-sarif@v1
40+
with:
41+
sarif_file: reports

.licenserc.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"**/*.go": [
3+
"Copyright 2021 KubeCube Authors",
4+
5+
"Licensed under the Apache License, Version 2.0 (the \"License\");",
6+
"you may not use this file except in compliance with the License.",
7+
"You may obtain a copy of the License at",
8+
9+
"http://www.apache.org/licenses/LICENSE-2.0",
10+
11+
"Unless required by applicable law or agreed to in writing, software",
12+
"distributed under the License is distributed on an \"AS IS\" BASIS,",
13+
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
14+
"See the License for the specific language governing permissions and",
15+
"limitations under the License."
16+
],
17+
"ignore": [
18+
"vendor/",
19+
"docs/"
20+
]
21+
}

0 commit comments

Comments
 (0)