Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
Merge pull request #402 from ImisDevelopers/dev
Browse files Browse the repository at this point in the history
Updating master to current dev stage for a redeployment
  • Loading branch information
btobi authored May 25, 2020
2 parents 6797697 + 7d59313 commit 6a3c732
Show file tree
Hide file tree
Showing 337 changed files with 8,462 additions and 6,253 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ indent_style = tab
end_of_line = lf
insert_final_newline = false

[*.{vue,js}]
indent_style = space

[*.{yml,yaml}]
indent_style = space
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (optional):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]


**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
with:
java-version: 1.11
- uses: actions/checkout@v2
- if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository ) }}
uses: hallee/eslint-action@1.0.3
with:
repo-token: "${{secrets.GITHUB_TOKEN}}"
source-root: "client"
- run: |
git fetch --unshallow
gradle build lint test
gradle build lint test
113 changes: 113 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: Pull Request

on:
pull_request:
branches:
- dev
- pilot
types:
- opened
- closed
- synchronize

# Environment variables available to all jobs and steps in this workflow
env:
GKE_PROJECT_ID: ${{ secrets.GKE_PROJECT_ID }}
GKE_EMAIL: ${{ secrets.GKE_EMAIL }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
GITHUB_SHA: ${{ github.sha }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REGISTRY_HOSTNAME: eu.gcr.io

jobs:
stop-pr:
if: github.event.pull_request.closed == true
name: Stop PR
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '290.0.1'
service_account_email: ${{ secrets.GKE_EMAIL }}
service_account_key: ${{ secrets.GKE_KEY }}
project_id: ${{ secrets.GKE_PROJECT_ID }}
- name: Stop
run: |
gcloud components install beta
gcloud run services delete imis-pr-${PR_NUMBER}
deploy-pr:
if: github.event.pull_request.closed != true
name: Deploy PR
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- 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 # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# Setup gcloud CLI
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '290.0.1'
service_account_email: ${{ secrets.GKE_EMAIL }}
service_account_key: ${{ secrets.GKE_KEY }}
project_id: ${{ secrets.GKE_PROJECT_ID }}
- uses: actions/setup-java@v1.3.0
with:
java-version: 1.11
# Configure docker to use the gcloud command-line tool as a credential helper
- run: |
# Set up docker to authenticate
# via gcloud command-line tool.
gcloud auth configure-docker
# Build and push image to Google Container Registry
- name: Build
run: |-
gradle server:test --tests "*GenerateSwagger" -x processResources
gradle client:generateClient
gradle jib --image "$REGISTRY_HOSTNAME/$GKE_PROJECT_ID/imis:$GITHUB_SHA"
- name: Deploy
run: |
export IMAGE="$REGISTRY_HOSTNAME/$GKE_PROJECT_ID/imis:$GITHUB_SHA"
gcloud components install beta
gcloud beta run deploy imis-pr-${PR_NUMBER} --image "$IMAGE" \
--platform managed \
--allow-unauthenticated \
--max-instances=3 \
--memory=512Mi --cpu=1000m \
--concurrency=80 \
--set-env-vars="SPRING_PROFILES_ACTIVE=production,SPRING_DATASOURCE_PASSWORD=${POSTGRES_PASSWORD},CLOUD_SQL_INSTANCE=challenge-11" \
--set-cloudsql-instances=onyx-yeti-271818:europe-west3:challenge-11 \
--service-account=cloudsql-instance-service-acco@onyx-yeti-271818.iam.gserviceaccount.com \
--region=europe-west1
PR_URL="$(gcloud beta run services describe imis-pr-417 --platform=managed --region=europe-west1 --format=yaml | grep -o 'url:.*' | uniq)"
echo "::set-env name=PR_COMMENT_MESSAGE::${PR_URL}"
- name: comment PR
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: "Live preview at ${{ env.PR_COMMENT_MESSAGE }}"
check_for_duplicate_msg: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.idea
.gradle
.DS_Store
client/.vscode
.vscode
**/.project
**/.settings
Expand Down
11 changes: 11 additions & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
{{- include "imis.labels" . | nindent 4 }}
spec:
replicas: 1
revisionHistoryLimit: 5
selector:
matchLabels:
{{- include "imis.selectorLabels" . | nindent 6 }}
Expand All @@ -32,6 +33,10 @@ spec:
value: jdbc:postgresql://localhost:5432/{{- .Values.database }}
- name: SPRING_DATASOURCE_USERNAME
value: postgres
- name: SPRING_CLOUD_GCP_SQL_ENABLED
value: "false"
- name: MANAGEMENT_SERVER_PORT
value: '8081'
- name: SPRING_DATASOURCE_PASSWORD
valueFrom:
secretKeyRef:
Expand All @@ -41,6 +46,9 @@ spec:
- name: cloudstore-service-account
mountPath: /usr/local/cloud-store
readOnly: true
- name: lucene-index-volume
mountPath: /data
readOnly: false
readinessProbe:
httpGet:
path: /actuator/health
Expand Down Expand Up @@ -83,3 +91,6 @@ spec:
- name: cloudstore-service-account
secret:
secretName: "{{ include "imis.fullname" . -}}-cloudstore"
- name: lucene-index-volume
emptyDir: {}

6 changes: 4 additions & 2 deletions client/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module.exports = {
'plugin:vue/essential',
'eslint:recommended',
'@vue/typescript/recommended',
//'@vue/prettier',
//'@vue/prettier/@typescript-eslint',
'@vue/prettier',
'@vue/prettier/@typescript-eslint',
],
parserOptions: {
parser: '@typescript-eslint/parser',
Expand All @@ -19,6 +19,8 @@ module.exports = {
rules: {
'@typescript-eslint/no-extra-semi': 'error',
'@typescript-eslint/no-explicit-any': 'off',
// Does not work with delimiter "none" even though documentation says otherwise:
'@typescript-eslint/member-delimiter-style': 'off',
},
overrides: [
{
Expand Down
4 changes: 1 addition & 3 deletions client/src/Root.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@
</template>

<style lang="scss">
@import '@/assets/global';
@import '@/assets/global';
</style>
Loading

0 comments on commit 6a3c732

Please sign in to comment.