Skip to content

Commit

Permalink
Travis build, test and push docker image (#3)
Browse files Browse the repository at this point in the history
Travis build, test and push docker image

* On a successful build on master the docker image should be pushed up

* Add encrypted slack key
  • Loading branch information
benjefferies authored Nov 21, 2017
1 parent 9528778 commit f127107
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .travis.settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<profiles>
<profile>
<id>artifactory</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>

<repositories>
<repository>
<id>release-repo</id>
<name>libs-release</name>
<url>http://artifactory-sdc.onsdigital.uk/artifactory/libs-release-local</url>
</repository>
<repository>
<id>snapshot-repo</id>
<url>http://artifactory-sdc.onsdigital.uk/artifactory/libs-snapshot-local/</url>
</repository>
</repositories>
</profile>
</profiles>

<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>
30 changes: 30 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
sudo: required

services:
- docker

language: java
jdk: openjdk8

before_install: "cp .travis.settings.xml $HOME/.m2/settings.xml"

after_success:
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
docker push sdcplatform/collectionexercisesvc;
fi

notifications:
slack:
on_failure: always
on_success: never
rooms:
secure: xHvqsIklJ+gX67JbpTdi0TMHxMKV9llXH6htk8qIe/sRweq/8tgcTFhSnp6Zlw42cFH6jeweme8xXH6xS3Cft6gLj8nHwAzpkU6cgDndUDPiN1pgCZOBHmIccFcWrl81REfJVgyOVicyKgVthdV1VLCDUkj9Cq+67LKq+EUi9EUw5/1ZzAkPDmuhzinelZ50lu27jyWcPQkKjN4XnpLYB2ybyqqBAJkKaxwooxCZifq1Ghub7a/EH7wiCZgc0zyJfg6EvY4MkJgbfj6b449PRTYaqNxj8Cpy0hO7EsALSednjbjoJtH3+axAFoHdVvskj0QAc3Q9pZfddXWajK4uvWOxf8EifvbhOX+yMJDy7olfuDfVD+BuCSwUXKycbJNA5C4A9fSvj/aoHI/kxxm+/ydToSaZVxLmIa5WR8EU215AAzP3RnOfYDcpPAbYLtq+TdqMuxmns+4mNjOflu4EaRexlNgWbnEwRDvuvgoS/ALEFr2fHrC/LSoMDdgb0pxDE7ddFmAsutWT8zbhGjrNF3mXlfJWEu4xky3rmUsc3GiB5xebPnPaagrVciwHkyJenn8zywBn+zk3u/VfQuHTN9u04dwf38FNC/QZBNj9AFy9wyn9YxWVvsS7euEkpbMLorz1fcIQL+H1sP8C3tZqOleurY+0mkJRHMsiGSjwwx4=

cache:
directories:
- $HOME/.m2

branches:
only:
- master
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/68211df3f35e44fbb3fe01da5151a8b9)](https://www.codacy.com/app/sdcplatform/rm-collection-exercise-service?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ONSdigital/rm-collection-exercise-service&amp;utm_campaign=Badge_Grade) [![Docker Pulls](https://img.shields.io/docker/pulls/sdcplatform/collectionexercisesvc.svg)]()
[![Build Status](https://travis-ci.org/ONSdigital/rm-collection-exercise-service.svg?branch=master)](https://travis-ci.org/ONSdigital/rm-collection-exercise-service)

# Collection Exercise Service
The Collection Exercise service will be responsible for the orchestration of the processes necessary to begin the data collection for a particular field period for a particular survey.
Expand Down

0 comments on commit f127107

Please sign in to comment.