.gitlab-ci.yml 798 Bytes
Newer Older
1 2
image: alpine:3.9

3
stages:
Vesa Vertainen's avatar
Vesa Vertainen committed
4
  - update
5 6 7
  - build
  - test

8
before_script:
Joni Ahonen's avatar
Joni Ahonen committed
9
 - 'which ssh-agent || ( apk update && apk add openssh-client )'
10 11 12 13 14 15
 - eval $(ssh-agent -s)
 - mkdir -p ~/.ssh
 - chmod 700 ~/.ssh
 - echo "$SSH_PRIVATE_KEY" | ssh-add -
 - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
 - chmod 644 ~/.ssh/known_hosts
Vesa Vertainen's avatar
Vesa Vertainen committed
16

Vesa Vertainen's avatar
Vesa Vertainen committed
17 18 19 20 21
update_concourse:
  stage: update
  script:
    - sh ./gitlab-ci/update-concourse.sh
  only:
22
    - master
Vesa Vertainen's avatar
Vesa Vertainen committed
23 24 25 26
  except:
    changes:
      - "*.md"

27
build_environment:
28 29
  stage: build
  script:
Vesa Vertainen's avatar
Vesa Vertainen committed
30
    - sh ./gitlab-ci/build-environment.sh
31
  only:
32
    - master
33 34 35 36
  except:
    changes:
      - "*.md"

37
test_pipeline:
38 39 40 41
  stage: test
  dependencies:
    - build_environment
  script:
Vesa Vertainen's avatar
Vesa Vertainen committed
42
    - sh ./gitlab-ci/setup-and-test-pipeline.sh
Vesa Vertainen's avatar
Vesa Vertainen committed
43
  only:
44
    - master
Vesa Vertainen's avatar
Vesa Vertainen committed
45 46
  except:
    changes:
Joni Ahonen's avatar
Joni Ahonen committed
47
      - "*.md"