Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 4ce28ef

Browse files
butlerxDanielBrierton
authored andcommitted
use circle v2
1 parent ef7a729 commit 4ce28ef

File tree

8 files changed

+56
-88
lines changed

8 files changed

+56
-88
lines changed

.circleci/config.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
version: 2
3+
jobs:
4+
build:
5+
working_directory: ~/cp-badges-service
6+
docker:
7+
- image: nodesource/node:0.10.45
8+
environment:
9+
NODE_ENV: testing
10+
steps:
11+
- checkout
12+
- restore_cache:
13+
key: dependency-cache-{{ checksum "package.json" }}
14+
- run:
15+
name: Install Dependencies
16+
command: npm install
17+
- save_cache:
18+
key: dependency-cache-{{ checksum "package.json" }}
19+
paths:
20+
- node_modules
21+
- run:
22+
name: Tests
23+
command: npm run test
24+
deploy:
25+
working_directory: ~/cp-badges-service
26+
docker:
27+
- image: golang:1.6.4
28+
steps:
29+
- checkout
30+
- setup_remote_docker
31+
- run:
32+
name: Install Docker client
33+
command: |
34+
set -x
35+
VER="17.03.0-ce"
36+
curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
37+
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
38+
mv /tmp/docker/* /usr/bin
39+
- run:
40+
name: Deploy to K8
41+
command: GIT_SHA1=$CIRCLE_SHA1 GIT_BRANCH=$CIRCLE_BRANCH ./.circleci/kube.sh
42+
workflows:
43+
version: 2
44+
build-test-and-deploy:
45+
jobs:
46+
- build
47+
- deploy:
48+
requires:
49+
- build
50+
filters:
51+
branches:
52+
only:
53+
- master
54+
- staging
File renamed without changes.

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ ARG DEP_VERSION=latest
44
RUN apk add --update git make gcc g++ python && \
55
mkdir -p /usr/src/app
66
WORKDIR /usr/src/app
7-
ADD . /usr/src/app
7+
COPY . /usr/src/app
88
RUN npm install --production && \
9-
npm install cp-translations@$DEP_VERSION && \
9+
npm install cp-translations@"$DEP_VERSION" && \
1010
apk del make gcc g++ python && \
1111
rm -rf /tmp/* /root/.npm /root/.node-gyp
1212
EXPOSE 10305

circle.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

deploy/cp-badges-service.conf

Lines changed: 0 additions & 21 deletions
This file was deleted.

deploy/start-server.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

deploy/stop-server.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

start.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)