.gitlab-ci.yml 1.55 KB
Newer Older
1 2
variables:
    GIT_STRATEGY: "none"
3
    GIT_SSL_NO_VERIFY: "true"
4

Sascha Marcel Schmidt's avatar
Sascha Marcel Schmidt committed
5 6 7
before_script:
    - apk add bash --update

8 9
stages:
    - build
10
    - layout
11 12 13 14
    - deploy

build:
    stage: build
15 16 17
    variables:
        GIT_STRATEGY: "clone"
        GIT_SUBMODULE_STRATEGY: "recursive"
18
    script:
19 20 21
        - ./.gitlab-ci/scripts/composer.sh config store-auths false
        - ./.gitlab-ci/scripts/composer.sh config http-basic.git-t3o.typo3.org gitlab-ci-token ${CI_BUILD_TOKEN}
        - ./.gitlab-ci/scripts/composer.sh install
22 23 24 25 26 27
    artifacts:
        paths:
            - ./
        expire_in: '7d'
    environment: ${CI_BUILD_REF_NAME}

28 29 30 31 32 33 34 35 36 37 38 39 40
layout:
    stage: layout
    image: montoias/docker-nodejs-bower-grunt-compass:v2
    before_script:
        - cd html/typo3conf/ext/t3olayout/Resources/Private
    script:
        - npm install
        - grunt
    artifacts:
        paths:
          - ./
        expire_in: '7d'
    environment: ${CI_BUILD_REF_NAME}
41 42
    dependencies:
        - build
43

44
.deploy-template: &deploy_template
45 46
    stage: deploy
    script:
47
        - apk add openssh-client
48
        - eval $(ssh-agent -s)
49
        - echo "$SSH_PRIVATE_KEY" | ssh-add -
50
        - ./.gitlab-ci/scripts/deployer.sh -f/src/.gitlab-ci/deployer/deploy.php deploy ${CI_BUILD_REF_NAME}
51 52 53 54
    when: manual

deploy-master:
    <<: *deploy_template
55 56
    environment:
        name: master
57
        url: https://extensions.typo3.org/
58 59 60 61
    only:
        - master

deploy-develop:
62
    <<: *deploy_template
63 64
    environment:
        name: develop
65
        url: https://extensions-dev.typo3.org/
66 67
    only:
        - develop