mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-27 09:15:10 +00:00
build workflow
This commit is contained in:
parent
d4e824c50f
commit
a4d5e9df6c
2 changed files with 19 additions and 16 deletions
32
.github/workflows/ecr_build_push.yml
vendored
32
.github/workflows/ecr_build_push.yml
vendored
|
|
@ -14,11 +14,11 @@ jobs:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install kubectl
|
# - name: Install kubectl
|
||||||
uses: azure/setup-kubectl@v1
|
# uses: azure/setup-kubectl@v1
|
||||||
with:
|
# with:
|
||||||
version: 'v1.21.3'
|
# version: 'v1.21.3'
|
||||||
id: install
|
# id: install
|
||||||
|
|
||||||
- name: Configure AWS credentials
|
- name: Configure AWS credentials
|
||||||
uses: aws-actions/configure-aws-credentials@v1
|
uses: aws-actions/configure-aws-credentials@v1
|
||||||
|
|
@ -31,8 +31,8 @@ jobs:
|
||||||
id: login-ecr
|
id: login-ecr
|
||||||
uses: aws-actions/amazon-ecr-login@v1
|
uses: aws-actions/amazon-ecr-login@v1
|
||||||
|
|
||||||
- name: Load secrets and save to app.env
|
# - name: Load secrets and save to app.env
|
||||||
run: aws secretsmanager get-secret-value --secret-id simple_bank --query SecretString --output text | jq -r 'to_entries|map("\(.key)=\(.value)")|.[]' > app.env
|
# run: aws secretsmanager get-secret-value --secret-id simple_bank --query SecretString --output text | jq -r 'to_entries|map("\(.key)=\(.value)")|.[]' > app.env
|
||||||
|
|
||||||
- name: Build, tag, and push image to Amazon ECR
|
- name: Build, tag, and push image to Amazon ECR
|
||||||
env:
|
env:
|
||||||
|
|
@ -43,13 +43,13 @@ jobs:
|
||||||
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY:latest .
|
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY:latest .
|
||||||
docker push -a $ECR_REGISTRY/$ECR_REPOSITORY
|
docker push -a $ECR_REGISTRY/$ECR_REPOSITORY
|
||||||
|
|
||||||
- name: Update kube config
|
# - name: Update kube config
|
||||||
run: aws eks update-kubeconfig --name seleneks --region ap-southeast-1
|
# run: aws eks update-kubeconfig --name seleneks --region ap-southeast-1
|
||||||
|
|
||||||
- name: Deploy image to Amazon EKS
|
# - name: Deploy image to Amazon EKS
|
||||||
run: |
|
# run: |
|
||||||
kubectl apply -f eks/aws-auth.yaml
|
# kubectl apply -f eks/aws-auth.yaml
|
||||||
kubectl apply -f eks/deployment.yaml
|
# kubectl apply -f eks/deployment.yaml
|
||||||
kubectl apply -f eks/service.yaml
|
# kubectl apply -f eks/service.yaml
|
||||||
kubectl apply -f eks/issuer.yaml
|
# kubectl apply -f eks/issuer.yaml
|
||||||
kubectl apply -f eks/ingress.yaml
|
# kubectl apply -f eks/ingress.yaml
|
||||||
|
|
|
||||||
|
|
@ -21,3 +21,6 @@
|
||||||
|
|
||||||
- AWS_ACCESS_KEY_ID
|
- AWS_ACCESS_KEY_ID
|
||||||
- AWS_SECRET_ACCESS_KEY
|
- AWS_SECRET_ACCESS_KEY
|
||||||
|
|
||||||
|
- setup Branch protection rule
|
||||||
|
- checkout new feature branch, merge request, delete branch
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue