Skip to content

Commit c127fcd

Browse files
committed
CircleCI build - fix after recent changes on CircleCI side
Builds fail, e.g. https://circleci.com/gh/scoverage/scoverage-maven-plugin/82 Check this thread https://discuss.circleci.com/t/circleci-was-unable-to-run-the-job-runner/31894/18 Configuration fixed and simplified based on example project: https://github.com/CircleCI-Public/circleci-demo-java-spring/tree/maven
1 parent 3ce8741 commit c127fcd

File tree

1 file changed

+4
-55
lines changed

1 file changed

+4
-55
lines changed

.circleci/config.yml

Lines changed: 4 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,16 @@
1-
# This configuration was automatically generated from a CircleCI 1.0 config.
2-
# It should include any build commands you had along with commands that CircleCI
3-
# inferred from your project structure. We strongly recommend you read all the
4-
# comments in this file to understand the structure of CircleCI 2.0, as the idiom
5-
# for configuration has changed substantially in 2.0 to allow arbitrary jobs rather
6-
# than the prescribed lifecycle of 1.0. In general, we recommend using this generated
7-
# configuration as a reference rather than using it in production, though in most
8-
# cases it should duplicate the execution of your original 1.0 config.
91
version: 2
102
jobs:
113
build:
124
working_directory: ~/scoverage/scoverage-maven-plugin
13-
parallelism: 1
14-
shell: /bin/bash --login
15-
# CircleCI 2.0 does not support environment variables that refer to each other the same way as 1.0 did.
16-
# If any of these refer to each other, rewrite them so that they don't or see https://circleci.com/docs/2.0/env-vars/#interpolating-environment-variables-to-set-other-environment-variables .
5+
176
environment:
18-
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
19-
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
207
_JAVA_OPTIONS: -Xms512m -Xmx1024m
21-
# In CircleCI 1.0 we used a pre-configured image with a large number of languages and other packages.
22-
# In CircleCI 2.0 you can now specify your own image, or use one of our pre-configured images.
23-
# The following configuration line tells CircleCI to use the specified docker image as the runtime environment for you job.
24-
# We have selected a pre-built image that mirrors the build environment we use on
25-
# the 1.0 platform, but we recommend you choose an image more tailored to the needs
26-
# of each job. For more information on choosing an image (or alternatively using a
27-
# VM instead of a container) see https://circleci.com/docs/2.0/executor-types/
28-
# To see the list of pre-built images that CircleCI provides for most common languages see
29-
# https://circleci.com/docs/2.0/circleci-images/
8+
309
docker:
31-
- image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37
32-
command: /sbin/init
10+
- image: circleci/openjdk:8-jdk-stretch
11+
3312
steps:
34-
# Machine Setup
35-
# 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
36-
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
3713
- checkout
38-
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
39-
# In many cases you can simplify this from what is generated here.
40-
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
41-
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
42-
# This is based on your 1.0 configuration file or project settings
43-
- run:
44-
working_directory: ~/scoverage/scoverage-maven-plugin
45-
command: sudo update-alternatives --set java /usr/lib/jvm/jdk1.8.0/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/jdk1.8.0/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/jdk1.8.0" >> $BASH_ENV
46-
# Dependencies
47-
# This would typically go in either a build or a build-and-test job when using workflows
48-
# Restore the dependency cache
4914
- restore_cache:
5015
keys:
5116
# This branch if available
@@ -54,26 +19,10 @@ jobs:
5419
- v1-dep-master-
5520
# Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
5621
- v1-dep-
57-
# This is based on your 1.0 configuration file or project settings
5822
- run: java -XX:+PrintFlagsFinal -version
5923
- run: mvn --version
6024
- run: mvn verify --update-snapshots --settings .travis.settings.xml -e
61-
# Save dependency cache
6225
- save_cache:
6326
key: v1-dep-{{ .Branch }}-{{ epoch }}
6427
paths:
6528
- ~/.m2
66-
# Test
67-
# This would typically be a build job when using workflows, possibly combined with build
68-
# This is based on your 1.0 configuration file or project settings
69-
# - run: mvn verify --settings .travis.settings.xml -e
70-
# Teardown
71-
# 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
72-
# Save test results
73-
# - store_test_results:
74-
# path: /tmp/circleci-test-results
75-
# Save artifacts
76-
# - store_artifacts:
77-
# path: /tmp/circleci-artifacts
78-
# - store_artifacts:
79-
# path: /tmp/circleci-test-results

0 commit comments

Comments
 (0)