.gitlab-ci.yml 1.47 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 10 11 12 13
stages:
    - build
    - deploy

build:
    stage: build
14 15 16
    variables:
        GIT_STRATEGY: "clone"
        GIT_SUBMODULE_STRATEGY: "recursive"
17
    script:
18 19 20
        - ./.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
21 22 23 24 25 26 27 28 29
    artifacts:
        paths:
            - ./
        expire_in: '7d'
    environment: ${CI_BUILD_REF_NAME}

deploy-master:
    stage: deploy
    script:
30
        - apk add openssh-client --update
31
        - eval $(ssh-agent -s)
32
        - echo "$SSH_PRIVATE_KEY" | ssh-add -
33
        - echo "$KNOWN_HOSTS" >> $HOME/.ssh/known_hosts
34
        - ./.gitlab-ci/scripts/deployer.sh -f/src/.gitlab-ci/deployer/deploy.php deploy master
35 36
    environment:
        name: master
37
        url: https://extensions.typo3.org/
38 39 40 41 42 43 44
    when: manual
    only:
        - master

deploy-develop:
    stage: deploy
    script:
45
        - apk add openssh-client --update
46
        - eval $(ssh-agent -s)
47
        - echo "$SSH_PRIVATE_KEY" | ssh-add -
48
        - echo "$KNOWN_HOSTS" >> $HOME/.ssh/known_hosts
49
        - ./.gitlab-ci/scripts/deployer.sh -f/src/.gitlab-ci/deployer/deploy.php deploy develop
50 51
    environment:
        name: develop
52
        url: https://extensions-dev.typo3.org/
53 54 55
    when: manual
    only:
        - develop