Skip to content

Commit

Permalink
Merge pull request #96 from sineverba/release-1.0.0
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
sineverba authored Feb 13, 2023
2 parents 8caf336 + 5ab0946 commit 46d929c
Show file tree
Hide file tree
Showing 24 changed files with 524 additions and 259 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:

test:
docker:
- image: cimg/node:18.12.1
- image: cimg/node:18.14.0

steps:
- checkout
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.13.0
v18.14.0
4 changes: 2 additions & 2 deletions .semaphore/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ global_job_config:
- name: GITLAB_REGISTRY
value: registry.gitlab.com
- name: BUILDX_VERSION
value: 0.10.0
value: 0.10.2
- name: BINFMT_VERSION
value: qemu-v7.0.0-28
- name: NPM_VERSION
value: 9.4.0
value: 9.4.2
prologue:
commands:
- checkout
Expand Down
10 changes: 5 additions & 5 deletions .semaphore/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ global_job_config:
- name: GITLAB_REGISTRY
value: registry.gitlab.com
- name: BUILDX_VERSION
value: 0.10.0
value: 0.10.2
- name: BINFMT_VERSION
value: qemu-v7.0.0-28
- name: FOLDER_APP
value: online-banking-frontend
- name: NPM_VERSION
value: 9.4.0
value: 9.4.2
prologue:
commands:
- checkout
Expand Down Expand Up @@ -55,7 +55,7 @@ blocks:
# 1 - Stop the container and remove it
- >-
ssh -t $VPS01_OCI_USERNAME@$VPS01_OCI_URL -p $VPS01_OCI_PORT
"cd $FOLDER_APP && docker-compose stop && docker container rm $FOLDER_APP && exit"
"cd $FOLDER_APP && docker compose stop && docker container rm $FOLDER_APP && exit"
# 2 - Remove all tagged images
- >-
ssh -t $VPS01_OCI_USERNAME@$VPS01_OCI_URL -p $VPS01_OCI_PORT
Expand All @@ -68,7 +68,7 @@ blocks:
- >-
ssh -t $VPS01_OCI_USERNAME@$VPS01_OCI_URL -p $VPS01_OCI_PORT
"sed -i \"/image\: registry.gitlab.com\/cicdprojects\/$FOLDER_APP:/c\ image\: registry.gitlab.com\/cicdprojects\/$FOLDER_APP\:$SEMAPHORE_GIT_TAG_NAME\" $FOLDER_APP/docker-compose.yml && exit"
# 6 - Restart the service
# 5 - Restart the service
- >-
ssh -t $VPS01_OCI_USERNAME@$VPS01_OCI_URL -p $VPS01_OCI_PORT
"cd $FOLDER_APP && docker-compose up -d && exit"
"cd $FOLDER_APP && docker compose up -d && exit"
31 changes: 17 additions & 14 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ global_job_config:
- name: ACCESS_TOKENS
env_vars:
- name: NPM_VERSION
value: 9.4.0
value: 9.4.2
- name: SONARSCANNER_VERSION
value: 4.8.0
prologue:
commands:
- checkout
Expand All @@ -29,32 +31,33 @@ blocks:
- cache store

- name: Test
skip:
when: "tag =~ '.*'"
task:
jobs:
- name: Test
commands:
- cache restore
- npm run eslint
- npm run test:ci

- name: Coverage
skip:
when: "tag =~ '.*'"
task:
prologue:
commands:
- cache restore
- CI=true npm run coverage
jobs:
- name: Test
commands:
- npm run eslint
- name: Eslint
commands:
- npm run eslint
- name: Coverage
commands:
- CI=true npm run coverage
- export COVERALLS_REPO_TOKEN=$COVERALLS_ONLINE_BANKING_FRONTEND
- cat coverage/lcov.info | node_modules/coveralls/bin/coveralls.js
- name: Sonarcloud
commands:
- docker run --rm -e SONAR_HOST_URL="https://sonarcloud.io" -e SONAR_LOGIN=$SONAR_TOKEN -v "/home/semaphore/online-banking-frontend:/usr/src" sonarsource/sonar-scanner-cli:4.8.0
- >-
docker run
--rm
-e SONAR_HOST_URL="https://sonarcloud.io"
-e SONAR_LOGIN=$SONAR_TOKEN
-v "/home/semaphore/online-banking-frontend:/usr/src"
sonarsource/sonar-scanner-cli:$SONARSCANNER_VERSION
promotions:
- name: Build
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# 0.11.0
# 1.0.0
+ Upgrade dependencies + reorganize Docker
+ Add MSW during development
+ Refactor MSW tests
+ Refactor tests
+ Upgrade dependencies

## 0.11.0
+ Upgrade dependencies + Refactor Semaphore

## 0.10.1
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ include .env

IMAGE_NAME=registry.gitlab.com/cicdprojects/online-banking-frontend
CONTAINER_NAME=online-banking-frontend
APP_VERSION=0.11.0-dev
APP_VERSION=1.0.0-dev
SONARSCANNER_VERSION=4.8.0
BUILDX_VERSION=0.10.0
BUILDX_VERSION=0.10.2
BINFMT_VERSION=qemu-v7.0.0-28

sonar:
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@ __This project uses:__
1. Copy .env.bak into .env
2. Insert random string on `LOCALSTORAGE_ACCESS_TOKEN` in .env file (`$ echo $RANDOM | md5sum | head -c 20; echo;`). This will deny conflicts with other localStorage used by other projects

## Development

`npm run start` to start development with real call.

`npm run msw` to start development with mocked call.

## Production
+ Use files in `/production` folder
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.8"
services:
online-banking-frontend:
image: registry.gitlab.com/cicdprojects/online-banking-frontend:latest
image: registry.gitlab.com/cicdprojects/online-banking-frontend:1.0.0
container_name: ${CONTAINER_NAME}
restart: unless-stopped
env_file:
Expand Down
Loading

0 comments on commit 46d929c

Please sign in to comment.