Update testbed docker image
This commit is contained in:
parent
51752233e9
commit
71ecf27291
4 changed files with 10 additions and 8 deletions
|
@ -3,6 +3,6 @@ language: minimal
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
before_install:
|
before_install:
|
||||||
- docker pull yadm/testbed:2020-01-20
|
- docker pull yadm/testbed:2020-07-08
|
||||||
script:
|
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
|
||||||
|
|
|
@ -36,8 +36,9 @@ RUN pip3 install \
|
||||||
yamllint==1.17.0 \
|
yamllint==1.17.0 \
|
||||||
;
|
;
|
||||||
|
|
||||||
RUN curl https://raw.githubusercontent.com/jirutka/esh/v0.3.0/esh > /usr/local/bin/esh; \
|
RUN \
|
||||||
chmod +x /usr/local/bin/esh
|
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
|
# Create a flag to identify when running inside the yadm testbed
|
||||||
RUN touch /.yadmtestbed
|
RUN touch /.yadmtestbed
|
||||||
|
|
7
Makefile
7
Makefile
|
@ -1,4 +1,5 @@
|
||||||
PYTESTS = $(wildcard test/test_*.py)
|
PYTESTS = $(wildcard test/test_*.py)
|
||||||
|
IMAGE = yadm/testbed:2020-07-08
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all:
|
all:
|
||||||
|
@ -90,7 +91,7 @@ $(PYTESTS):
|
||||||
test:
|
test:
|
||||||
@if [ -f /.yadmtestbed ]; then \
|
@if [ -f /.yadmtestbed ]; then \
|
||||||
cd /yadm && \
|
cd /yadm && \
|
||||||
py.test -vv $(testargs); \
|
py.test -v $(testargs); \
|
||||||
else \
|
else \
|
||||||
if command -v "docker-compose" &> /dev/null; then \
|
if command -v "docker-compose" &> /dev/null; then \
|
||||||
docker-compose run --rm testbed make test testargs="$(testargs)"; \
|
docker-compose run --rm testbed make test testargs="$(testargs)"; \
|
||||||
|
@ -112,7 +113,7 @@ testhost: require-docker
|
||||||
--hostname testhost \
|
--hostname testhost \
|
||||||
--rm -it \
|
--rm -it \
|
||||||
-v "/tmp/testhost:/bin/yadm:ro" \
|
-v "/tmp/testhost:/bin/yadm:ro" \
|
||||||
yadm/testbed:2020-01-20 \
|
$(IMAGE) \
|
||||||
bash -l
|
bash -l
|
||||||
|
|
||||||
.PHONY: scripthost
|
.PHONY: scripthost
|
||||||
|
@ -129,7 +130,7 @@ scripthost: require-docker
|
||||||
--rm -it \
|
--rm -it \
|
||||||
-v "$$PWD/script.gz:/script.gz:rw" \
|
-v "$$PWD/script.gz:/script.gz:rw" \
|
||||||
-v "/tmp/testhost:/bin/yadm:ro" \
|
-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"
|
bash -c "script /tmp/script -q -c 'bash -l'; gzip < /tmp/script > /script.gz"
|
||||||
@echo
|
@echo
|
||||||
@echo "Script saved to $$PWD/script.gz"
|
@echo "Script saved to $$PWD/script.gz"
|
||||||
|
|
|
@ -4,4 +4,4 @@ services:
|
||||||
testbed:
|
testbed:
|
||||||
volumes:
|
volumes:
|
||||||
- .:/yadm:ro
|
- .:/yadm:ro
|
||||||
build: .
|
image: yadm/testbed:2020-07-08
|
||||||
|
|
Loading…
Reference in a new issue