Skip to content

Commit

Permalink
Merge pull request #156 from jphacks/develop
Browse files Browse the repository at this point in the history
Release v1.0.0
  • Loading branch information
averak authored Oct 22, 2022
2 parents 55adc75 + 6a8ee28 commit 3613c7f
Show file tree
Hide file tree
Showing 253 changed files with 25,598 additions and 20 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are explicitly windows files and should use crlf
*.bat text eol=crlf

88 changes: 88 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: CI

on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop

jobs:
backend:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11

- name: launch docker
run: docker-compose up -d

- name: build
run: |
./gradlew bootJar
- name: test
run: |
./gradlew test
desktop:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: desktop

steps:
- uses: actions/checkout@v2

- name: setup node
uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
cache-dependency-path: ./desktop/yarn.lock

- name: dependencies
run: yarn install

- name: code check
run: |
yarn code-check
- name: build
run: |
yarn build
pointer:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: app/src/main/pointer
steps:
- uses: actions/checkout@v2

- name: setup node
uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
cache-dependency-path: ./app/src/main/pointer/yarn.lock

- name: dependencies
run: yarn install

- name: code check
run: |
yarn code-check
- name: build
run: |
yarn build
21 changes: 21 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: deploy

on:
push:
branches:
- develop

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: deploy
env:
JENKINS_URL: ${{secrets.JENKINS_URL}}
JENKINS_USER: ${{secrets.JENKINS_USER}}
JENKINS_JOB_TOKEN: ${{secrets.JENKINS_JOB_TOKEN}}
run: |
curl --user $JENKINS_USER $JENKINS_URL -d token=$JENKINS_JOB_TOKEN
74 changes: 74 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
### Windows ###
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/

### Linux ###
!.gitignore
!.git*
*~

### OSX ###
.DS_Store
.AppleDouble
.LSOverride
Icon

### Java ###
*.class
*.jar
*.war
*.ear

### Gradle ###
.gradle/
build/
!gradle/wrapper/gradle-wrapper.jar
bin

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

### Eclipse ###
*.pydevproject
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.externalToolBuilders/
*.launch
.cprojet
.buildpath

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

### Application property ###
app/src/main/resources/application-dev.yml
app/src/main/resources/application-stage.yml
app/src/main/resources/application-prod.yml

### Static contents ###
app/src/main/resources/static/*

### Docker ###
docker/mysql/db
docker/mysql/log
58 changes: 58 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
pipeline {
agent any

environment {
JENKINS_NODE_COOKIE = 'dontKillMe'
}

stages {
stage("checkout") {
steps {
checkout scm
}
}

stage("frontend-build") {
agent {
docker {
image "node:16-alpine"
reuseNode true
}
}
steps {
dir("app/src/main/pointer") {
sh "yarn install"
sh "yarn build"
}
}
}

stage("backend-build") {
agent {
docker {
image "openjdk:11-jdk"
reuseNode true
}
}
steps {
sh "./gradlew bootJar"
}
}

stage("deploy") {
steps {
sh "docker-compose up -d"
sh "docker run --rm -d -v $PWD/app/build/libs:/app -p ${PORT}:8080 openjdk:11-jdk java -jar -Dspring.profiles.active=${ENVIRONMENT} app/smartpointer_1.0.0_SNAPSHOT.jar"
}
}
}

post {
always {
discordSend link: env.BUILD_URL,
result: currentBuild.currentResult,
title: JOB_NAME,
webhookURL: DISCORD_WEBHOOK_URL
}
}
}
Loading

0 comments on commit 3613c7f

Please sign in to comment.