.gitlab-ci.yml 1.26 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
variables:
    GIT_STRATEGY: "none"

stages:
    - init
    - build
    - deploy

init:
    stage: init
Sascha Marcel Schmidt's avatar
Sascha Marcel Schmidt committed
11
    variables:
12 13 14 15 16 17 18 19 20 21
        GIT_STRATEGY: "clone"
    script:
        - git clone --branch master
                https://github.com/torvitas/docker-scripts.git
                ./scripts
    artifacts:
        paths:
            - ./
        expire_in: '1h'
    environment: ${CI_BUILD_REF_NAME}
Sascha Marcel Schmidt's avatar
Sascha Marcel Schmidt committed
22 23
    tags:
        - dind
24 25 26 27

build:
    stage: build
    script:
28 29
        - ./scripts/composer.sh config -g store-auths false
        - ./scripts/composer.sh config http-basic.git-t3o.typo3.org ${GIT_USER_NAME} ${GIT_PASSWORD}
30 31 32 33 34 35
        - ./scripts/composer.sh install
    artifacts:
        paths:
            - ./
        expire_in: '7d'
    environment: ${CI_BUILD_REF_NAME}
Sascha Marcel Schmidt's avatar
Sascha Marcel Schmidt committed
36 37
    tags:
        - dind
38 39 40 41 42 43 44 45 46 47 48

deploy-master:
    stage: deploy
    script:
        - ./scripts/deployer.sh ${CI_BUILD_REF_NAME}
    environment:
        name: master
        url: https://t3o-master.typo3.org/
    when: manual
    only:
        - master
Sascha Marcel Schmidt's avatar
Sascha Marcel Schmidt committed
49 50
    tags:
        - dind
51 52 53 54 55 56 57 58 59 60 61

deploy-develop:
    stage: deploy
    script:
        - ./scripts/deployer.sh ${CI_BUILD_REF_NAME}
    environment:
        name: develop
        url: https://t3o-develop.typo3.org/
    when: manual
    only:
        - develop
Sascha Marcel Schmidt's avatar
Sascha Marcel Schmidt committed
62 63
    tags:
        - dind