Skip to content

Commit

Permalink
Add 1.13 with OTP 24 (#14)
Browse files Browse the repository at this point in the history
* Add 1.13 with OTP 24

* Add test PR build (for 13 only atm) which doesn't push

* test 1.13-otp-25-slim, which we expect to fail

* Swap back to basic slim, test build the entire matrix

* add build-pr to the pull request template

Co-authored-by: Brian Stolz <[email protected]>
  • Loading branch information
matthewsecrist and tecnobrat authored Oct 7, 2022
1 parent 526414b commit 2b5823c
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ If you're adding a new image, make sure you have done the following.

* [ ] Added to lint workflow matrix (`.github/workflows/lint.yml`)
* [ ] Added to build workflow matrix (`.github/workflows/build.yml`)
* [ ] Added to build workflow matrix (`.github/workflows/build-pr.yml`)
* [ ] Added to Makefile (`Makefile`)
36 changes: 36 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build Test on PR

on:
pull_request:
branches:
- 'main'

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
elixir:
- "1.9"
- "1.10"
- "1.11"
- "1.12"
- "1.13"

steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v3
with:
context: ${{ matrix.elixir }}
push: false
tags: articulate/articulate-elixir:${{ matrix.elixir }}
platforms: linux/amd64,linux/arm64/v8
cache-from: type=registry,ref=articulate/articulate-elixir:${{ matrix.elixir }}
cache-to: type=inline
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- "1.10"
- "1.11"
- "1.12"
- "1.13"
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- "1.10"
- "1.11"
- "1.12"
- "1.13"
steps:
- uses: actions/checkout@v3
- uses: hadolint/[email protected]
Expand Down
18 changes: 18 additions & 0 deletions 1.13/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM elixir:1.13-slim

ENV SERVICE_ROOT /service
ENV SERVICE_USER service

ADD https://raw.githubusercontent.com/articulate/docker-consul-template-bootstrap/master/install.sh /tmp/consul_template_install.sh
ADD https://raw.githubusercontent.com/articulate/docker-consul-template-bootstrap/master/wait-for-it.sh /wait-for-it.sh

# install hex package manager
RUN mix local.hex --force && \
mix local.rebar --force && \
bash /tmp/consul_template_install.sh && rm /tmp/consul_template_install.sh && \
groupadd $SERVICE_USER && useradd --create-home --home $SERVICE_ROOT --gid $SERVICE_USER --shell /bin/bash $SERVICE_USER && \
chmod a+rx /wait-for-it.sh

WORKDIR $SERVICE_ROOT

ENTRYPOINT ["/entrypoint.sh"]
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ help:
@grep -hE '(^[a-zA-Z0-9\._-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m## /[33m/'
.PHONY: help

1.13: ## Build the Elixir 1.13 image
@echo "+ Elixir $@"
@docker build -t articulate/articulate-elixir:1.13 1.13
.PHONY: 1.13

1.12: ## Build the Elixir 1.12 image
@echo "+ Elixir $@"
@docker build -t articulate/articulate-elixir:1.12 1.12
Expand All @@ -23,5 +28,5 @@ help:
@docker build -t articulate/articulate-elixir:1.9 1.9
.PHONY: 1.9

all: 1.12 1.11 1.10 1.9 ## Build all Elixir images
all: 1.13 1.12 1.11 1.10 1.9 ## Build all Elixir images
.PHONY: all
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Base Elixir image which contains common dependencies used in our organization.

Elixir version:

* `1.13`
* `1.12`
* `1.11`
* `1.10`
Expand Down

0 comments on commit 2b5823c

Please sign in to comment.