Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
Stop failing steps from succeeding
Browse files Browse the repository at this point in the history
  • Loading branch information
EliiseS committed Mar 4, 2020
1 parent bdeb128 commit 956bafe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,28 @@ jobs:
displayName: Load cached devcontainer image
- script: |
set -e
# Create dockercache directory
mkdir -p ./.dockercache/
# Copy the makefile into the container folder
cp ./Makefile ./.devcontainer/Makefile
echo "-------> Building devcontainer"
time docker build --cache-from devcontainer:latest -t devcontainer -f ./.devcontainer/Dockerfile ./.devcontainer
docker build --cache-from devcontainer:latest -t devcontainer -f ./.devcontainer/Dockerfile ./.devcontainer
# Create a directory for go mod cache
mkdir -p $(System.DefaultWorkingDirectory)/.gocache
echo "-------> Building code and running tests"
# Run `make` to build and test the code
time docker run -v $(System.DefaultWorkingDirectory)/.gocache:/go/pkg/ -v /var/run/docker.sock:/var/run/docker.sock -v $(System.DefaultWorkingDirectory):/src --workdir /src --entrypoint /bin/bash --network="host" --env DATABRICKS_HOST=$(DATABRICKS_HOST) --env DATABRICKS_TOKEN=$(DATABRICKS_TOKEN) devcontainer -c "make test"
docker run -v $(System.DefaultWorkingDirectory)/.gocache:/go/pkg/ -v /var/run/docker.sock:/var/run/docker.sock -v $(System.DefaultWorkingDirectory):/src --workdir /src --entrypoint /bin/bash --network="host" --env DATABRICKS_HOST=$(DATABRICKS_HOST) --env DATABRICKS_TOKEN=$(DATABRICKS_TOKEN) devcontainer -c "make test"
sudo chown -R $USER $(System.DefaultWorkingDirectory)
displayName: Build and Test
- script: |
echo "-------> Saving docker image"
time docker image save -o ./.dockercache/devcontainer.tar devcontainer
docker image save -o ./.dockercache/devcontainer.tar devcontainer
condition: ne(variables.DOCKER_CACHE_HIT, 'true')
displayName: Save devcontainer image
Expand Down

0 comments on commit 956bafe

Please sign in to comment.