Merge branch 'dev-defuj' of github.com:defuj/eis into dev-bagus
This commit is contained in:
commit
f101b6882b
@ -2,8 +2,18 @@
|
|||||||
const { exec } = require('child_process')
|
const { exec } = require('child_process')
|
||||||
|
|
||||||
function buildAndPush(version) {
|
function buildAndPush(version) {
|
||||||
const dockerImageTag = `defuj/apkt-eis:${version}`
|
const build_app = `npm run build`
|
||||||
const command = `npm run build && docker build . -t ${dockerImageTag} && docker push ${dockerImageTag}`
|
const docker_image_tag = `defuj/apkt-eis:${version}`
|
||||||
|
const docker_account = {
|
||||||
|
username: 'defuj',
|
||||||
|
token: 'dckr_pat_U_kP14Ws82lJun9f-B4mRpJfjW0'
|
||||||
|
}
|
||||||
|
const docker_logout = `docker logout`
|
||||||
|
const docker_login = `docker login -u ${docker_account.username} -p ${docker_account.token}`
|
||||||
|
const docker_build = `docker build . -t ${docker_image_tag}`
|
||||||
|
const docker_push = `docker push ${docker_image_tag}`
|
||||||
|
|
||||||
|
const command = `${build_app} && ${docker_logout} && ${docker_login} && ${docker_build} && ${docker_push}`
|
||||||
|
|
||||||
exec(command, (error, stdout, stderr) => {
|
exec(command, (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user