Skip to content

Instantly share code, notes, and snippets.

@AlexR1712
Created December 13, 2017 15:20
Show Gist options
  • Save AlexR1712/0db43c34fcb92b3ccff12eb8ac7e1da4 to your computer and use it in GitHub Desktop.
Save AlexR1712/0db43c34fcb92b3ccff12eb8ac7e1da4 to your computer and use it in GitHub Desktop.

Revisions

  1. @aasanchez aasanchez created this gist Nov 13, 2017.
    44 changes: 44 additions & 0 deletions .gitlab-ci.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,44 @@
    stages:
    - test
    - build
    - deploy

    test:
    stage: test
    script: echo "Running tests"

    build:
    stage: build
    script: echo "Building the app"

    deploy_develop:
    stage: deploy
    script:
    - echo "Deploy to develop server"
    environment:
    name: develop
    url: https://develop.example.com
    only:
    - develop

    deploy_staging:
    stage: deploy
    script:
    - echo "Deploy to staging server"
    environment:
    name: staging
    url: https://staging.example.com
    only:
    - master

    deploy_prod:
    stage: deploy
    script:
    - echo "Deploy to production server"
    environment:
    name: production
    url: https://example.com
    when: manual
    only:
    - tags
    - master