forked from TencentBlueKing/bk-ci
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 消息模板初始化sql TencentBlueKing#5150 解决冲突
- Loading branch information
Showing
228 changed files
with
5,680 additions
and
5,564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
name: Tag Realse | ||
on: | ||
push: | ||
tags: | ||
- 'k*' | ||
|
||
jobs: | ||
frontend: | ||
name: Build frontend | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v1 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- run: yarn install && yarn start && yarn public | ||
working-directory: src/frontend | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: frontend | ||
path: src/frontend/frontend/ | ||
|
||
agent: | ||
name: Build agent on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest, ubuntu-latest] | ||
fail-fast: true | ||
max-parallel: 3 | ||
steps: | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.12 | ||
- uses: actions/checkout@v2 | ||
- run: make clean build_linux | ||
working-directory: src/agent/ | ||
if: matrix.os == 'ubuntu-latest' | ||
- run: make clean build_macos | ||
working-directory: src/agent/ | ||
if: matrix.os == 'macos-latest' | ||
- run: build_windows.bat | ||
shell: cmd | ||
working-directory: src/agent/ | ||
if: matrix.os == 'windows-latest' | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: agent | ||
path: src/agent/bin/ | ||
|
||
backend: | ||
name: Build backend and release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: init mysql | ||
run: | | ||
sudo /etc/init.d/mysql start | ||
export MYSQL_PWD=root | ||
for i in *.sql;do echo $i;mysql -h localhost -uroot < $i;done | ||
working-directory: support-files/sql | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Cache Gradle | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Gradle Build Backend Service | ||
working-directory: src/backend/ci | ||
run: ./gradlew clean test build :core:worker:worker-agent:shadowJar -Ddevops.assemblyMode=K8S -DmavenRepoUrl="https://maven.aliyun.com/nexus/content/groups/public/" | ||
|
||
- name: Create artifact - Step1:init | ||
run: | | ||
true # 暂无init需求, 保留此步骤. | ||
- name: Create artifact - Step2:get Agent | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: agent | ||
path: src/agent/bin/ | ||
|
||
- name: Create artifact - Step3:get Frontend | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: frontend | ||
path: src/frontend/frontend | ||
|
||
- name: Create artifact - Step4:make package | ||
id: create-artifact | ||
run: | | ||
version="$(basename $GITHUB_REF)" | ||
echo "::set-output name=version::$version" | ||
ci_ms_wip="sign,monitoring" ci_pkg_dir=/dev/shm/ci ./scripts/packager-ci.sh "$version" bkci-slim.tar.gz | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: bk-ci ${{ github.ref }} | ||
draft: true | ||
prerelease: true | ||
|
||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./bkci-slim.tar.gz | ||
asset_name: bkci-slim.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: download codecc | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: codecc | ||
path: ./ | ||
|
||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./bkcodecc-slim.tar.gz | ||
asset_name: bkcodecc-slim.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
codecc: | ||
name: Build CodeCC | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: CodeCC Cache Gradle | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-codecc-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-codecc-gradle- | ||
- name: Gradle Build | ||
id: codecc-backend | ||
uses: eskatos/gradle-command-action@v1 | ||
with: | ||
gradle-version: 4.6 | ||
build-root-directory: src/backend/codecc | ||
arguments: clean copyToRelease -DmavenRepoUrl="https://maven.aliyun.com/nexus/content/groups/public/" | ||
|
||
- name: frontend | ||
id: codecc-frontend | ||
run: | | ||
cd src/frontend/devops-codecc | ||
rm -rf dist | ||
npm i | ||
npm run build | ||
if [ -f dist/index.html ]; then | ||
mv dist/index.html dist/frontend#index.html | ||
fi | ||
- name: Create artifact - make package | ||
id: create-artifact | ||
run: | | ||
version="$(basename $GITHUB_REF)" | ||
echo "::set-output name=version::$version" | ||
codecc_pkg_dir=/dev/shm/codecc ./scripts/deploy-codecc/packager-codecc.sh "$version" bkcodecc-slim.tar.gz "$PWD" | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: codecc | ||
path: bkcodecc-slim.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,4 @@ out | |
.history | ||
.codecc | ||
build.yml | ||
*.ipa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ yarn public | |
|
||
- MySQL 5.7 | ||
- JDK 1.8 | ||
- Gradle 4.8 - 4.10 | ||
- Gradle 6.7 | ||
|
||
#### 数据库初始化 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.