.gitlab-ci.yml 1.51 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
    artifacts:
        paths:
            - ./
25
        expire_in: '1h'
26 27
    environment: ${CI_BUILD_REF_NAME}

28 29
layout:
    stage: layout
30
    image: node:7
31
    before_script:
32
       - cd Build
33
    script:
34 35
       - npm install
       - npm run build
36 37 38 39 40
    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
    when: manual
52 53
    dependencies:
        - layout
54 55 56

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

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