Commit 7cc449c3 authored by Damien Caro's avatar Damien Caro
Browse files

Added test container

Showing with 32 additions and 0 deletions
+32 -0
Dockerfile 0 → 100644
# Pull the base image with given version.
ARG BUILD_TERRAFORM_VERSION=0.11.7
FROM hashicorp/terraform:${BUILD_TERRAFORM_VERSION}
ARG MODULE_NAME="terraform-azurerm-aks"
# Set work directory
RUN mkdir -p /go/src/${MODULE_NAME}
RUN mkdir -p /go/bin
WORKDIR /go/src/${MODULE_NAME}
# Install required go packages using dep ensure
ENV GOPATH /go
ENV PATH $GOPATH/bin:$PATH
RUN /bin/bash -c "curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh"
COPY . /go/src/${MODULE_NAME}
RUN chmod 744 terraform-azure-module-test.sh
\ No newline at end of file
# Azure pipeline for Terraform AKS module
pool:
vmImage: 'Ubuntu 16.04'
variables:
imagename: terraform-azurerm-aks:$(build.buildId)
steps:
- script: docker build -f Dockerfile -t $(imageName) .
displayName: 'docker build'
- script: docker run -e "ARM_SUBSCRIPTION_ID=$AZURE_SUBSCRIPTION_ID" -e "ARM_CLIENT_ID=$AZURE_CLIENT_ID" -e "ARM_CLIENT_SECRET=$AZURE_CLIENT_SECRET" -e "ARM_TENANT_ID=$AZURE_TENANT_ID" -e "ARM_TEST_LOCATION=WestUS2" -e "ARM_TEST_LOCATION_ALT=EastUS" --rm $(imageName) bash -c "./test.sh validate"
displayName: 'docker run'
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment