Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood committed Mar 15, 2024
2 parents f1e9a03 + 655219c commit 8b93ef0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 59 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Build & Publish
name: Build, Test & Publish

on:
push:
branches:
Expand Down Expand Up @@ -81,6 +82,8 @@ jobs:
# list of Docker images to use as base name for tags
images: |
ghcr.io/${{ github.repository_owner }}/haproxy
flavor: |
latest=false
-
name: Find and Replace
uses: jacobtomlinson/gha-find-replace@v3
Expand Down Expand Up @@ -114,10 +117,12 @@ jobs:
docker ps -a --filter "label=pygmy.name"
-
name: Export configuration
run: pygmy --config examples/pygmy.basic.yml export -o ./exported-config.yml
run: |
pygmy --config examples/pygmy.basic.yml export -o ./exported-config.yml
-
name: Show configuration
run: cat ./exported-config.yml
run: |
cat ./exported-config.yml
# -
# name: SSH Key test
# run: |
Expand All @@ -131,13 +136,17 @@ jobs:
stat /usr/lib/systemd/resolved.conf.d/docker.amazee.io.conf;
grep "127.0.0.1" /usr/lib/systemd/resolved.conf.d/docker.amazee.io.conf;
grep "docker.amazee.io" /usr/lib/systemd/resolved.conf.d/docker.amazee.io.conf;
-
name: haproxy test
run: |
curl http://docker.amazee.io/stats | grep 'class=px' | grep 'mailhog.docker.amazee.io';
curl http://docker.amazee.io/stats | grep 'HAProxy version';
-
name: Test the amazeeio-network for expected results
run: |
docker network inspect amazeeio-network | jq '.[].Name' | grep "amazeeio-network";
docker network inspect amazeeio-network | jq '.[].Containers' | jq '.[].Name' | grep "amazeeio-haproxy";
docker network inspect amazeeio-network | jq '.[].Containers' | jq '.[].Name' | grep "amazeeio-mailhog";
docker network inspect amazeeio-network | jq '.[].Containers' | jq '.[].Name' | grep "amazeeio-portainer";
docker network inspect amazeeio-network | jq '.[].Containers' | jq '.[].IPv4Address';
docker network inspect amazeeio-network | jq '.[].Containers' | jq '.[].IPv4Address' | grep "10.99.99.";
-
Expand All @@ -149,18 +158,12 @@ jobs:
docker inspect amazeeio-haproxy | jq '.[].Config.Labels["pygmy.hocuspocus"]' | grep "42";
docker inspect amazeeio-haproxy | jq '.[].Config.Labels["pygmy.abracadabra"]' | grep "1";
docker inspect amazeeio-haproxy | jq '.[].Config.Labels["pygmy.opensesame"]' | grep "correct";
docker inspect amazeeio-portainer | jq '.[].Config.Labels["pygmy.hocuspocus"]' | grep "42";
docker inspect amazeeio-portainer | jq '.[].Config.Labels["pygmy.abracadabra"]' | grep "1";
docker inspect amazeeio-portainer | jq '.[].Config.Labels["pygmy.opensesame"]' | grep "correct";
docker inspect amazeeio-ssh-agent | jq '.[].Config.Labels["pygmy.hocuspocus"]' | grep "42";
docker inspect amazeeio-ssh-agent | jq '.[].Config.Labels["pygmy.abracadabra"]' | grep "1";
docker inspect amazeeio-ssh-agent | jq '.[].Config.Labels["pygmy.opensesame"]' | grep "correct";
docker inspect amazeeio-mailhog | jq '.[].Config.Labels["pygmy.hocuspocus"]' | grep "42";
docker inspect amazeeio-mailhog | jq '.[].Config.Labels["pygmy.abracadabra"]' | grep "1";
docker inspect amazeeio-mailhog | jq '.[].Config.Labels["pygmy.opensesame"]' | grep "correct";
-
name: Cowsay test
run: pygmy --config examples/pygmy.basic.yml up | grep 'holy ship' || true;
-
name: Test the container image overrides configuration
run: |
Expand Down Expand Up @@ -205,7 +208,8 @@ jobs:
pygmy --config examples/pygmy.yml status | grep 'Running as container amazeeio-' && true || false;
-
name: Cleanup pygmy
run: pygmy clean;
run: |
pygmy --config examples/pygmy.yml clean;
-
name: Cleanup after tests.
run: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM haproxy:2.8-alpine3.17
FROM haproxy:2.9-alpine3.19

USER root

Expand Down
47 changes: 0 additions & 47 deletions examples/pygmy.basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,50 +33,3 @@ services:
Config:
Labels:
- pygmy.enable: false

amazeeio-portainer:
Config:
Image: portainer/portainer
Env:
- "AMAZEEIO=AMAZEEIO"
- "AMAZEEIO_URL=portainer.docker.amazee.io"
- "AMAZEEIO_HTTP_PORT=9000"
Labels:
- pygmy.enable: true
- pygmy.name: amazeeio-portainer
- pygmy.network: amazeeio-network
- pygmy.weight: 23
- pygmy.url: http://portainer.docker.amazee.io
- pygmy.hocuspocus: 42
- pygmy.abracadabra: true
- pygmy.opensesame: correct
ExposedPorts:
9000/tcp: {}
HostConfig:
Binds:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
PortBindings:
8000/tcp:
- HostPort: 8200
9000/tcp:
- HostPort: 8100

pygmy-cowsay:
Config:
Image: mbentley/cowsay
Cmd:
- holy
- ship
Labels:
- pygmy.enable: true
- pygmy.discrete: false
- pygmy.name: pygmy-cowsay
- pygmy.output: true
- pygmy.weight: 99
HostConfig:
AutoRemove: true

volumes:
portainer_data:
Name: portainer_data

0 comments on commit 8b93ef0

Please sign in to comment.