diff --git a/.drone.yml b/.drone.yml index c0ba995..9087e48 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 ##### @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/README.md b/README.md index 79da471..bb6d7db 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/ctt-frontend/package-lock.json b/ctt-frontend/package-lock.json index 92565a4..e8e4952 100644 --- a/ctt-frontend/package-lock.json +++ b/ctt-frontend/package-lock.json @@ -1,6 +1,6 @@ { "name": "ctt-frontend", - "version": "0.0.0", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/ctt-frontend/package.json b/ctt-frontend/package.json index bc03b0f..f731b48 100644 --- a/ctt-frontend/package.json +++ b/ctt-frontend/package.json @@ -1,6 +1,6 @@ { "name": "ctt-frontend", - "version": "0.0.0", + "version": "1.0.0", "scripts": { "ng": "ng", "start": "ng serve",