From eba9e1f3d44a53b2d9758e40bcdac93f1bc410ca Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sat, 23 Oct 2021 19:48:13 +0300 Subject: [PATCH] Add Bats image. --- .gitlab-ci.yml | 21 ++++++++++++++++++++- images/bats/.dockerignore | 1 + images/bats/Dockerfile | 11 +++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 images/bats/.dockerignore create mode 100644 images/bats/Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f1deaa3..c2474de 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,10 @@ include: # pre-commit hook. This can also be better if you're working on different # branches but want to use the hooks from the master branch. # yamllint disable-line rule:line-length - - remote: https://git.shore.co.il/shore/ci-templates/-/raw/master/templates/pre-commit.yml + - remote: |- + https://git.shore.co.il/shore/ci-templates/-/raw/master/templates/pre-commit.yml + - remote: |- + https://git.shore.co.il/shore/ci-templates/-/raw/master/templates/containerfiles.yml lint templates: image: registry.shore.co.il/ci-images:pre-commit @@ -29,3 +32,19 @@ lint templates: cache: paths: - .cache/ + +# bats image: + +build-bats: + extends: .container-build + variables: + CONTEXT: images/bats + +push-bats: + extends: .container-push + variables: + IMAGE: ci-images + TAG: bats + needs: + - job: build-bats + artifacts: true diff --git a/images/bats/.dockerignore b/images/bats/.dockerignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/images/bats/.dockerignore @@ -0,0 +1 @@ +* diff --git a/images/bats/Dockerfile b/images/bats/Dockerfile new file mode 100644 index 0000000..1ac5f28 --- /dev/null +++ b/images/bats/Dockerfile @@ -0,0 +1,11 @@ +FROM registry.hub.docker.com/library/alpine:3.14 +# hadolint ignore=DL3018 +RUN apk add --update --no-cache \ + bats \ + build-base \ + docker-cli \ + git \ + openssh-client-default \ + openssl \ + && \ + rm -rf /var/cache/apk/* /tmp/* /var/tmp/* -- GitLab