This repository was archived by the owner on May 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +30
-12
lines changed Expand file tree Collapse file tree 4 files changed +30
-12
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,28 @@ inputs:
11
11
CA_CRT :
12
12
description : Kubernetes CA certificate
13
13
required : true
14
+ KUBE_SERVER :
15
+ description : Kubernetes server
16
+ required : true
17
+ SERVICEACCOUNT_TOKEN :
18
+ description : Kubernetes service account token
19
+ required : true
14
20
runs :
15
21
using : composite
16
22
steps :
23
+ - name : Setup Environment variables
24
+ run : |
25
+ echo "NAMESPACE=${{ inputs.K8S_NAMESPACE }}" >> "$GITHUB_ENV"
26
+ echo "KUBE_SERVER=${{ inputs.KUBE_SERVER }}" >> "$GITHUB_ENV"
27
+ echo "SERVICEACCOUNT_TOKEN=${{ inputs.SERVICEACCOUNT_TOKEN }}" >> "$GITHUB_ENV"
28
+ echo "CA_CRT=${{ inputs.CA_CRT }}" >> "$GITHUB_ENV"
29
+ echo "APP_NAME=deriv-api-docs" >> "$GITHUB_ENV"
30
+ shell : bash
17
31
- name : Deploying to k8s cluster for service ${{ inputs.K8S_NAMESPACE }} 🚀
18
- run : |
19
- export NAMESPACE=${{ inputs.K8S_NAMESPACE }}
20
- git clone https://github.com/binary-com/devops-ci-scripts
21
- cd devops-ci-scripts/k8s-build_tools
22
- echo ${{ inputs.CA_CRT }} | base64 --decode > ca.crt
23
- export CA="ca.crt"
24
- ./release.sh deriv-com-api ${{ inputs.K8S_VERSION }}
32
+ run : |
33
+ git clone https://github.com/binary-com/devops-ci-scripts
34
+ cd devops-ci-scripts/k8s-build_tools
35
+ echo ${{ inputs.CA_CRT }} | base64 --decode > ca.crt
36
+ export CA="ca.crt"
37
+ ./release.sh ${APP_NAME} ${{ inputs.K8S_VERSION }}
25
38
shell : bash
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ inputs:
17
17
DOCKERHUB_PASSWORD :
18
18
description : Docker Hub password
19
19
required : true
20
- runs :
20
+ runs :
21
21
using : composite
22
22
steps :
23
23
- name : Building docker image 🐳
@@ -26,13 +26,13 @@ runs:
26
26
shell : bash
27
27
- name : Verify nginx image
28
28
run : |
29
- set -e
30
- docker run --rm ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }} nginx -t
31
- echo "docker image validated successfully"
29
+ set -e
30
+ docker run --rm ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }} nginx -t
31
+ echo "docker image validated successfully"
32
32
shell : bash
33
33
- name : Pushing Image to docker hub 🐳
34
34
run : |
35
- echo ${{ inputs.DOCKERHUB_PASSWORD }} | docker login -u $$ {{ inputs.DOCKERHUB_USERNAME }} --password-stdin
35
+ echo ${{ inputs.DOCKERHUB_PASSWORD }} | docker login -u ${{ inputs.DOCKERHUB_USERNAME }} --password-stdin
36
36
docker push ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_IMAGE_TAG }}
37
37
docker push ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }}
38
38
shell : bash
Original file line number Diff line number Diff line change 47
47
K8S_VERSION : ${{ github.ref_name }}
48
48
K8S_NAMESPACE : ' deriv-com-api-production'
49
49
CA_CRT : ${{ secrets.CA_CRT }}
50
+ SERVICEACCOUNT_TOKEN : ${{ secrets.SERVICEACCOUNT_TOKEN }}
51
+ KUBE_SERVER : ${{ secrets.KUBE_SERVER }}
52
+
50
53
send_slack_notification :
51
54
name : Send Slack Notification
52
55
environment : Production
Original file line number Diff line number Diff line change 40
40
K8S_VERSION : ${{ github.ref_name }}
41
41
K8S_NAMESPACE : ' deriv-com-api-staging'
42
42
CA_CRT : ${{ secrets.CA_CRT }}
43
+ SERVICEACCOUNT_TOKEN : ${{ secrets.SERVICEACCOUNT_TOKEN }}
44
+ KUBE_SERVER : ${{ secrets.KUBE_SERVER }}
You can’t perform that action at this time.
0 commit comments