Skip to content

Commit

Permalink
circle config for audit portal
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-karpovich committed Apr 27, 2017
1 parent fada88b commit 0351506
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 2 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM mhart/alpine-node:7
RUN apk update

RUN apk add git
RUN npm install -g bower gulp-cli


RUN mkdir /code/
ADD . /code/
VOLUME /code/build/
VOLUME /code/node_modules/
VOLUME /code/src/bower_modules/
WORKDIR /code/

RUN npm install
RUN bower --allow-root install
RUN gulp build

EXPOSE 8080
CMD ["gulp", "start"]
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"etools-datepicker": "^1.0.10",
"moment": "^2.18.1",
"iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.1",
"etools-currency-amount-input": "^1.0.7"
"etools-currency-amount-input": "^1.0.7",
"etools-app-selector": "^1.0.3"
},
"devDependencies": {
"web-component-tester": "^4.0.0"
Expand Down
24 changes: 24 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
machine:
services:
- docker

dependencies:
cache_directories:
- "~/dockercache"

override:
- if [[ -e ~/dockercache/ap.tar ]]; then docker load -i ~/dockercache/ap.tar; fi
- docker-compose -f docker-compose.test.yml build
- mkdir -p ~/dockercache; docker save etoolsdev/etools-ap:dev > ~/dockercache/ap.tar


test:
override:
- docker-compose -f docker-compose.test.yml up --abort-on-container-exit

#deployment:
# hub:
# branch: [develop, staging, master]
# commands:
# - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
# - docker push unicef/etools-ap
29 changes: 29 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: '2.1'

services:
selenium-hub:
image: selenium/hub
environment:
SE_OPTS: "-timeout 600"
ports:
- 4444:4444

selenium-chrome:
image: selenium/node-chrome
environment:
HUB_PORT_4444_TCP_ADDR: selenium-hub
HUB_PORT_4444_TCP_PORT: 4444
links:
- selenium-hub:hub

ap:
build:
context: .
dockerfile: ./Dockerfile
image: etoolsdev/etools-ap:dev
volumes:
- ".:/code"
command: ["sh", "./test.sh"]
depends_on:
- selenium-hub
- selenium-chrome
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ gulp.task('watch', function () {

gulp.task('test', gulp.series(clean.build, gulp.parallel(buildElements, copyAssets, copyBower), runTests));
gulp.task('start', function () { nodemon({ script: 'server.js' }) });
gulp.task('build', gulp.series(clean.build, jsLinter, gulp.parallel(buildElements, copyAssets, copyBower), 'watch'));
gulp.task('build', gulp.series(clean.build, jsLinter, gulp.parallel(buildElements, copyAssets, copyBower)));



Expand Down
18 changes: 18 additions & 0 deletions wct.conf.docker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
// See https://github.com/Polymer/web-component-tester/blob/master/runner/config.js#L47-54
activeBrowsers: [
{
// Accepts anything wd does: https://github.com/admc/wd#browser-initialization
url: 'http://selenium-hub:4444/wd/hub',
// ... any other capabilities you like:
browserName: 'chrome',
}
],
plugins: {
local: false,
sauce: false,
},
webserver: {
hostname: "ap"
}
};

0 comments on commit 0351506

Please sign in to comment.