mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-30 04:58:46 +00:00
* Adding e2e tests back and upgrading terraform version 0.9.11 * Fixing the binary name for e2e tests * revert binary name change * missed indentation for makefile * use owner name for branch head for pull request creation
38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
machine:
|
|
# Environment variables for build
|
|
environment:
|
|
GOPATH: "${HOME}/.go_workspace"
|
|
WORKDIR: "${GOPATH}/src/github.com/hootsuite/atlantis"
|
|
TERRAFORM_VERSION: 0.9.11
|
|
|
|
dependencies:
|
|
pre:
|
|
# remove old go files
|
|
- rm -rf "$GOPATH"
|
|
|
|
override:
|
|
# move repository to the canonical import path
|
|
- mkdir -p "$(dirname ${WORKDIR})"
|
|
- cp -R "${HOME}/atlantis" "${WORKDIR}"
|
|
# Install dependencies
|
|
- cd "${WORKDIR}" && make deps
|
|
|
|
test:
|
|
override:
|
|
# Run tests
|
|
- cd "${WORKDIR}" && ./scripts/build.sh
|
|
|
|
post:
|
|
# Run e2e tests
|
|
- cd "${WORKDIR}" && ./scripts/e2e-deps.sh
|
|
# Start atlantis server
|
|
- cd "${WORKDIR}/e2e" && ./atlantis server --gh-user="$GITHUB_USERNAME" --gh-token="$GITHUB_PASSWORD" --data-dir="/tmp" --log-level="debug" &> /tmp/atlantis-server.log:
|
|
background: true
|
|
- sleep 2
|
|
- cd "${WORKDIR}/e2e" && ./ngrok http 4141:
|
|
background: true
|
|
- sleep 2
|
|
# Set ATLANTIS_URL environment variable to be used by atlantis e2e test to create the webhook
|
|
- echo '' >> ~/.circlerc && echo 'export ATLANTIS_URL=$(curl -s 'http://localhost:4040/api/tunnels' | jq -r '.tunnels[1].public_url') ' >> ~/.circlerc
|
|
- cd "${WORKDIR}/e2e" && ../scripts/e2e.sh
|