1
0
Fork 0
mirror of synced 2024-11-04 09:08:56 -05:00

Update testbed docker image

This commit is contained in:
Tim Byrne 2020-07-08 00:58:54 -05:00
parent 51752233e9
commit 71ecf27291
No known key found for this signature in database
GPG key ID: 14DB4FC2465A4B12
4 changed files with 10 additions and 8 deletions

View file

@ -3,6 +3,6 @@ language: minimal
services:
- docker
before_install:
- docker pull yadm/testbed:2020-01-20
- docker pull yadm/testbed:2020-07-08
script:
- docker run -t --rm -v "$PWD:/yadm:ro" yadm/testbed:2020-01-20
- docker run -t --rm -v "$PWD:/yadm:ro" yadm/testbed:2020-07-08

View file

@ -36,8 +36,9 @@ RUN pip3 install \
yamllint==1.17.0 \
;
RUN curl https://raw.githubusercontent.com/jirutka/esh/v0.3.0/esh > /usr/local/bin/esh; \
chmod +x /usr/local/bin/esh
RUN \
curl https://raw.githubusercontent.com/jirutka/esh/v0.3.0/esh > /usr/local/bin/esh && \
chmod +x /usr/local/bin/esh
# Create a flag to identify when running inside the yadm testbed
RUN touch /.yadmtestbed

View file

@ -1,4 +1,5 @@
PYTESTS = $(wildcard test/test_*.py)
IMAGE = yadm/testbed:2020-07-08
.PHONY: all
all:
@ -90,7 +91,7 @@ $(PYTESTS):
test:
@if [ -f /.yadmtestbed ]; then \
cd /yadm && \
py.test -vv $(testargs); \
py.test -v $(testargs); \
else \
if command -v "docker-compose" &> /dev/null; then \
docker-compose run --rm testbed make test testargs="$(testargs)"; \
@ -112,7 +113,7 @@ testhost: require-docker
--hostname testhost \
--rm -it \
-v "/tmp/testhost:/bin/yadm:ro" \
yadm/testbed:2020-01-20 \
$(IMAGE) \
bash -l
.PHONY: scripthost
@ -129,7 +130,7 @@ scripthost: require-docker
--rm -it \
-v "$$PWD/script.gz:/script.gz:rw" \
-v "/tmp/testhost:/bin/yadm:ro" \
yadm/testbed:2020-01-20 \
$(IMAGE) \
bash -c "script /tmp/script -q -c 'bash -l'; gzip < /tmp/script > /script.gz"
@echo
@echo "Script saved to $$PWD/script.gz"

View file

@ -4,4 +4,4 @@ services:
testbed:
volumes:
- .:/yadm:ro
build: .
image: yadm/testbed:2020-07-08