diff --git a/.github/workflows/build-push-buildx.yaml b/.github/workflows/build-push-buildx.yaml index 954bb2472..8f09e6187 100644 --- a/.github/workflows/build-push-buildx.yaml +++ b/.github/workflows/build-push-buildx.yaml @@ -51,9 +51,6 @@ jobs: - '!images/**' others: - 'images/commons/**' - - 'images/elasticsearch-7/**' - - 'images/kibana-7/**' - - 'images/logstash-7/**' - 'images/mongo-4/**' - 'images/nginx/**' - 'images/nginx-drupal/**' @@ -89,7 +86,7 @@ jobs: # key: ${{ runner.os }}-buildx-${{ matrix.package_group }} - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ matrix.package_group }}-${{ hashFiles('**/images') }} diff --git a/.github/workflows/build-push.yaml b/.github/workflows/build-push.yaml deleted file mode 100644 index a7488f49b..000000000 --- a/.github/workflows/build-push.yaml +++ /dev/null @@ -1,468 +0,0 @@ -name: Lagoon Image Build - -on: - push: - branches: - - 'testing-docker_buildx' - -jobs: - build: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - image_name: commons - context: images/commons - dockerfile: Dockerfile - - image_name: nginx - context: images/nginx - dockerfile: Dockerfile - requires: commons - - image_name: nginx-drupal - context: images/nginx-drupal - dockerfile: Dockerfile - requires: nginx - - image_name: mariadb-10.4 - context: images/mariadb - dockerfile: 10.4.Dockerfile - requires: commons - - image_name: mariadb-10.4-drupal - context: images/mariadb-drupal - dockerfile: 10.4.Dockerfile - requires: mariadb-10.4 - - image_name: mariadb-10.5 - context: images/mariadb - dockerfile: 10.5.Dockerfile - requires: commons - - image_name: mariadb-10.5-drupal - context: images/mariadb-drupal - dockerfile: 10.5.Dockerfile - requires: mariadb-10.5 - - image_name: mariadb-10.6 - context: images/mariadb - dockerfile: 10.6.Dockerfile - requires: commons - - image_name: mariadb-10.6-drupal - context: images/mariadb-drupal - dockerfile: 10.6.Dockerfile - requires: mariadb-10.11 - - image_name: mariadb-10.11 - context: images/mariadb - dockerfile: 10.11.Dockerfile - requires: commons - - image_name: mariadb-10.11-drupal - context: images/mariadb-drupal - dockerfile: 10.11.Dockerfile - requires: mariadb-10.11 - - image_name: mongo-4 - context: images/mongo - dockerfile: 4.Dockerfile - requires: commons - - image_name: node-18 - context: images/node - dockerfile: 18.Dockerfile - requires: commons - - image_name: node-18-builder - context: images/node-builder - dockerfile: 18.Dockerfile - requires: node-18 - - image_name: node-18-cli - context: images/node-cli - dockerfile: 18.Dockerfile - requires: node-18 - - image_name: node-20 - context: images/node - dockerfile: 20.Dockerfile - requires: commons - - image_name: node-20-builder - context: images/node-builder - dockerfile: 20.Dockerfile - requires: node-20 - - image_name: node-20-cli - context: images/node-cli - dockerfile: 20.Dockerfile - requires: node-20 - - image_name: opensearch-2 - context: images/opensearch - dockerfile: 2.Dockerfile - requires: commons - - image_name: php-8.0-fpm - context: images/php-fpm - dockerfile: 8.0.Dockerfile - requires: commons - - image_name: php-8.0-cli - context: images/php-cli - dockerfile: 8.0.Dockerfile - requires: php-8.0-fpm - - image_name: php-8.0-cli-drupal - context: images/php-cli-drupal - dockerfile: 8.0.Dockerfile - requires: php-8.0-cli - - image_name: php-8.1-fpm - context: images/php-fpm - dockerfile: 8.1.Dockerfile - requires: commons - - image_name: php-8.1-cli - context: images/php-cli - dockerfile: 8.1.Dockerfile - requires: php-8.1-fpm - - image_name: php-8.1-cli-drupal - context: images/php-cli-drupal - dockerfile: 8.1.Dockerfile - requires: php-8.1-cli - - image_name: php-8.2-fpm - context: images/php-fpm - dockerfile: 8.2.Dockerfile - requires: commons - - image_name: php-8.2-cli - context: images/php-cli - dockerfile: 8.2.Dockerfile - requires: php-8.2-fpm - - image_name: php-8.2-cli-drupal - context: images/php-cli-drupal - dockerfile: 8.2.Dockerfile - requires: php-8.2-cli - - image_name: postgres-11 - context: images/postgres - dockerfile: 11.Dockerfile - requires: commons - - image_name: postgres-11-drupal - context: images/postgres-drupal - dockerfile: 11.Dockerfile - requires: postgres-11 - - image_name: postgres-11-ckan - context: images/postgres-ckan - dockerfile: 11.Dockerfile - requires: postgres-11 - - image_name: postgres-12 - context: images/postgres - dockerfile: 12.Dockerfile - requires: commons - - image_name: postgres-12-drupal - context: images/postgres-drupal - dockerfile: 12.Dockerfile - requires: postgres-12 - - image_name: postgres-13 - context: images/postgres - dockerfile: 13.Dockerfile - requires: commons - - image_name: postgres-13-drupal - context: images/postgres-drupal - dockerfile: 13.Dockerfile - requires: postgres-13 - - image_name: postgres-14 - context: images/postgres - dockerfile: 14.Dockerfile - requires: commons - - image_name: postgres-14-drupal - context: images/postgres-drupal - dockerfile: 14.Dockerfile - requires: postgres-14 - - image_name: postgres-15 - context: images/postgres - dockerfile: 15.Dockerfile - requires: commons - - image_name: postgres-15-drupal - context: images/postgres-drupal - dockerfile: 15.Dockerfile - requires: postgres-15 - - image_name: postgres-16 - context: images/postgres - dockerfile: 16.Dockerfile - requires: commons - - image_name: postgres-16-drupal - context: images/postgres-drupal - dockerfile: 16.Dockerfile - requires: postgres-16 - - image_name: python-3.8 - context: images/python - dockerfile: 3.8.Dockerfile - requires: commons - - image_name: python-3.9 - context: images/python - dockerfile: 3.9.Dockerfile - requires: commons - - image_name: python-3.10 - context: images/python - dockerfile: 3.10.Dockerfile - requires: commons - - image_name: python-3.11 - context: images/python - dockerfile: 3.11.Dockerfile - requires: commons - - image_name: python-3.12 - context: images/python - dockerfile: 3.12.Dockerfile - requires: commons - - image_name: rabbitmq - context: images/rabbitmq - dockerfile: Dockerfile - requires: commons - - image_name: rabbitmq-cluster - context: images/rabbitmq-cluster - dockerfile: Dockerfile - requires: rabbitmq - - image_name: redis-6 - context: images/redis - dockerfile: 6.Dockerfile - requires: commons - - image_name: redis-6-persistent - context: images/redis-persistent - dockerfile: 6.Dockerfile - requires: redis-6 - - image_name: redis-7 - context: images/redis - dockerfile: 7.Dockerfile - requires: commons - - image_name: redis-7-persistent - context: images/redis-persistent - dockerfile: 7.Dockerfile - requires: redis-7 - - image_name: ruby-3.0 - context: images/ruby - dockerfile: 3.0.Dockerfile - requires: commons - - image_name: ruby-3.1 - context: images/ruby - dockerfile: 3.1.Dockerfile - requires: commons - - image_name: ruby-3.2 - context: images/ruby - dockerfile: 3.2.Dockerfile - requires: commons - - image_name: solr-7 - context: images/solr - dockerfile: 7.Dockerfile - requires: commons - - image_name: solr-7-drupal - context: images/solr-drupal - dockerfile: 7.Dockerfile - requires: solr-7 - - image_name: solr-8 - context: images/solr - dockerfile: 8.Dockerfile - requires: commons - - image_name: solr-8-drupal - context: images/solr-drupal - dockerfile: 8.Dockerfile - requires: solr-8 - - image_name: varnish-6 - context: images/varnish - dockerfile: 6.Dockerfile - requires: commons - - image_name: varnish-6-drupal - context: images/varnish-drupal - dockerfile: 6.Dockerfile - requires: varnish-6 - - image_name: varnish-6-persistent - context: images/varnish-persistent - dockerfile: 6.Dockerfile - requires: varnish-6 - - image_name: varnish-6-persistent-drupal - context: images/varnish-persistent-drupal - dockerfile: 6.Dockerfile - requires: varnish-6-drupal - - image_name: varnish-7 - context: images/varnish - dockerfile: 7.Dockerfile - requires: commons - - image_name: varnish-7-drupal - context: images/varnish-drupal - dockerfile: 7.Dockerfile - requires: varnish-7 - - image_name: varnish-7-persistent - context: images/varnish-persistent - dockerfile: 7.Dockerfile - requires: varnish-7 - - image_name: varnish-7-persistent-drupal - context: images/varnish-persistent-drupal - dockerfile: 7.Dockerfile - requires: varnish-7-drupal - - steps: - - - name: Wait for commons upstream - if: ${{ matrix.requires == 'commons' }} - run: sleep 60s - shell: bash - - - name: Wait for non-commons upstream - if: ${{ matrix.image_name != 'commons' && matrix.requires != 'commons' }} - run: sleep 180s - shell: bash - - - name: Wait for dependent builds to succeed - if: ${{ matrix.requires }} - uses: lewagon/wait-on-check-action@v1.3.1 - with: - ref: ${{ github.ref }} - check-regexp: 'build \(${{ matrix.requires }},.?' - repo-token: ${{ secrets.GITHUB_TOKEN }} - wait-interval: 60 - - - name: Checkout - uses: actions/checkout@v4 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v3 - with: - # list of Docker images to use as base name for tags - images: | - ghcr.io/${{ github.repository_owner }}/${{ matrix.image_name }} - labels: | - org.opencontainers.image.authors=The Lagoon Authors - org.opencontainers.image.description=${{ matrix.image_name }} image built for Lagoon - org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/lagoon-images/tree/${{ github.ref_name }}/${{ matrix.context }}/${{ matrix.dockerfile }} - org.opencontainers.image.title=${{ github.repository_owner }}/${{ matrix.image_name }} - org.opencontainers.image.url=https://github.com/uselagoon/lagoon-images - tags: | - type=ref,event=branch - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - # - - # name: Login to DockerHub - # uses: docker/login-action@v3 - # with: - # username: ${{ secrets.DOCKERHUB_USERNAME }} - # password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Login to GHCR - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: ${{ matrix.context }} - file: ${{ matrix.context }}/${{ matrix.dockerfile }} - platforms: linux/amd64,linux/arm64 - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: | - type=registry,ref=docker.io/testlagoon/${{ matrix.image_name }}:main - type=registry,ref=ghcr.io/tobybellwood/${{ matrix.image_name }}:${{ github.ref_name }} - build-args: | - IMAGE_REPO=ghcr.io/${{ github.repository_owner }} - IMAGE_TAG=${{ github.ref_name }} - BUILDKIT_INLINE_CACHE=1 - # - - # uses: anchore/sbom-action@v0 - # with: - # image: ghcr.io/${{ github.repository_owner }}/${{ matrix.image_name }}:${{ github.ref_name }} - # artifact-name: ${{ matrix.image_name }}.cyclonedx - # format: cyclonedx - # - - # name: view SBOM - # run: | - # cat /tmp/sbom-action-*/${{ matrix.image_name }}.cyclonedx - - app_test: - runs-on: ubuntu-latest - needs: build - defaults: - run: - working-directory: ./tests - steps: - - - name: Checkout - uses: actions/checkout@v4 - - - name: Checkout - uses: actions/checkout@v4 - with: - repository: uselagoon/lagoon-examples - path: tests - - - name: Add additional tests - run: | - git submodule add -b php74 https://github.com/lagoon-examples/drupal9-postgres drupal9-postgres-php74 - git submodule add -b php81 https://github.com/lagoon-examples/drupal9-base drupal9-base-php81 - - - name: Update git submodules - run: | - git submodule sync - git submodule update --init - - - name: Use built images to test - run: | - grep -rl uselagoon . | xargs sed -i '/^FROM/ s#latest#${{ github.ref_name }}#' - grep -rl uselagoon . | xargs sed -i '/^FROM/ s#uselagoon#ghcr.io/${{ github.repository_owner }}#' - grep -rl uselagoon . | xargs sed -i '/image:/ s#latest#${{ github.ref_name }}#' - grep -rl uselagoon . | xargs sed -i '/image:/ s#uselagoon#ghcr.io/${{ github.repository_owner }}#' - find . -maxdepth 2 -name docker-compose.yml | xargs sed -i -e '/###/d' - - - name: check replacements - run: | - find . -maxdepth 2 -name docker-compose.yml | xargs grep image: - find . -maxdepth 3 -name *.dockerfile | xargs grep ^FROM - - - name: Install test harness - run: | - yarn install - - - name: Generate test files - run: | - yarn generate-tests - - - name: Run docker-compose tests - run: | - yarn test:dockercompose - - image_test: - runs-on: ubuntu-latest - needs: build - defaults: - run: - working-directory: ./tests - steps: - - - name: Checkout - uses: actions/checkout@v4 - - - name: Checkout - uses: actions/checkout@v4 - with: - repository: uselagoon/lagoon-examples - path: tests - - - name: Add additional tests - run: | - mkdir -p ./all-images && cp ../helpers/docker-compose.yml ./all-images/ && cp ../helpers/TESTING_dockercompose.md ./all-images/ - - - name: Use built images to test - run: | - grep -rl uselagoon . | xargs sed -i '/image:/ s#latest#${{ github.ref_name }}#' - grep -rl uselagoon . | xargs sed -i '/image:/ s#uselagoon#ghcr.io/${{ github.repository_owner }}#' - find . -maxdepth 2 -name docker-compose.yml | xargs sed -i -e '/###/d' - - - name: check replacements - run: | - find . -maxdepth 2 -name docker-compose.yml | xargs cat - - - name: check dc builds - run: | - cd ./all-images - docker-compose up -d - docker-compose logs - - - name: Install test harness - run: | - yarn install - - - name: Generate test files - run: | - yarn generate-tests - - - name: Run docker-compose tests - run: | - yarn test:dockercompose diff --git a/Makefile b/Makefile index 0742933f2..13281ffd3 100644 --- a/Makefile +++ b/Makefile @@ -293,7 +293,7 @@ build/php-8.3-cli: build/php-8.3-fpm build/php-8.1-cli-drupal: build/php-8.1-cli build/php-8.2-cli-drupal: build/php-8.2-cli build/php-8.3-cli-drupal: build/php-8.3-cli -build/python-3.7 build/python-3.8 build/python-3.9 build/python-3.10 build/python-3.11 build/python-3.12: build/commons +build/python-3.8 build/python-3.9 build/python-3.10 build/python-3.11 build/python-3.12: build/commons build/node-18 build/node-20: build/commons build/node-18-builder build/node-18-cli: build/node-18 build/node-20-builder build/node-20-cli: build/node-20 diff --git a/docker-bake.hcl b/docker-bake.hcl index 257d76c6e..2c9ce1745 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,5 +1,4 @@ # docker-bake.dev.hcl -# docker-bake.dev.hcl variable "TAG" { default = "latest" } @@ -70,15 +69,15 @@ group "default" { "node-20-builder", "node-20-cli", "opensearch-2", - "php-8-0-fpm", - "php-8-0-cli", - "php-8-0-cli-drupal", "php-8-1-fpm", "php-8-1-cli", "php-8-1-cli-drupal", "php-8-2-fpm", "php-8-2-cli", "php-8-2-cli-drupal", + "php-8-3-fpm", + "php-8-3-cli", + "php-8-3-cli-drupal", "postgres-11", "postgres-11-drupal", "postgres-12", @@ -105,8 +104,6 @@ group "default" { "ruby-3-0", "ruby-3-1", "ruby-3-2", - "solr-7", - "solr-7-drupal", "solr-8", "solr-8-drupal", "varnish-6", @@ -149,15 +146,15 @@ group "node" { group "php" { targets = [ "commons", - "php-8-0-fpm", - "php-8-0-cli", - "php-8-0-cli-drupal", "php-8-1-fpm", "php-8-1-cli", "php-8-1-cli-drupal", "php-8-2-fpm", "php-8-2-cli", - "php-8-2-cli-drupal" + "php-8-2-cli-drupal", + "php-8-3-fpm", + "php-8-3-cli", + "php-8-3-cli-drupal" ] } @@ -212,8 +209,6 @@ group "ruby" { group "solr" { targets = [ "commons", - "solr-7", - "solr-7-drupal", "solr-8", "solr-8-drupal" ] @@ -546,54 +541,6 @@ target "opensearch-2" { ] } -target "php-8-0-fpm" { - inherits = ["default"] - context = "images/php-fpm" - contexts = { - "lagoon/commons": "target:commons" - } - dockerfile = "8.0.Dockerfile" - labels = { - "org.opencontainers.image.title": "lagoon-images/php-8.0-fpm" - } - tags = [ - "${IMAGE_REPO}/php-8.0-fpm:${IMAGE_TAG}", - "${PUSH_REPO}/php-8.0-fpm:${PUSH_TAG}" - ] -} - -target "php-8-0-cli" { - inherits = ["default"] - context = "images/php-cli" - contexts = { - "lagoon/php-8.0-fpm": "target:php-8-0-fpm" - } - dockerfile = "8.0.Dockerfile" - labels = { - "org.opencontainers.image.title": "lagoon-images/php-8.0-cli" - } - tags = [ - "${IMAGE_REPO}/php-8.0-cli:${IMAGE_TAG}", - "${PUSH_REPO}/php-8.0-cli:${PUSH_TAG}" - ] -} - -target "php-8-0-cli-drupal" { - inherits = ["default"] - context = "images/php-cli-drupal" - contexts = { - "lagoon/php-8.0-cli": "target:php-8-0-cli" - } - dockerfile = "8.0.Dockerfile" - labels = { - "org.opencontainers.image.title": "lagoon-images/php-8.0-cli-drupal" - } - tags = [ - "${IMAGE_REPO}/php-8.0-cli-drupal:${IMAGE_TAG}", - "${PUSH_REPO}/php-8.0-cli-drupal:${PUSH_TAG}" - ] -} - target "php-8-1-fpm" { inherits = ["default"] context = "images/php-fpm" @@ -690,6 +637,54 @@ target "php-8-2-cli-drupal" { ] } +target "php-8-3-fpm" { + inherits = ["default"] + context = "images/php-fpm" + contexts = { + "lagoon/commons": "target:commons" + } + dockerfile = "8.3.Dockerfile" + labels = { + "org.opencontainers.image.title": "lagoon-images/php-8.3-fpm" + } + tags = [ + "${IMAGE_REPO}/php-8.3-fpm:${IMAGE_TAG}", + "${PUSH_REPO}/php-8.3-fpm:${PUSH_TAG}" + ] +} + +target "php-8-3-cli" { + inherits = ["default"] + context = "images/php-cli" + contexts = { + "lagoon/php-8.3-fpm": "target:php-8-3-fpm" + } + dockerfile = "8.3.Dockerfile" + labels = { + "org.opencontainers.image.title": "lagoon-images/php-8.3-cli" + } + tags = [ + "${IMAGE_REPO}/php-8.3-cli:${IMAGE_TAG}", + "${PUSH_REPO}/php-8.3-cli:${PUSH_TAG}" + ] +} + +target "php-8-3-cli-drupal" { + inherits = ["default"] + context = "images/php-cli-drupal" + contexts = { + "lagoon/php-8.3-cli": "target:php-8-3-cli" + } + dockerfile = "8.3.Dockerfile" + labels = { + "org.opencontainers.image.title": "lagoon-images/php-8.3-cli-drupal" + } + tags = [ + "${IMAGE_REPO}/php-8.3-cli-drupal:${IMAGE_TAG}", + "${PUSH_REPO}/php-8.3-cli-drupal:${PUSH_TAG}" + ] +} + target "postgres-11" { inherits = ["default"] context = "images/postgres" @@ -1122,38 +1117,6 @@ target "ruby-3-2" { ] } -target "solr-7" { - inherits = ["default"] - context = "images/solr" - contexts = { - "lagoon/commons": "target:commons" - } - dockerfile = "7.Dockerfile" - labels = { - "org.opencontainers.image.title": "lagoon-images/solr-7" - } - tags = [ - "${IMAGE_REPO}/solr-7:${IMAGE_TAG}", - "${PUSH_REPO}/solr-7:${PUSH_TAG}" - ] -} - -target "solr-7-drupal" { - inherits = ["default"] - context = "images/solr-drupal" - contexts = { - "lagoon/solr-7": "target:solr-7" - } - dockerfile = "7.Dockerfile" - labels = { - "org.opencontainers.image.title": "lagoon-images/solr-7-drupal" - } - tags = [ - "${IMAGE_REPO}/solr-7-drupal:${IMAGE_TAG}", - "${PUSH_REPO}/solr-7-drupal:${PUSH_TAG}" - ] -} - target "solr-8" { inherits = ["default"] context = "images/solr" diff --git a/renovate.json b/renovate.json index 89d0f1a0e..5c04734e3 100644 --- a/renovate.json +++ b/renovate.json @@ -213,32 +213,6 @@ "varnish" ] }, - { - "groupName": "ELK Stack", - "allowedVersions": "<7.11.0", - "matchDatasources": [ - "docker" - ], - "matchPackageNames": [ - "docker.elastic.co/elasticsearch/elasticsearch", - "docker.elastic.co/logstash/logstash", - "docker.elastic.co/kibana/kibana" - ] - }, - { - "enabled": false, - "matchDatasources": [ - "docker" - ], - "matchUpdateTypes": [ - "major" - ], - "matchPackageNames": [ - "docker.elastic.co/elasticsearch/elasticsearch", - "docker.elastic.co/logstash/logstash", - "docker.elastic.co/kibana/kibana" - ] - }, { "enabled": false, "matchDatasources": [