add running of docker commands from gulp, configure dependencies

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2018-12-22 11:25:43 +01:00
parent f871ab35c2
commit 4c71931e51
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
3 changed files with 16 additions and 12 deletions

View File

@ -79,17 +79,13 @@ There are few environment variables you can set:
For development use: For development use:
``` ```
npm run start yarn run start
``` ```
For building use: For building use:
``` ```
npm run build yarn run default
``` ```
To create the docker image use: To create and push the docker image use:
``` ```
npm run image yarn run release
```
To push the image use:
```
npm run push
``` ```

View File

@ -3,6 +3,7 @@ const babel = require('gulp-babel')
const clean = require('gulp-clean') const clean = require('gulp-clean')
const mocha = require('gulp-mocha') const mocha = require('gulp-mocha')
const print = require('gulp-print').default const print = require('gulp-print').default
const run = require('gulp-run-command').default
const nodemon = require('gulp-nodemon') const nodemon = require('gulp-nodemon')
gulp.task('devel', () => { gulp.task('devel', () => {
@ -35,11 +36,16 @@ gulp.task('testw', () =>
})) }))
) )
gulp.task('build', () => gulp.task('build', ['clean', 'test'], () =>
gulp.src('src/**/*.js') gulp.src('src/**/*.js')
.pipe(babel()) .pipe(babel())
.pipe(print()) .pipe(print())
.pipe(gulp.dest('dist/')) .pipe(gulp.dest('dist/'))
) )
gulp.task('default', ['clean', 'test', 'build']) gulp.task('image', ['build'], run('docker build -t statusteam/ghcmgr .'))
gulp.task('push', ['image'], run('docker push statusteam/ghcmgr'))
gulp.task('default', ['build'])
gulp.task('release', ['push'])

View File

@ -30,6 +30,7 @@
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-babel": "^8.0.0-beta.2", "gulp-babel": "^8.0.0-beta.2",
"gulp-clean": "^0.4.0", "gulp-clean": "^0.4.0",
"gulp-exec": "^3.0.2",
"gulp-mocha": "^6.0.0", "gulp-mocha": "^6.0.0",
"gulp-nodemon": "^2.2.1", "gulp-nodemon": "^2.2.1",
"gulp-print": "^5.0.0", "gulp-print": "^5.0.0",
@ -48,8 +49,9 @@
"devel": "gulp devel", "devel": "gulp devel",
"clean": "gulp clean", "clean": "gulp clean",
"build": "gulp build", "build": "gulp build",
"image": "docker build -t statusteam/ghcmgr .", "image": "gulp image",
"push": "docker push statusteam/ghcmgr" "push": "gulp push",
"release": "release"
}, },
"mocha": [ "mocha": [
"@babel/register" "@babel/register"