This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 233
/
config.yml
66 lines (52 loc) · 2.42 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
jdk_180_version: &jdk_180_version jdk1.8.0
####################
# Jobs
####################
version: 2
jobs:
build:
working_directory: ~/spotify/helios
parallelism: 6
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
MAVEN_OPTS: -Xmx128m
JAVA_VERSION: *jdk_180_version
machine: true
steps:
# Machine Setup
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# The following `checkout` command checks out your code to your working directory. In 1.0 this is done implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
- checkout
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
# tells CircleCI that we want virtualenv so that we can pip install codecov without errors
- run:
name: Install dependencies
working_directory: ~/spotify/helios
command: |
apt-get -y -qq update
apt-get -y -qq install jq
update-alternatives --set java /usr/lib/jvm/$JAVA_VERSION/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/$JAVA_VERSION/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/$JAVA_VERSION" >> $BASH_ENV
if [[ $(python --version 2>&1) = *"2.7.10"* ]] || pyenv versions --bare | grep -x -q '2.7.10'; then pyenv global 2.7.10;else pyenv install --skip-existing 2.7.10 && pyenv global 2.7.10 && pyenv rehash && pip install virtualenv && pip install nose && pip install pep8 && pyenv rehash;fi
# Configuring Docker to accept remote connections
- run: ./circle.sh pre_machine
# Restarting docker for the changes to be applied
- run: sudo service docker restart
- run: ./circle.sh post_machine
- run: ./circle.sh dependencies
- run: ./circle.sh test
- run: if [ "$CIRCLE_NODE_INDEX" == "0" ]; then ./circle.sh post_test; fi
- run: ./circle.sh collect_test_reports
- store_test_results:
path: /tmp/circleci-test-results
# Save artifacts
- store_artifacts:
path: /tmp/circleci-artifacts
- store_artifacts:
path: artifacts
- store_artifacts:
path: /var/log/upstart/docker.log
- store_artifacts:
path: /tmp/circleci-test-results