From 24ea1099cc7dfdb8f732dce72fbcc20fa94e35e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A0Timur=20Izhbulatov?= Date: Fri, 3 Nov 2017 15:26:17 +0300 Subject: [PATCH] Smoke test image --- .gitignore | 1 + Jenkinsfile | 4 ++++ Makefile | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index fb868f7..5892342 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /node_modules/ /dist/ Dockerfile +.state diff --git a/Jenkinsfile b/Jenkinsfile index 6c1fc01..eafce5c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,6 +27,10 @@ build('koffing', 'docker-host') { sh 'make build_image' } + runStage('test image') { + sh 'make test' + } + try { if (env.BRANCH_NAME == 'master') { runStage('push image') { diff --git a/Makefile b/Makefile index 46b5d94..5d67ba3 100644 --- a/Makefile +++ b/Makefile @@ -40,3 +40,9 @@ build: clean: rm -rf dist + +.state: build_image + echo $(SERVICE_IMAGE_TAG) > $@ + +test: .state + docker run --rm $(SERVICE_IMAGE_NAME):$(shell cat .state) nginx -T -c /etc/nginx/nginx.conf