Skip to content

Commit

Permalink
Merge pull request #72 from electron2302/68-change-deployment
Browse files Browse the repository at this point in the history
68 change deployment
  • Loading branch information
walli545 authored Feb 12, 2021
2 parents 5b70764 + c4853bd commit 2cd5529
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 41 deletions.
82 changes: 44 additions & 38 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ steps:
- "npx ng test --browsers ChromeHeadlessNoSandbox --watch false --progress false --codeCoverage"
depends_on: ["Install dependencies"]

- name: "Docker tags"
image: alpine
commands:
- echo -n "c-${DRONE_COMMIT_SHA}," > .tags
- echo -n "${DRONE_BRANCH}" >> .tags
- echo -n "tags are "; cat .tags ; echo
when:
branch:
- main
- develop
event:
- push
depends_on: ["Test & Coverage", "Lint"]

######
# CD for develop branch
#####
Expand Down Expand Up @@ -71,16 +85,13 @@ steps:
depends_on: ["Amplify develop"]

- name: "Push develop"
image: plugins/ecr
image: plugins/docker
settings:
access_key:
from_secret: aws_access_key_id
secret_key:
from_secret: aws_secret_access_key
repo: ctt
registry: 356962203731.dkr.ecr.us-east-1.amazonaws.com
repo: electron2302/ctt
username: electron2302
password:
from_secret: dockerhub_secret
dockerfile: ctt-frontend/Dockerfile
tags: ["develop"]
when:
branch:
- develop
Expand All @@ -89,18 +100,17 @@ steps:
depends_on: ["Build develop"]

- name: "Publish develop"
image: joshdvir/drone-ecs-deploy
environment:
AWS_ACCESS_KEY_ID:
from_secret: aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: aws_secret_access_key
image: quay.io/honestbee/drone-kubernetes
settings:
cluster: ctt-cluster
service: developen-service
image_name: "356962203731.dkr.ecr.us-east-1.amazonaws.com/ctt:develop"
aws_region: us-east-1
timeout: "1800"
namespace: web
deployment: ctt-dev-deployment
container: ctt-dev
repo: electron2302/ctt
tag: develop
kubernetes_server:
from_secret: kubernetes_server
kubernetes_token:
from_secret: kubernetes_token
when:
branch:
- develop
Expand Down Expand Up @@ -149,16 +159,13 @@ steps:
depends_on: ["Amplify main"]

- name: "Push main"
image: plugins/ecr
image: plugins/docker
settings:
access_key:
from_secret: aws_access_key_id
secret_key:
from_secret: aws_secret_access_key
repo: ctt
registry: 356962203731.dkr.ecr.us-east-1.amazonaws.com
repo: electron2302/ctt
username: electron2302
password:
from_secret: dockerhub_secret
dockerfile: ctt-frontend/Dockerfile
tags: ["main"]
when:
branch:
- main
Expand All @@ -167,18 +174,17 @@ steps:
depends_on: ["Build main"]

- name: "Publish main"
image: joshdvir/drone-ecs-deploy
environment:
AWS_ACCESS_KEY_ID:
from_secret: aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: aws_secret_access_key
image: quay.io/honestbee/drone-kubernetes
settings:
cluster: ctt-cluster
service: main-service
image_name: "356962203731.dkr.ecr.us-east-1.amazonaws.com/ctt:main"
aws_region: us-east-1
timeout: "1800"
namespace: web
deployment: ctt-prod-deployment
container: ctt-prod
repo: electron2302/ctt
tag: main
kubernetes_server:
from_secret: kubernetes_server
kubernetes_token:
from_secret: kubernetes_token
when:
branch:
- main
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ By providing this application as open source, we want to enable others to use th

## Usage

The app is available at: http://34.202.114.178/.
The app is available at: [https://ctt.sart.solutions/](https://ctt.sart.solutions/).

The Entrypoint of the CTT is the login screen:

Expand Down
2 changes: 1 addition & 1 deletion ctt-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ctt-frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ctt-frontend",
"version": "0.0.0",
"version": "1.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down

0 comments on commit 2cd5529

Please sign in to comment.