Skip to content

Commit 78b487f

Browse files
committed
Refactor Makefile and Dockerfiles for concourse-slack-post/read resources
- Updated the Makefile to change the image naming convention, introducing IMAGE_PREFIX for better organization in the GHCR. - Modified Dockerfiles for both slack-read-resource and slack-post-resource to reflect the new image title format, ensuring consistency in naming. Why: These changes streamline the image management process and maintain a consistent naming convention across resources.
1 parent fe2be05 commit 78b487f

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
REGISTRY_HOST=ghcr.io
44
ORG_NAME=apptweak
55
## IMAGE is the full repository namespace.
6-
IMAGE=$(REGISTRY_HOST)/$(ORG_NAME)
6+
IMAGE_PREFIX=$(REGISTRY_HOST)/$(ORG_NAME)/concourse
77
## VERSION is taken from the VERSION file and prefixed with 'v' (e.g., v1.2.3).
88
VERSION := v$(shell cat VERSION)
99
## GH_USER is the current GitHub username.
@@ -29,22 +29,22 @@ build-read-resource:
2929
--build-arg VERSION=$(VERSION) \
3030
--build-arg VCS_REF=$(GIT_HEAD_SHA) \
3131
--build-arg BUILD_DATE=$(BUILD_DATE) \
32-
--tag "$(IMAGE)/slack-read-resource:$(VERSION)" \
32+
--tag "$(IMAGE_PREFIX)-slack-read-resource:$(VERSION)" \
3333
-f read/Dockerfile .
34-
docker tag "$(IMAGE)/slack-read-resource:$(VERSION)" "$(IMAGE)/slack-read-resource:latest"
34+
docker tag "$(IMAGE_PREFIX)-slack-read-resource:$(VERSION)" "$(IMAGE_PREFIX)-slack-read-resource:latest"
3535
$(DOCKER_LOGIN)
36-
docker push "$(IMAGE)/slack-read-resource:$(VERSION)"
37-
docker push "$(IMAGE)/slack-read-resource:latest"
36+
docker push "$(IMAGE_PREFIX)-slack-read-resource:$(VERSION)"
37+
docker push "$(IMAGE_PREFIX)-slack-read-resource:latest"
3838

3939
## Build the 'slack-post-resource' image, tag with version and latest, then push to GHCR.
4040
build-post-resource:
4141
docker build --platform "linux/amd64" \
4242
--build-arg VERSION=$(VERSION) \
4343
--build-arg VCS_REF=$(GIT_HEAD_SHA) \
4444
--build-arg BUILD_DATE=$(BUILD_DATE) \
45-
--tag "$(IMAGE)/slack-post-resource:$(VERSION)" \
45+
--tag "$(IMAGE_PREFIX)-slack-post-resource:$(VERSION)" \
4646
-f post/Dockerfile .
4747
$(DOCKER_LOGIN)
48-
docker tag "$(IMAGE)/slack-post-resource:$(VERSION)" "$(IMAGE)/slack-post-resource:latest"
49-
docker push "$(IMAGE)/slack-post-resource:$(VERSION)"
50-
docker push "$(IMAGE)/slack-post-resource:latest"
48+
docker tag "$(IMAGE_PREFIX)-slack-post-resource:$(VERSION)" "$(IMAGE_PREFIX)-slack-post-resource:latest"
49+
docker push "$(IMAGE_PREFIX)-slack-post-resource:$(VERSION)"
50+
docker push "$(IMAGE_PREFIX)-slack-post-resource:latest"

post/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ FROM alpine:3.22
1414
LABEL org.opencontainers.image.source=https://github.com/apptweak/concourse-slack-chat-resources
1515
LABEL org.opencontainers.image.url=https://github.com/apptweak/concourse-slack-chat-resources
1616
LABEL org.opencontainers.image.documentation=https://github.com/apptweak/concourse-slack-chat-resources#readme
17-
LABEL org.opencontainers.image.title=slack-post-resource
17+
LABEL org.opencontainers.image.title=concourse-slack-post-resource
1818
LABEL org.opencontainers.image.description="Concourse resource to post/update Slack messages and upload files"
1919
LABEL org.opencontainers.image.vendor=AppTweak
2020
LABEL org.opencontainers.image.version=$VERSION

read/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ FROM alpine:3.22
1616
LABEL org.opencontainers.image.source=https://github.com/apptweak/concourse-slack-chat-resources
1717
LABEL org.opencontainers.image.url=https://github.com/apptweak/concourse-slack-chat-resources
1818
LABEL org.opencontainers.image.documentation=https://github.com/apptweak/concourse-slack-chat-resources#readme
19-
LABEL org.opencontainers.image.title=slack-read-resource
19+
LABEL org.opencontainers.image.title=concourse-slack-read-resource
2020
LABEL org.opencontainers.image.description="Concourse resource to read Slack messages"
2121
LABEL org.opencontainers.image.vendor=AppTweak
2222
LABEL org.opencontainers.image.version=$VERSION

0 commit comments

Comments
 (0)