Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nt dev #16

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
dc94f8e
Add docker creator and format action
Kaiser-Yang Jul 15, 2024
c0b24ae
Merge pull request #1 from CMIPT/feature-init
propanone1006 Jul 15, 2024
9b52b81
Initialize the project
Quentin9922 Jul 21, 2024
a19494b
Apply Google Java Style Format
Quentin9922 Jul 21, 2024
41ed0ca
Update initialization from the website of spring
Kaiser-Yang Jul 22, 2024
a43dd5a
Apply Google Java Style Format
Kaiser-Yang Jul 22, 2024
cb9246d
Merge pull request #2 from CMIPT/zzq-projectConstuction
propanone1006 Jul 23, 2024
95e2423
Build the initial database script
Quentin9922 Jul 25, 2024
5b92175
Provide Python scripts to process Json files
luckygalaxy666 Jul 25, 2024
83f1baf
Merge pull request #6 from CMIPT/Lrd_json
Quentin9922 Jul 25, 2024
6d1a855
Improve the database
Quentin9922 Jul 26, 2024
32dc995
Add spring-doc for restful api
Kaiser-Yang Jul 30, 2024
98e1a2c
Merge pull request #7 from CMIPT/deploy-kaiser
11231f Jul 30, 2024
03751c2
Modify the structure of tables
Quentin9922 Jul 30, 2024
ae26517
Merge pull request #3 from CMIPT/zzq-database
luckygalaxy666 Jul 30, 2024
127c175
Finish part of the deploy script
Kaiser-Yang Jul 30, 2024
af4d658
Fix a typo
Kaiser-Yang Jul 30, 2024
78abf7f
Apply Google Java Style Format
Kaiser-Yang Jul 30, 2024
8cbf505
Merge pull request #9 from CMIPT/deploy-kaiser
Kaiser-Yang Jul 31, 2024
d2ce15e
Add MIT license and developers info
Kaiser-Yang Jul 31, 2024
a208094
Merge pull request #13 from CMIPT/deploy-kaiser
Kaiser-Yang Jul 31, 2024
4b9f677
Substitute the Sys V init with systemd
Kaiser-Yang Jul 31, 2024
d6df86c
Merge pull request #15 from CMIPT/fix-deploy-kaiser
Quentin9922 Jul 31, 2024
80f871c
Modify script/deploy_helper.py:
ajiankexx Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/java-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Google Java Style Format

on:
pull_request:
branches: [ master, develop ]

jobs:
java-formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}

- name: Check for Java files
id: check_java_files
run: |
if [ -n "$(find . -name '*.java' -print -quit)" ]; then
echo "java_files_exist=true" >> $GITHUB_OUTPUT
else
echo "java_files_exist=false" >> $GITHUB_OUTPUT
fi

- name: Google Java Style Format
if: steps.check_java_files.outputs.java_files_exist == 'true'
uses: axel-op/googlejavaformat-action@v3
with:
# --aosp: 4-space indentation
args: "--replace --aosp"
# Can not auto commit, we'll commit manually
skip-commit: true

- name: Commit Changes
if: steps.check_java_files.outputs.java_files_exist == 'true'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Apply Google Java Style Format"
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
# maven target
target

HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/

# Compiled class file
*.class

Expand All @@ -22,3 +59,6 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

# root directory for the file explorer
.root/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "3rdparty/docker-script"]
path = 3rdparty/docker-script
url = https://github.com/CMIPT/docker-script.git
1 change: 1 addition & 0 deletions 3rdparty/docker-script
Submodule docker-script added at 934e23
22 changes: 22 additions & 0 deletions clean_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# USAGE: bash clean_ubuntu.sh [config_file]

config_file=${1:-"config.json"}

# TODO: reuse the log_error and log_info functions from deploy_ubuntu.sh
log_error () {
echo -e "\e[31m[ERROR]: $1\e[0m"
exit 1
}

log_info () {
echo "[INFO]: $1"
}

log_info "Cleaning up..."
python script/deploy_helper.py \
--config-path "$config_file" \
--clean \
--distro ubuntu \
--default-config-path ./config_default.json || \
log_error "Failed to run deploy_helper.py for cleaning up the environment"
2 changes: 2 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
7 changes: 7 additions & 0 deletions config_debug.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"createGitUser": false,
"deployWithDocker": false,
"repositoryDirectory": "~/.local/gcs/repository",
"debug": true,
"runTest": true
}
30 changes: 30 additions & 0 deletions config_default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"deploy": true,
"debug": false,
"runTest": false,
"createGitUser": true,
"deployWithDocker": true,
"repositoryDirectory": "/home/git/repositories",
"postgresPassword": null,
"serviceEnable": true,
"serviceName": "gcs",
"serviceSuffix": "service",
"serviceDescription": "Git server center back-end service",
"servicePIDFile": "/var/run/gcs.pid",
"serviceUser": "gcs",
"serviceUserPassword": null,
"serviceWorkingDirectory": "/opt/gcs",
"serviceRestartPolicy": "always",
"serviceRestartDelaySecond": 5,
"serviceStartJavaCommand": "/usr/bin/java",
"serviceStartJavaArgs": [
"-jar"
],
"serviceStartJarFile": "/opt/gcs/gcs.jar",
"serviceAfter": [
"network.target"
],
"serviceWantedBy": [
"multi-user.target"
]
}
470 changes: 470 additions & 0 deletions database/gcs_back_end.drawio

Large diffs are not rendered by default.

Binary file added database/gcs_back_end.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading