From 17e88da2dc4055251c0320bbe47bf1bb02411ba9 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 26 Aug 2023 13:03:19 -0400 Subject: [PATCH] fix: install docker-compose-plugin in ci This used to be installed as moby-compose in Github Runners but they switched to the docker apt repo and don't install the plugin from the apt repository as it is outdated so we have to do it ourselves. --- .github/workflows/ci.yml | 5 ++++- tests.mk | 10 +++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bfa69123..5f45f31ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,9 @@ concurrency: group: build-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true +env: + INSTALL_DOCKER_REPO: 1 + jobs: check-commit: runs-on: ubuntu-20.04 @@ -138,7 +141,7 @@ jobs: # uses: luchihoratiu/debug-via-ssh@main # with: # NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} - # SSH_PASS: ${{ secrets.SSH_PASS }} + # SSH_PASS: ${{ secrets.NGROK_SSH_PASS }} - name: run ci timeout-minutes: 30 diff --git a/tests.mk b/tests.mk index a6493efdb..18d9d53b9 100644 --- a/tests.mk +++ b/tests.mk @@ -42,7 +42,15 @@ else endif endif -ci-dependencies: bats shellcheck xmlstarlet +ci-dependencies: bats shellcheck xmlstarlet docker-compose-apt-repo + +docker-compose-apt-repo: +ifdef INSTALL_DOCKER_REPO + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor --yes -o /usr/share/keyrings/docker.gpg + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(shell . /etc/os-release && echo "$$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list + sudo apt update + sudo apt-get -qq -y --no-install-recommends install docker-compose-plugin +endif setup-deploy-tests: ifdef ENABLE_DOKKU_TRACE