-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97e9087
commit 4e04e7e
Showing
2 changed files
with
33 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,38 @@ | ||
# Push to main quicker | ||
# Make the deployment of updated docker containers quick and easy in the future. | ||
|
||
.PHONY: all add commit push | ||
# Docker and AWS section | ||
.PHONY: docker-login docker-build docker-tag docker-push docker-verify docker-all | ||
|
||
docker-all: docker-login docker-build docker-tag docker-push docker-verify | ||
|
||
docker-login: | ||
aws ecr get-login-password --region $(REGION) | docker login --username AWS --password-stdin $(ACCOUNT_ID).dkr.ecr.$(REGION).amazonaws.com | ||
|
||
docker-build: | ||
docker build -t $(REPO_NAME) . | ||
|
||
docker-tag: | ||
docker tag $(REPO_NAME):latest $(ACCOUNT_ID).dkr.ecr.$(REGION).amazonaws.com/$(REPO_NAME):latest | ||
|
||
docker-push: | ||
docker push $(ACCOUNT_ID).dkr.ecr.$(REGION).amazonaws.com/$(REPO_NAME):latest | ||
|
||
docker-verify: | ||
aws ecr describe-images --repository-name $(REPO_NAME) --region $(REGION) | ||
|
||
# Git section | ||
.PHONY: git-all git-add git-commit git-push | ||
|
||
DATE := $(shell date +%Y-%m-%d) | ||
|
||
all: add commit push | ||
git-all: git-add git-commit git-push | ||
|
||
add: | ||
git-add: | ||
git add . | ||
|
||
commit: | ||
git-commit: | ||
@read -p "Please enter an additional commit message: " msg; \ | ||
git commit -m "Updates $(DATE) - $$msg" | ||
git commit -m "updates $(DATE) - $$msg" | ||
|
||
push: | ||
git-push: | ||
git push |