mirror of
https://github.com/b4tman/docker-squid.git
synced 2024-12-22 09:03:13 +00:00
use builded image for test
This commit is contained in:
parent
0db0d2b19d
commit
f8b9da006c
12
.github/workflows/dockerimage.yml
vendored
12
.github/workflows/dockerimage.yml
vendored
@ -15,6 +15,9 @@ on:
|
||||
branches:
|
||||
- "master"
|
||||
|
||||
env:
|
||||
TEST_TAG: b4tman/squid:test
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-20.04
|
||||
@ -47,10 +50,10 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
push: false
|
||||
tags: b4tman/squid
|
||||
tags: ${{ env.TEST_TAG }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
||||
outputs: type=image,name=b4tman/squid,push=false
|
||||
outputs: type=image,name=${{ env.TEST_TAG }},push=false
|
||||
|
||||
# Temp fix
|
||||
# https://github.com/docker/build-push-action/issues/252
|
||||
@ -61,7 +64,10 @@ jobs:
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||
|
||||
- name: Test image
|
||||
run: docker-compose -f docker-compose.test.yml up sut
|
||||
run: docker compose -f docker-compose.test.yml up sut
|
||||
|
||||
- name: set base image for ssl-bump
|
||||
run: sed -i "s%FROM b4tman/squid%FROM $TEST_TAG%" ssl-bump/Dockerfile
|
||||
|
||||
- name: Build 'ssl-bump' image
|
||||
uses: docker/build-push-action@v4
|
||||
|
@ -1,10 +1,7 @@
|
||||
version: '2.3'
|
||||
services:
|
||||
proxy:
|
||||
image: squidproxy
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: "${TEST_TAG}"
|
||||
healthcheck:
|
||||
test: ["CMD", "sh", "-exc", "squidclient -T 3 mgr:info 2> /dev/null | grep -qF '200 OK'"]
|
||||
interval: 5s
|
||||
@ -12,9 +9,10 @@ services:
|
||||
retries: 5
|
||||
start_period: 1s
|
||||
sut:
|
||||
image: squidproxy
|
||||
image: "${TEST_TAG}"
|
||||
links:
|
||||
- proxy
|
||||
depends_on:
|
||||
- proxy
|
||||
command: sh -exc "sleep 10 && squidclient -h proxy -T 3 'https://postman-echo.com/get?squidtest=ok' 2> /dev/null | grep -qF '200 OK'"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user