Skip to content

Commit 7dec990

Browse files
committed
wip
1 parent ce4c37c commit 7dec990

File tree

5 files changed

+11
-77
lines changed

5 files changed

+11
-77
lines changed

.github/workflows/ci.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ jobs:
1313
name: OTP ${{matrix.otp}}
1414
strategy:
1515
matrix:
16-
otp: ['25.3', '24.3.4.9']
16+
otp: ['26.0', '25.3', '24.3']
1717
runs-on: 'ubuntu-22.04'
1818
steps:
1919
- uses: actions/checkout@v3
20-
with:
21-
fetch-depth: 0
2220
- uses: erlef/setup-beam@v1
2321
with:
2422
otp-version: ${{ matrix.otp }}
@@ -34,14 +32,17 @@ jobs:
3432
name: docker container test with OTP ${{matrix.otp}}
3533
strategy:
3634
matrix:
37-
otp: ['25.3', '24.3.4.9']
35+
otp: ['25.3', '24.3']
3836
runs-on: 'ubuntu-22.04'
3937
env:
4038
OTP_RELEASE: ${{ matrix.otp }}
4139
steps:
4240
- uses: actions/checkout@v3
41+
- uses: docker/setup-buildx-action@v2
42+
- uses: erlef/setup-beam@v1
4343
with:
44-
fetch-depth: 0
44+
otp-version: ${{ matrix.otp }}
45+
rebar3-version: '3.21.0'
4546
- run: ./ci/build_docker_image.sh
4647
- run: ./ci/start_demo_cluster.sh
4748
- run: ./ci/test_amoc_cluster.sh

Dockerfile

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
ARG otp_vsn=25.3
1+
ARG otp_vsn
22
FROM erlang:${otp_vsn} as builder
33
MAINTAINER Erlang Solutions <mongoose-im@erlang-solutions.com>
44

5-
RUN useradd -ms /bin/bash amoc
6-
USER amoc
7-
WORKDIR /home/amoc/amoc_arsenal_xmpp
5+
WORKDIR /amoc_arsenal_xmpp
86

97
COPY ./rebar.config ./rebar.lock ./
108
RUN rebar3 deps && rebar3 compile -d
@@ -13,6 +11,6 @@ COPY ./rel rel
1311
COPY ./src src
1412
RUN rebar3 release
1513

16-
ENV PATH "/home/amoc/amoc_arsenal_xmpp/_build/default/rel/amoc_arsenal_xmpp/bin:${PATH}"
14+
ENV PATH "/amoc_arsenal_xmpp/_build/default/rel/amoc_arsenal_xmpp/bin:${PATH}"
1715

18-
CMD ["/home/amoc/amoc_arsenal_xmpp/_build/default/rel/amoc_arsenal_xmpp/bin/amoc_arsenal_xmpp", "console", "-noshell", "-noinput", "+Bd"]
16+
CMD ["/amoc_arsenal_xmpp/_build/default/rel/amoc_arsenal_xmpp/bin/amoc_arsenal_xmpp", "console", "-noshell", "-noinput", "+Bd"]

ci/build_docker_image.sh

-3
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@ cd "$git_root"
66

77
version="$(git rev-parse --short HEAD)"
88
otp_vsn="${OTP_RELEASE:-25.3}"
9-
rebar_vsn="${REBAR_RELEASE:-3.20.0}"
109
echo "ERLANG/OTP '${otp_vsn}'"
11-
echo "REBAR '${rebar_vsn}'"
1210

1311
docker build \
1412
-f Dockerfile \
1513
-t "amoc-arsenal-xmpp:${version}" \
1614
-t "amoc-arsenal-xmpp:latest" \
1715
--build-arg "otp_vsn=${otp_vsn}" \
18-
--build-arg "rebar_vsn=${rebar_vsn}" \
1916
.

ci/helper.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ docker_compose() {
6969
}
7070

7171
function amoc_eval() {
72-
local exec_path="/home/amoc/amoc_arsenal_xmpp/_build/default/rel/amoc_arsenal_xmpp/bin/amoc_arsenal_xmpp"
72+
local exec_path="/amoc_arsenal_xmpp/_build/default/rel/amoc_arsenal_xmpp/bin/amoc_arsenal_xmpp"
7373
local service="$1"
7474
shift 1
7575
docker_compose exec -T "$service" "$exec_path" eval "$@"

ci/wait_for_healthcheck.sh

-62
This file was deleted.

0 commit comments

Comments
 (0)