Skip to content

Commit

Permalink
Merge pull request #202 from desci-labs/develop
Browse files Browse the repository at this point in the history
promote main
  • Loading branch information
hubsmoke authored Jan 30, 2024
2 parents f218b9f + eba5562 commit e7e74b4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-repo-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
# Build and tag the image
docker build \
-t $CONTAINER_IMAGE:latest \
-t $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE \
-t $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE-prod \
./desci-repo
# Add additional steps here like scanning of image
Expand Down Expand Up @@ -147,10 +147,10 @@ jobs:
run: |
# Push image to AWS ECR
aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com
docker tag $CONTAINER_IMAGE:latest $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE:${{ github.sha }}
docker tag $CONTAINER_IMAGE:latest $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE:latest
docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE:${{ github.sha }}
docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE:latest
docker tag $CONTAINER_IMAGE:latest $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE-prod:${{ github.sha }}
docker tag $CONTAINER_IMAGE:latest $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE-prod:latest
docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE-prod:${{ github.sha }}
docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE-prod:latest
- name: Deploy to EKS (DEV)
# uses: steebchen/kubectl@v2.0.0
Expand All @@ -169,7 +169,7 @@ jobs:
if: github.ref == 'refs/heads/main'
run: | # defaults to latest kubectl binary version
kubectl apply -f desci-repo/kubernetes/deployment.yaml
kubectl set image deployment/desci-repo-server desci-repo-server=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE:${{ github.sha }} --record
kubectl set image deployment/desci-repo-server-prod desci-repo-server-prod=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$CONTAINER_IMAGE-prod:${{ github.sha }} --record
- name: Verify EKS Deployment (DEV)
if: github.ref == 'refs/heads/develop'
Expand All @@ -184,4 +184,4 @@ jobs:
- name: Verify EKS Deployment (PROD)
if: github.ref == 'refs/heads/main'
run: |
kubectl rollout status deployment/desci-repo-server
kubectl rollout status deployment/desci-repo-server-prod
6 changes: 3 additions & 3 deletions desci-repo/kubernetes/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
name: desci-repo-server
name: desci-repo-server-prod
labels:
App: DesciRepoServerProd
spec:
Expand Down Expand Up @@ -55,8 +55,8 @@ spec:
App: DesciRepoServerProd
spec:
containers:
- image: 523044037273.dkr.ecr.us-east-2.amazonaws.com/desci-repo-server:latest
name: desci-repo-server
- image: 523044037273.dkr.ecr.us-east-2.amazonaws.com/desci-repo-server-prod:latest
name: desci-repo-server-prod
command: ['/bin/bash', '-c']
args:
- echo "SOURCING ENV"; source /vault/secrets/config; NODE_PATH=./dist node ./dist/index.js;
Expand Down

0 comments on commit e7e74b4

Please sign in to comment.