Skip to content

Commit

Permalink
Merge branch 'docker'
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Feb 23, 2018
2 parents 45af88d + 78eadb2 commit fb6cf68
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

common: &common
docker:
- image: neomake/vims-for-tests:20@sha256:14859f9e4b73e13c716ac85dd05edb4dbd451e4870fc210a0529f6f603eaa3ee
- image: neomake/vims-for-tests:21@sha256:81b090c042e3d39a8d6e64f2698fc9cc84ec6ebf6aed3b74a7be03c5894a3e4a
working_directory: ~/repo
steps:
- checkout
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.tests
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# From https://github.com/tweekmonster/vim-testbed.
FROM testbed/vim:9@sha256:dc14380bb3d6a87790e4b6d4fc696a369258bd86b4a597dbe73c174cb7f0f5a8
FROM testbed/vim:10@sha256:be6e7e3b7b424671da955ccc71a980f329ec10b773cbae001e696429148ed391

# Currently tested versions:
# - v7.3.429 (Ubuntu Precise, 12.04LTS)
Expand All @@ -17,7 +17,7 @@ RUN install_vim -tag v7.3.429 -name vim73 --with-features=huge -build \
-tag neovim:v0.2.2 -py3 -build \
&& rm -rf /vim-build/vim/vim/*/share/vim/*/tutor

ENV NEOMAKE_DOCKERFILE_UPDATE=2018-02-13
ENV NEOMAKE_DOCKERFILE_UPDATE=2018-02-20

# Git master in a separate layer, since the above is meant to be stable.
RUN install_vim -tag master -build \
Expand Down
19 changes: 13 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ vimhelplint: | $(if $(VIMHELPLINT_DIR),,build/vimhelplint)

# Run tests in dockerized Vims.
DOCKER_REPO:=neomake/vims-for-tests
DOCKER_TAG:=20
DOCKER_TAG:=21
NEOMAKE_DOCKER_IMAGE?=
DOCKER_IMAGE:=$(if $(NEOMAKE_DOCKER_IMAGE),$(NEOMAKE_DOCKER_IMAGE),$(DOCKER_REPO):$(DOCKER_TAG))
DOCKER_STREAMS:=-ti
Expand All @@ -189,13 +189,20 @@ docker_image:
docker_push:
docker push $(DOCKER_REPO):$(DOCKER_TAG)
docker_update_image:
git diff --cached --exit-code >/dev/null || { echo "Index is not clean."; exit 1 ; }
git diff --exit-code Makefile >/dev/null || { echo "Makefile is not clean."; exit 2 ; }
sed -i '/^DOCKER_TAG:=/s/:=.*/:=$(shell echo $$(($(DOCKER_TAG)+1)))/' Makefile
sed -i '/^ENV NEOMAKE_DOCKERFILE_UPDATE=/s/=.*/=$(shell date +%Y-%m-%d)/' Dockerfile.tests
@git diff --cached --exit-code >/dev/null || { echo "WARN: git index is not clean."; }
@if git diff --exit-code Makefile >/dev/null; then \
sed -i '/^DOCKER_TAG:=/s/:=.*/:=$(shell echo $$(($(DOCKER_TAG)+1)))/' Makefile; \
else \
echo "WARN: Makefile is not clean. Not updating."; \
fi
@if git diff --exit-code Dockerfile.tests >/dev/null; then \
sed -i '/^ENV NEOMAKE_DOCKERFILE_UPDATE=/s/=.*/=$(shell date +%Y-%m-%d)/' Dockerfile.tests; \
else \
echo "WARN: Dockerfile.tests is not clean. Not updating."; \
fi
make docker_image
make docker_test DOCKER_VIM=neovim-master
@echo "Done. Use 'make docker_push' to push it."
@echo "Done. Use 'make docker_push' to push it, and then update .circleci/config.yml."

DOCKER_VIMS:=vim73 vim74-trusty vim74-xenial vim8069 vim-master neovim-v0.1.7 neovim-v0.2.0 neovim-v0.2.1 neovim-v0.2.2 neovim-master
_DOCKER_VIM_TARGETS:=$(addprefix docker_test-,$(DOCKER_VIMS))
Expand Down

0 comments on commit fb6cf68

Please sign in to comment.