Merge pull request #6233 from hashicorp/chore/more-circle
ci: Migrate remaining jobs to CircleCI
This commit is contained in:
commit
b14436cd14
|
@ -56,12 +56,10 @@ workflows:
|
||||||
<<: *IGNORE_FOR_UI_BRANCHES
|
<<: *IGNORE_FOR_UI_BRANCHES
|
||||||
- test-rkt:
|
- test-rkt:
|
||||||
<<: *IGNORE_FOR_UI_BRANCHES
|
<<: *IGNORE_FOR_UI_BRANCHES
|
||||||
|
- test-e2e:
|
||||||
|
<<: *IGNORE_FOR_UI_BRANCHES
|
||||||
- test-ui
|
- test-ui
|
||||||
# - build-deps-image:
|
- test-website
|
||||||
# context: dani-test
|
|
||||||
# filters:
|
|
||||||
# branches:
|
|
||||||
# only: dani/circleci
|
|
||||||
|
|
||||||
website:
|
website:
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -106,8 +104,10 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- install-protoc
|
- install-protoc
|
||||||
|
- run: sudo apt-get update && sudo apt-get install shellcheck
|
||||||
- run: make deps lint-deps
|
- run: make deps lint-deps
|
||||||
- run: make check
|
- run: make check
|
||||||
|
- run: make checkscripts
|
||||||
|
|
||||||
test-container:
|
test-container:
|
||||||
executor: go
|
executor: go
|
||||||
|
@ -135,6 +135,24 @@ jobs:
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: /tmp/test-reports
|
path: /tmp/test-reports
|
||||||
|
|
||||||
|
test-e2e:
|
||||||
|
executor: go
|
||||||
|
environment:
|
||||||
|
<<: *COMMON_ENVS
|
||||||
|
GOPATH: /go
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: make deps
|
||||||
|
- run: make e2e-test
|
||||||
|
|
||||||
|
test-website:
|
||||||
|
executor: go-machine-recent
|
||||||
|
environment:
|
||||||
|
<<: *COMMON_ENVS
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: make test-website
|
||||||
|
|
||||||
test-rkt:
|
test-rkt:
|
||||||
executor: go-machine-recent
|
executor: go-machine-recent
|
||||||
environment:
|
environment:
|
||||||
|
|
67
.travis.yml
67
.travis.yml
|
@ -1,67 +0,0 @@
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
language: go
|
|
||||||
|
|
||||||
go:
|
|
||||||
- "1.x"
|
|
||||||
|
|
||||||
addons:
|
|
||||||
chrome: stable
|
|
||||||
|
|
||||||
git:
|
|
||||||
depth: 300
|
|
||||||
|
|
||||||
# This skips non-UI jobs for UI-only branches with names like f-ui/whatever or b-ui/something.
|
|
||||||
_skip_for_ui_branches: &skip_for_ui_branches
|
|
||||||
if: (type = push AND NOT branch =~ /^.-ui\b/) OR (type = pull_request AND NOT head_branch =~ /^.-ui\b/)
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: linux
|
|
||||||
dist: xenial
|
|
||||||
sudo: false
|
|
||||||
env: RUN_WEBSITE_TESTS=1 SKIP_NOMAD_TESTS=1
|
|
||||||
<<: *skip_for_ui_branches
|
|
||||||
- os: linux
|
|
||||||
dist: xenial
|
|
||||||
sudo: false
|
|
||||||
env: RUN_UI_TESTS=1 SKIP_NOMAD_TESTS=1
|
|
||||||
- os: linux
|
|
||||||
dist: xenial
|
|
||||||
sudo: false
|
|
||||||
env: RUN_STATIC_CHECKS=1 SKIP_NOMAD_TESTS=1
|
|
||||||
<<: *skip_for_ui_branches
|
|
||||||
- os: osx
|
|
||||||
osx_image: xcode9.1
|
|
||||||
<<: *skip_for_ui_branches
|
|
||||||
- os: linux
|
|
||||||
dist: xenial
|
|
||||||
sudo: required
|
|
||||||
env: RUN_E2E_TESTS=1 SKIP_NOMAD_TESTS=1
|
|
||||||
<<: *skip_for_ui_branches
|
|
||||||
allow_failures:
|
|
||||||
# Allow osx to fail as its flaky
|
|
||||||
- os: osx
|
|
||||||
#FIXME Allow race enabled builds to fail for now.
|
|
||||||
- env: ENABLE_RACE=1
|
|
||||||
fast_finish: true
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ -z "$SKIP_NOMAD_TESTS" ]]; then sudo -E bash ./scripts/travis-mac-priv.sh ; fi
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ -z "$SKIP_NOMAD_TESTS" ]]; then sudo -E bash ./scripts/travis-linux.sh ; fi
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$RUN_STATIC_CHECKS" ]]; then sudo -E bash ./scripts/vagrant-linux-priv-protoc.sh; fi
|
|
||||||
- if [[ "$RUN_UI_TESTS" ]]; then curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.15.2 ; fi
|
|
||||||
- if [[ "$RUN_UI_TESTS" ]]; then export PATH="$HOME/.yarn/bin:$PATH" ; fi
|
|
||||||
- echo "Travis Node Version" && node -v
|
|
||||||
|
|
||||||
install:
|
|
||||||
- if [[ -z "$SKIP_NOMAD_TESTS" ]] || [[ "$RUN_STATIC_CHECKS" ]]; then make deps; fi
|
|
||||||
- if [[ "$RUN_STATIC_CHECKS" ]]; then make lint-deps ; fi
|
|
||||||
- if [[ "$RUN_UI_TESTS" ]]; then . $HOME/.nvm/nvm.sh && cd ui && nvm install && nvm use && cd .. ; fi
|
|
||||||
|
|
||||||
script:
|
|
||||||
- sudo -E "PATH=$PATH" GOTESTSUM_JUNITFILE=/tmp/results.xml make travis
|
|
||||||
|
|
||||||
after_script:
|
|
||||||
- cat /tmp/results.xml
|
|
|
@ -305,13 +305,6 @@ clean: ## Remove build artifacts
|
||||||
@rm -rf "$(PROJECT_ROOT)/pkg/"
|
@rm -rf "$(PROJECT_ROOT)/pkg/"
|
||||||
@rm -f "$(GOPATH)/bin/nomad"
|
@rm -f "$(GOPATH)/bin/nomad"
|
||||||
|
|
||||||
.PHONY: travis
|
|
||||||
travis: ## Run Nomad test suites with output to prevent timeouts under Travis CI
|
|
||||||
@if [ ! $(SKIP_NOMAD_TESTS) ]; then \
|
|
||||||
make generate-structs; \
|
|
||||||
fi
|
|
||||||
@"$(PROJECT_ROOT)/scripts/travis.sh"
|
|
||||||
|
|
||||||
.PHONY: testcluster
|
.PHONY: testcluster
|
||||||
testcluster: ## Bring up a Linux test cluster using Vagrant. Set PROVIDER if necessary.
|
testcluster: ## Bring up a Linux test cluster using Vagrant. Set PROVIDER if necessary.
|
||||||
vagrant up nomad-server01 \
|
vagrant up nomad-server01 \
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
|
|
||||||
#enable ipv6
|
|
||||||
echo '{"ipv6":true, "fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
|
|
||||||
sudo service docker restart
|
|
||||||
|
|
||||||
# Ignore apt-get update errors to avoid failing due to misbehaving repo;
|
|
||||||
# true errors would fail in the apt-get install phase
|
|
||||||
apt-get update || true
|
|
||||||
|
|
||||||
apt-get install -y qemu shellcheck
|
|
||||||
bash ./scripts/travis-rkt.sh
|
|
||||||
bash ./scripts/travis-consul.sh
|
|
||||||
bash ./scripts/travis-vault.sh
|
|
|
@ -1,6 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
|
|
||||||
bash ./scripts/travis-consul.sh
|
|
||||||
bash ./scripts/travis-vault.sh
|
|
|
@ -1,22 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
export PING_SLEEP=60
|
|
||||||
bash -c "while true; do echo \$(date) - building ...; sleep $PING_SLEEP; done" &
|
|
||||||
PING_LOOP_PID=$!
|
|
||||||
|
|
||||||
trap 'kill ${PING_LOOP_PID} || true' EXIT HUP INT QUIT TERM
|
|
||||||
|
|
||||||
if [ "$RUN_STATIC_CHECKS" ]; then
|
|
||||||
make check
|
|
||||||
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
|
||||||
make checkscripts
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
NOMAD_SLOW_TEST=1 make test
|
|
||||||
TEST_OUTPUT=$?
|
|
||||||
|
|
||||||
kill $PING_LOOP_PID || true
|
|
||||||
|
|
||||||
exit $TEST_OUTPUT
|
|
Loading…
Reference in New Issue