Skip to content

Commit 746d0ef

Browse files
authored
Merge pull request overture-stack#6 from overture-stack/feature/ci
CircleCI Config
2 parents bde04c8 + cea0ef1 commit 746d0ef

File tree

3 files changed

+62
-5
lines changed

3 files changed

+62
-5
lines changed

.circleci/config.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
version: 2
2+
jobs:
3+
test:
4+
docker:
5+
- image: circleci/openjdk:8-jdk
6+
7+
working_directory: ~/repo
8+
9+
environment:
10+
# Customize the JVM maximum heap limit
11+
MAVEN_OPTS: -Xmx3200m
12+
13+
steps:
14+
- checkout
15+
16+
# Download and cache dependencies
17+
- restore_cache:
18+
keys:
19+
- v1-dependencies-{{ checksum "pom.xml" }}
20+
# fallback to using the latest cache if no exact match is found
21+
- v1-dependencies-
22+
- run:
23+
name: Fetch Maven Dependencies
24+
command: mvn dependency:go-offline
25+
- save_cache:
26+
paths:
27+
- ~/.m2
28+
key: v1-dependencies-{{ checksum "pom.xml" }}
29+
30+
# Run Tests
31+
- run:
32+
name: Maven Test
33+
command: |
34+
mvn test \
35+
-D auth.jwt.publicKeyUrl=$EGO_TEST_SERVER_KEY_URL
36+
37+
workflows:
38+
version: 2
39+
test:
40+
jobs:
41+
- test

README.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,22 @@ Here is a convenient list of steps to create a new application based on this tem
2424
- `name`
2525
- `description`
2626
3. Update __application.yml__:
27-
- `auth.jwt.publicKeyUrl` - URL to fetch the JWT verification key
28-
4. Update __README.md__:
27+
- `auth.jwt.publicKeyUrl` - URL to fetch the JWT verification key
28+
4. Configure Codacy:
29+
- Go to [Codacy Project Wizard](https://www.codacy.com/wizard/projects) and add your new repository.
30+
5. Configure CircleCI:
31+
- Go to [CircleCI Add Projects](https://circleci.com/add-projects/gh/overture-stack) and add your project.
32+
- Go to CircleCI project settings and modify environment variables
33+
- If not there, add new environment variable: `EGO_TEST_SERVER_KEY_URL` . This should store the URL used for `auth.jwt.publicKeyUrl` value in CircleCI tests.
34+
6. Update __README.md__:
2935
- Replace current README with template - __README.template.md__
3036
- Remove template file
3137
- Update Project name and description in new README
38+
- Update Shields in Introduction section
39+
- Codacy - Badge Markdown code can be found on Codacy project's settings page
40+
- CircleCI - Build from example using github organization, project, and branch names
41+
42+
3243

3344

3445
## Requirements

README.template.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@
1010
- [Introduction](#introduction)
1111
- [Features](#features)
1212
- [Requirements](#requirements)
13-
- [Quick Start](#quickstart)
13+
- [Quick Start](#quick-start)
14+
- [Testing](#testing)
15+
- [API](#requirements)
16+
- [Acknowledgements](#acknowledgements)
1417

1518

1619

1720

1821
## Introduction
1922

2023
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
24+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e91606af4a364076a7058c5ea1c006a8)](https://www.codacy.com/app/joneubank/microservice-template-java?utm_source=github.com&utm_medium=referral&utm_content=overture-stack/microservice-template-java&utm_campaign=Badge_Grade)
25+
[![CircleCI](https://circleci.com/gh/overture-stack/microservice-template-java/tree/master.svg?style=shield)](https://circleci.com/gh/overture-stack/microservice-template-java/tree/master)
2126

2227
TODO: Replace with introduction
2328

@@ -83,12 +88,12 @@ Application will run by default on port `1234`
8388
Configure the port by changing `services.api.ports` in __docker-compose.yml__. Port 1234 was used by default so the value is easy to identify and change in the configuration file.
8489

8590

86-
## Test
91+
## Testing
8792
TODO: Additional instructions for testing the application.
8893

8994

9095
## API
9196
TODO: API Reference with examples, or a link to a wiki or other documentation source.
9297

93-
## Acknowledgments
98+
## Acknowledgements
9499
TODO: Show folks some love.

0 commit comments

Comments
 (0)