Facebook
From Voluminous Guinea Pig, 1 Week ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 72
  1. #  Template NodeJS build
  2.  
  3. #  This template allows you to validate your NodeJS code.
  4. #  The workflow allows running tests and code linting on the default branch.
  5.  
  6. image: node:14
  7.  
  8. pipelines:
  9.   default:
  10.     - step:
  11.         name: Build
  12.         caches:
  13.           - node
  14.         script:
  15.           - IMAGE_TAG=$(echo $BITBUCKET_BRANCH | sed "s/\//-/" | sed "s/master/latest/")
  16.           - IMAGE_NAME=devamesp/webview-v2:$IMAGE_TAG
  17.           - echo "Criando imagem $IMAGE_NAME"
  18.           - npx gulp
  19.           - docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD
  20.           - docker build -f Dockerfile -t $IMAGE_NAME .
  21.           - docker push $IMAGE_NAME
  22.