stages:
  - build
  - deploy

image: alpine

build:dev:
  stage: build
  before_script:
    - apk update
    - apk add nodejs nodejs-npm git
    - npm install
    - npm install cli/
  script:
    - npm run-script build
  artifacts:
    name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
    paths:
      - build/
    expire_in: 1 day

deploy:dev:
  stage: deploy
  only:
    - develop
  image: google/cloud-sdk:alpine
  dependencies:
    - build:dev
  script:
    - echo "172.17.42.1 server server.local" >> /etc/hosts
    - apk update
    - apk add find
    - echo "Deploy Test"
    - find *
    - echo "Deploy Success"

stages:
  - build
  - deploy

image: alpine

build:dev:
  stage: build
  before_script:
    - apk update
    - apk add nodejs nodejs-npm git
    - npm install
    - npm install cli/
  script:
    - npm run-script build
  artifacts:
    name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
    paths:
      - build/
    expire_in: 1 day

deploy:dev:
  stage: deploy
  only:
    - develop
  image: google/cloud-sdk:alpine
  dependencies:
    - build:dev
  script:
    - apk update
    - apk add find
    - echo "Deploy Test"
    - find *
    - echo "Deploy Success"

Revert "Override hosts file to access server (== host)"
Revert "Override hosts file to access server (== host)"

This reverts commit 95407b5055269b8217dc44d7a9b7601aae41f48f.
