Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add leverage-cli-testing image #45

Merged
merged 1 commit into from
Sep 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ define DOCKER_IMG_LIST
"ansible" \
"ansible-dev" \
"git-release" \
"leverage-cli-testing" \
"terraform-awscli-slim" \
"terraform-awscli-terratest-slim" \
"helmsman"
Expand Down
24 changes: 24 additions & 0 deletions leverage-cli-testing/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM python:3.8-slim

LABEL vendor="Binbash Leverage ([email protected])"

RUN apt-get update &&\
apt-get install -y git curl

# Install bats as node package
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g bats
## Install bats from source
# RUN git clone https://github.com/bats-core/bats-core.git /opt/bats
# RUN ln -s /opt/bats/bin/bats /usr/local/bin/bats
# Install other bats modules
RUN npm install -g --save-dev https://github.com/bats-core/bats-support
RUN npm install -g --save-dev https://github.com/bats-core/bats-assert

WORKDIR /leverage
# Install requirements for running unit tests
RUN curl -LO https://raw.githubusercontent.com/binbashar/leverage/master/dev-requirements.txt
RUN pip install -r dev-requirements.txt

ENTRYPOINT [ "/bin/bash" ]
13 changes: 13 additions & 0 deletions leverage-cli-testing/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.PHONY: help build
SHELL := /bin/bash
MAKEFILES_DIR := ../@bin/makefiles

DOCKER_TAG := 1.0.0
DOCKER_REPO_NAME := binbash
DOCKER_IMG_NAME := leverage-cli-testing

help:
@echo 'Available Commands:'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " - \033[36m%-18s\033[0m %s\n", $$1, $$2}'

-include ${MAKEFILES_DIR}/docker/docker-hub-build-push.mk