mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-03 18:18:48 +00:00
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.8.8
|
|
|
|
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-password="$GITHUB_PASSWORD" --data-dir="/tmp" --require-approval=false --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
|