Skip to content

Commit 1c1f794

Browse files
committed
deprecate consumers
1 parent 6ce8cf2 commit 1c1f794

File tree

7 files changed

+5
-210
lines changed

7 files changed

+5
-210
lines changed

.github/workflows/version-base-build-test.yml

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -104,73 +104,3 @@ jobs:
104104
run: |
105105
docker run ${{ env.TAG }} /bin/bash -c "make test"
106106
107-
# "consumer" images just "consume" the base image and do nothing else
108-
# basic tests for these
109-
consumer-build-test:
110-
name: Build Consumer
111-
runs-on: ubuntu-latest
112-
needs: [base-test-1, base-test-2]
113-
strategy:
114-
matrix:
115-
dockerfile: [debian, ubuntu]
116-
# use a local registry
117-
services:
118-
registry:
119-
image: registry:2
120-
ports:
121-
- 5000:5000
122-
env:
123-
# use local registry so we can reference the base image in another dockerfile
124-
# https://github.com/docker/build-push-action/issues/738
125-
BASE_TAG: localhost:5000/base-${{ inputs.idris-version }}:latest
126-
TAG: idris-consumer-${{ matrix.dockerfile }}-${{ inputs.idris-version }}:test
127-
steps:
128-
- name: Checkout Repo
129-
uses: actions/checkout@v4
130-
131-
- name: Setup Buildx (no ARM)
132-
uses: docker/setup-buildx-action@v3
133-
with:
134-
# since we're using a local registry
135-
driver-opts: network=host
136-
137-
- name: Build Base Image
138-
uses: ./.github/actions/build-base-img
139-
with:
140-
idris-version: ${{ inputs.idris-version }}
141-
push: true
142-
tags: ${{ env.BASE_TAG }}
143-
144-
- name: Run `docker image ls`
145-
run: docker image ls
146-
147-
- name: Build ${{ matrix.dockerfile}}
148-
uses: docker/build-push-action@v6
149-
with:
150-
context: .
151-
file: ${{ matrix.dockerfile }}.Dockerfile
152-
build-args: |
153-
IDRIS_VERSION=${{ inputs.idris-version }}
154-
BASE_IMG=${{ env.BASE_TAG }}
155-
tags: ${{ env.TAG }}
156-
load: true
157-
158-
- name: Setup Bats and Bats libs
159-
uses: bats-core/[email protected]
160-
with:
161-
bats-version: 1.10.0
162-
support-version: 0.3.0
163-
support-path: ${{ github.workspace }}/.bats/bats-support
164-
assert-version: 2.1.0
165-
assert-path: ${{ github.workspace }}/.bats/bats-assert
166-
file-install: false
167-
detik-install: false
168-
169-
# LIB_PATH is a env var I use in the setup() function of my bats tests
170-
# it points to the folder containing bats-assert and bats-support
171-
- name: Run Test
172-
env:
173-
LIB_PATH: ${{ github.workspace }}/.bats
174-
DOCKER_IMAGE: ${{ env.TAG }}
175-
IDRIS_VERSION: ${{ inputs.idris-version }}
176-
run: bats tests/consumer-idris.bats

.github/workflows/version-base-deploy.yml

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -54,46 +54,3 @@ jobs:
5454
labels: ${{ steps.create-meta.outputs.labels }}
5555
platforms: linux/amd64,linux/arm64
5656

57-
deploy-consumers:
58-
name: Deploy Consumer
59-
runs-on: ubuntu-latest
60-
strategy:
61-
matrix:
62-
dockerfile: [ubuntu, debian]
63-
needs: deploy-base
64-
steps:
65-
- name: Checkout Repo
66-
uses: actions/checkout@v4
67-
68-
# instead of native builds, we'll just use QEMU for consumers
69-
# consumer builds don't really do much intensive stuff anyway
70-
- name: Set up QEMU
71-
uses: docker/setup-qemu-action@v3
72-
73-
- name: Setup Buildx
74-
uses: docker/setup-buildx-action@v3
75-
76-
- name: Login to GHCR
77-
uses: docker/login-action@v3
78-
with:
79-
registry: ghcr.io
80-
username: ${{ github.actor }}
81-
password: ${{ secrets.GITHUB_TOKEN }}
82-
83-
- name: Docker meta
84-
id: create-meta
85-
uses: docker/metadata-action@v5
86-
with:
87-
images: ${{ github.repository }}/${{ matrix.dockerfile }}
88-
89-
- name: Build ${{ matrix.dockerfile}}
90-
uses: docker/build-push-action@v6
91-
with:
92-
context: .
93-
platforms: linux/amd64,linux/arm64
94-
file: ${{ matrix.dockerfile }}.Dockerfile
95-
build-args: |
96-
IDRIS_VERSION=${{ inputs.idris-version }}
97-
BASE_IMG=ghcr.io/${{ github.repository }}/base:${{ inputs.idris-version }}
98-
tags: ghcr.io/${{ github.repository }}/${{ matrix.dockerfile }}:${{ inputs.idris-version }}
99-
push: true

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ Installing Idris2 is [quite time consuming](https://idris2.readthedocs.io/en/lat
2929

3030
## Images
3131

32-
* [idris-2-docker/base](https://github.com/joshuanianji/idris-2-docker/pkgs/container/idris-2-docker%2Fbase) - Base image with Idris2 installed from source.
32+
* [idris-2-docker/base](https://github.com/joshuanianji/idris-2-docker/pkgs/container/idris-2-docker%2Fbase) - Base image with Idris2 installed from source (debian-based)
3333
* [idris-2-docker/devcontainer](https://github.com/joshuanianji/idris-2-docker/pkgs/container/idris-2-docker%2Fdevcontainer) - Includes [Idris2 LSP](https://github.com/idris-community/idris2-lsp)
34-
* [idris-2-docker/ubuntu](https://github.com/joshuanianji/idris-2-docker/pkgs/container/idris-2-docker%2Fubuntu) - Ubuntu 20.04
35-
* [idris-2-docker/debian](https://github.com/joshuanianji/idris-2-docker/pkgs/container/idris-2-docker%2Fdebian) - Debian bullseye
3634

3735
## Example Project
3836

debian.Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

scripts/build-image.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def build_image_sha(image: str, sha_info: dict, idris_base_version: str, tag: st
5757
parser = argparse.ArgumentParser(description='Builds a docker image')
5858
parser.add_argument(
5959
'--image',
60-
help='The image to build. One of (base | debian | ubuntu | devcontainer). Defaults to base.',
60+
help='The image to build. One of (base | devcontainer). Defaults to base.',
6161
default='base')
6262
group = parser.add_mutually_exclusive_group()
6363
group.add_argument(
@@ -66,7 +66,7 @@ def build_image_sha(image: str, sha_info: dict, idris_base_version: str, tag: st
6666
default='latest')
6767
group.add_argument(
6868
'--sha',
69-
help='Idris/Idris LSP SHA to use. Should not be used with `--version`. SHAs also cannot be used with base or debian images.',
69+
help='Idris/Idris LSP SHA to use. Should not be used with `--version`. SHAs cannot be used with base images.',
7070
default=None)
7171
parser.add_argument(
7272
'--tag',
@@ -79,8 +79,8 @@ def build_image_sha(image: str, sha_info: dict, idris_base_version: str, tag: st
7979
)
8080
args = parser.parse_args()
8181

82-
if args.image not in ['base', 'debian', 'ubuntu', 'devcontainer']:
83-
print('Invalid image. Must be one of (base | debian | ubuntu | devcontainer).')
82+
if args.image not in ['base', 'devcontainer']:
83+
print('Invalid image. Must be one of (base | devcontainer).')
8484
exit(1)
8585

8686
if args.version and args.version != 'latest':
@@ -116,10 +116,6 @@ def build_image_sha(image: str, sha_info: dict, idris_base_version: str, tag: st
116116
print(f'Image built with tag {tag}')
117117

118118
elif args.sha:
119-
if args.image in ['base', 'debian']:
120-
print('Cannot build base or debian images with a sha.')
121-
exit(1)
122-
123119
sha_info = {
124120
'idris': args.sha,
125121
'lsp': args.sha

tests/consumer-idris.bats

Lines changed: 0 additions & 52 deletions
This file was deleted.

ubuntu.Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)