Skip to content

Commit

Permalink
Retool build system
Browse files Browse the repository at this point in the history
  • Loading branch information
jhunt committed Sep 11, 2020
1 parent ff02a1b commit 1f4720e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
FROM alpine:3.11
FROM alpine:3

ARG VERSION
ARG BUILD_DATE
ARG VCS_REF
LABEL maintainer="Stark & Wayne <[email protected]>" \
summary="Concourse Slack Notifications Resource" \
version=$VERSION \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/cloudfoundry-community/slack-notification-resource.git" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.schema-version="1.0.0"

RUN apk add --no-cache curl bash jq gettext-dev

Expand Down
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
IMAGE ?= cfcommunity/slack-notification-resource
VERSION ?= dev

build:
docker build \
--build-arg BUILD_DATE="$(shell date -u --iso-8601)" \
--build-arg VCS_REF="$(shell git rev-parse --short HEAD)" \
--build-arg vERSION="$(VERSION)" \
. -t $(IMAGE):$(VERSION)

push: build
docker push $(IMAGE):$(VERSION)

release: build
docker tag $(IMAGE):$(VERSION) $(IMAGE):latest
docker push $(IMAGE):latest
docker push $(IMAGE):$(VERSION)
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,25 @@ body: {

```
## Release Engineering
To build local versions of this, for testing:
$ docker build -t slack-notification-resources
Tests will run as part of the build, and be left in the image for
future testing. This adds about 100k to the image.
To cut a new officialy release of the
`cfcommunity/slack-notification-resource` image on
[Docker Hub][hub]:
$ make VERSION=x.y.z release
[hub]: https://hub.docker.com/r/cfcommunity/slack-notification-resource
[attach]: https://api.slack.com/docs/message-attachment
[uidmap]: https://api.slack.com/changelog/2017-09-the-one-about-usernames#mapping
[chans]: https://api.slack.com/docs/message-formatting#linking_to_channels_and_users
Expand Down

0 comments on commit 1f4720e

Please sign in to comment.