Skip to content

Instantly share code, notes, and snippets.

@thienn1107
Created July 6, 2018 07:34
Show Gist options
  • Save thienn1107/c775b8b99edd5c50ca1a8dc51c09b3ff to your computer and use it in GitHub Desktop.
Save thienn1107/c775b8b99edd5c50ca1a8dc51c09b3ff to your computer and use it in GitHub Desktop.

Revisions

  1. thienn1107 created this gist Jul 6, 2018.
    36 changes: 36 additions & 0 deletions .gitlab-ci.yml example
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    stages:
    - build-stg
    - deploy-stg

    build-stg:
    stage: build-stg
    script:
    - cp .env.example.stg .env
    - echo $CI_PROJECT_DIR
    - npm install
    - sed -i 's/CI_PRO_DB_HOST/'"$CI_STG_DB_HOST"'/' .env

    - sh /home/gitlab-runner/stg-admin-chat-robin.build.sh

    environment:
    name: staging
    url: https://xxx.com

    tags:
    - STAGING
    only:
    - staging

    deploy-stg:
    stage: deploy-stg
    script:
    - sh /home/gitlab-runner/stg-admin-chat-robin-deploy.sh

    environment:
    name: staging
    url: https://xxx.com

    tags:
    - STAGING
    only:
    - staging