Skip to content

Commit

Permalink
Using local Dockerfiles for all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
housni committed Nov 16, 2018
1 parent 7053dc7 commit a151c11
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
24 changes: 24 additions & 0 deletions Dockerfile.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ubuntu:16.04
MAINTAINER Gruntwork <info@gruntwork.io>

# Install basic dependencies
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y vim python-pip jq sudo curl

# Install Bats
RUN apt-get install -y software-properties-common && \
add-apt-repository ppa:duggan/bats && \
DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y bats

# Install AWS CLI
RUN pip install awscli --upgrade --user

# Install moto: https://github.com/spulec/moto
RUN pip install flask moto moto[server]

# Install tools we'll need to create a mock EC2 metadata server
RUN apt-get install -y net-tools iptables

# Copy mock AWS CLI into the PATH
COPY ./.circleci/aws-local.sh /usr/local/bin/aws
File renamed without changes.
8 changes: 6 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ services:
shellcheck:
build:
context: ./
dockerfile: Dockerfile.shellcheck
volumes:
- ./:/usr/local/src/bash-commons
working_dir: /usr/local/src/bash-commons/.circleci
command: ./shellcheck.sh
bats:
image: gruntwork/bash-commons-circleci-tests
# image: gruntwork/bash-commons-circleci-tests
build:
context: ./
dockerfile: Dockerfile.bats
volumes:
# Mount all the files so you have "hot reload" of all changes from the host
- ./:/usr/local/src/bash-commons
Expand All @@ -20,4 +24,4 @@ services:
# For moto
- "5000:5000"
# For ec2-metadata-mock
- "8111:8111"
- "8111:8111"

0 comments on commit a151c11

Please sign in to comment.