Skip to content

Commit

Permalink
Release template-v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
btnguyen2k committed Jan 21, 2020
1 parent c76fbd8 commit e0cc920
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Giter8 template to develop `Admin Control Panel` in Go with VueJS-based frontend.

Latest release: [template-v0.4.r1](RELEASE-NOTES.md).
Latest release: [template-v0.1.0](RELEASE-NOTES.md).

## Features

Expand Down
2 changes: 1 addition & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# govueadmin.g8 Release Notes

## 2020-01-20: template-v0.4.r1
## 2020-01-21: template-v0.1.0

- Frontend using [CoreUI for Vue.js](https://coreui.io/vue/) `v3.0.0-beta.3`.
- Backend using [Echo](https://echo.labstack.com) `v4.1.x`.
Expand Down
158 changes: 146 additions & 12 deletions src/main/g8/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,81 @@ stages:
- docker-build
- docker-release

build:
build-fe:
stage: build
script:
- whoami && pwd && date
- cd $APP_ROOT && go build -o main
- cd $APP_ROOT/fe-gui && npm install && npm run build
tags:
## Define tags if needed
#- gitlabci-build
#- node

test-fe:
stage: test
script:
- whoami && pwd && date
#- cd $APP_ROOT/fe-gui && npm install && npm run test
tags:
## Define tags if needed
#- gitlabci-build
#- node

build-be:
stage: build
script:
- whoami && pwd && date
- cd $APP_ROOT/be-api && go build -o main
tags:
## Define tags if needed
#- gitlabci-build
#- golang

test:
test-be:
stage: test
script:
- whoami && pwd && date
#- cd $APP_ROOT/be-api && go test -v -count=1
tags:
## Define tags if needed
#- gitlabci-build
#- golang

build docker image frontend:
stage: docker-build
only:
# Run ony if commit has tag release-x.y.z.t or staging-x.y.z.t or test-x.y.z.t
- /^release-.*$/
- /^staging-.*$/
- /^test-.*$/
script:
- whoami && pwd && date
#- cd $APP_ROOT && go test -v -count=1
## Remove --squash if docker's experimental features are not enabled
- cd $APP_ROOT/fe-gui && docker build --force-rm --squash -t $DOCKER_REGISTRY_SERVER/$CI_PROJECT_NAME-fe:$CI_PROJECT_VERSION .
- docker rmi $(docker images -f "dangling=true" -q)
tags:
## Define tags if needed
#- gitlabci-build
#- node

build docker image backend:
stage: docker-build
only:
# Run ony if commit has tag release-x.y.z.t or staging-x.y.z.t or test-x.y.z.t
- /^release-.*$/
- /^staging-.*$/
- /^test-.*$/
script:
- whoami && pwd && date
## Remove --squash if docker's experimental features are not enabled
- cd $APP_ROOT/be-api && docker build --force-rm --squash -t $DOCKER_REGISTRY_SERVER/$CI_PROJECT_NAME-be:$CI_PROJECT_VERSION .
- docker rmi $(docker images -f "dangling=true" -q)
tags:
## Define tags if needed
#- gitlabci-build
#- golang

build docker image:
build docker image all-in-one:
stage: docker-build
only:
# Run ony if commit has tag release-x.y.z.t or staging-x.y.z.t or test-x.y.z.t
Expand All @@ -70,16 +119,43 @@ build docker image:
- /^test-.*$/
script:
- whoami && pwd && date
- cd $APP_ROOT && go build -o main
## Remove --squash if docker's experimental features are not enabled
- cd $APP_ROOT && docker build --force-rm --squash -t $DOCKER_REGISTRY_SERVER/$CI_PROJECT_NAME:$CI_PROJECT_VERSION .
- docker rmi $(docker images -f "dangling=true" -q)
tags:
## Define tags if needed
#- gitlabci-build
#- golang

push test frontend to docker registry:
stage: docker-release
only:
- /^test-.*$/
script:
- whoami && pwd && date
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_SERVER
- docker tag ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-fe:$CI_PROJECT_VERSION ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-fe:$CI_PROJECT_VERSION-test
- docker push ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-fe:$CI_PROJECT_VERSION-test
tags:
## Define tags if needed
#- gitlabci-build
#- golang
when: manual

push test to docker registry:
push test backend to docker registry:
stage: docker-release
only:
- /^test-.*$/
script:
- whoami && pwd && date
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_SERVER
- docker tag ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-be:$CI_PROJECT_VERSION ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-be:$CI_PROJECT_VERSION-test
- docker push ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-be:$CI_PROJECT_VERSION-test
tags:
## Define tags if needed
#- gitlabci-build
when: manual

push test all-in-one to docker registry:
stage: docker-release
only:
- /^test-.*$/
Expand All @@ -88,12 +164,40 @@ push test to docker registry:
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_SERVER
- docker tag ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME:$CI_PROJECT_VERSION ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME:$CI_PROJECT_VERSION-test
- docker push ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME:$CI_PROJECT_VERSION-test
tags:
## Define tags if needed
#- gitlabci-build
when: manual

push staging frontend to docker registry:
stage: docker-release
only:
- /^staging-.*$/
script:
- whoami && pwd && date
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_SERVER
- docker tag ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-fe:$CI_PROJECT_VERSION ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-fe:$CI_PROJECT_VERSION-staging
- docker push ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-fe:$CI_PROJECT_VERSION-staging
tags:
## Define tags if needed
#- gitlabci-build
when: manual

push staging to docker registry:
push staging backend to docker registry:
stage: docker-release
only:
- /^staging-.*$/
script:
- whoami && pwd && date
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_SERVER
- docker tag ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-be:$CI_PROJECT_VERSION ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-be:$CI_PROJECT_VERSION-staging
- docker push ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-be:$CI_PROJECT_VERSION-staging
tags:
## Define tags if needed
#- gitlabci-build
when: manual

push staging all-in-one to docker registry:
stage: docker-release
only:
- /^staging-.*$/
Expand All @@ -102,12 +206,42 @@ push staging to docker registry:
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_SERVER
- docker tag ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME:$CI_PROJECT_VERSION ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME:$CI_PROJECT_VERSION-staging
- docker push ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME:$CI_PROJECT_VERSION-staging
tags:
## Define tags if needed
#- gitlabci-build
when: manual

push release frontend to docker registry:
stage: docker-release
only:
- /^release-.*$/
script:
- whoami && pwd && date
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_SERVER
- docker tag ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-fe:$CI_PROJECT_VERSION ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-fe:latest
- docker push ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-fe:$CI_PROJECT_VERSION
- docker push ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-fe:latest
tags:
## Define tags if needed
#- gitlabci-build
when: manual

push release to docker registry:
push release backend to docker registry:
stage: docker-release
only:
- /^release-.*$/
script:
- whoami && pwd && date
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_SERVER
- docker tag ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-be:$CI_PROJECT_VERSION ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-be:latest
- docker push ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-be:$CI_PROJECT_VERSION
- docker push ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME-be:latest
tags:
## Define tags if needed
#- gitlabci-build
when: manual

push release all-in-one to docker registry:
stage: docker-release
only:
- /^release-.*$/
Expand All @@ -118,6 +252,6 @@ push release to docker registry:
- docker push ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME:$CI_PROJECT_VERSION
- docker push ${DOCKER_REGISTRY_SERVER}${DOCKER_REGISTRY_NAMESPACE}/$CI_PROJECT_NAME:latest
tags:
## Define tags if needed
#- gitlabci-build
## Define tags if needed
#- gitlabci-build
when: manual
2 changes: 1 addition & 1 deletion src/main/g8/be-api/src/gvabe/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Package gvabe provides backend API for GoVueAdmin Frontend.
@author Thanh Nguyen <[email protected]>
@since template-v0.4.r1
@since template-v0.1.0
*/
package gvabe

Expand Down
2 changes: 1 addition & 1 deletion src/main/g8/fe-gui/src/utils/api_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Client to make call to API server using Axios.
@author Thanh Nguyen <[email protected]>
@since template-v0.4.r1
@since template-v0.1.0
*/
import Axios from "axios"
import APP_CONFIG from "./app_config"
Expand Down

0 comments on commit e0cc920

Please sign in to comment.