Skip to content

Commit

Permalink
added docker hub credentials to the ReCiter buildSpec.yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
mrj4001 committed Feb 3, 2025
1 parent 08f6e8f commit 0169879
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions k8-buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,16 @@ phases:
- mvn clean install -Dmaven.test.skip=true
- |
if expr "${BRANCH}" : ".*master" >/dev/null || expr "${BRANCH}" : ".*dev" >/dev/null; then
# Check if Docker is installed
echo "Checking if Docker is installed"
docker --version
which docker
# Verify Docker access by running a simple Docker command
echo "Checking if Docker is accessible..."
docker info
docker ps
docker build --tag $REPOSITORY_URI:$TAG .
docker push $REPOSITORY_URI:$TAG
# Log out from the Docker registry to clear credentials
docker logout $REPOSITORY_URI
aws eks update-kubeconfig --name $EKS_CLUSTER_NAME --region us-east-1 --role-arn $EKS_KUBECTL_ROLE_ARN
fi
if expr "${BRANCH}" : ".*master" >/dev/null; then
kubectl set image deployment/reciter-prod reciter=$REPOSITORY_URI:$TAG -n $EKS_CLUSTER_NAME
fi
if expr "${BRANCH}" : ".*dev" >/dev/null; then
kubectl set image deployment/reciter-dev reciter=$REPOSITORY_URI:$TAG -n $EKS_CLUSTER_NAME
# Log out from the Docker registry to clear credentials
docker logout $REPOSITORY_URI
fi

0 comments on commit 0169879

Please sign in to comment.