open-nomad/.circleci/config/jobs/test-e2e.yml
Mahmood Ali 52af6e973b Refactor circleci CI scripts
This adopts pattern used by Vault, where we split CircleCI yaml config
into multiple files that get packed and translated to 2.0.

This has two motivations: First, to ease translating config to CircleCI
2.0 so it can run on Enterprise private repository.  Second and most
importantly, it also adding Enterprise specific jobs in separate files
with reduced config file merging conflict resolution.
2019-11-20 15:02:08 -05:00

18 lines
733 B
YAML

executor: go
steps:
- checkout
- run: apt-get update; apt-get install -y sudo unzip
# e2e tests require privileged mount/umount permissions when running as root
# TODO: switch to using machine executor and run as root to test e2e path
- run:
name: prepare non-root user
command: |
groupadd --gid 3434 circleci
useradd --uid 3434 --gid circleci --shell /bin/bash --create-home circleci
echo 'circleci ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-circleci
echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
chown -R circleci:circleci /go
- run: sudo -E -H -u circleci PATH=${PATH} make deps
- run: sudo -E -H -u circleci PATH=${PATH} make e2e-test