.gitlab-ci.yml 645 Bytes
Newer Older
David's avatar
Demo  
David committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
default:
  image: docker:stable
  services:
    - docker:dind

stages:
  - pre_git
  - prepare
  - build

variables: 
  CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG

Git Container:
  stage: pre_git
David's avatar
David committed
16 17
  script:  
    - cd git_container
David's avatar
Demo  
David committed
18 19
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
    - docker pull $CONTAINER_TEST_IMAGE || true
David's avatar
David committed
20
    - docker build --cache-from $CONTAINER_TEST_IMAGE --tag $CONTAINER_TEST_IMAGE .
David's avatar
Demo  
David committed
21 22 23 24 25 26 27 28
    - docker push $CONTAINER_TEST_IMAGE

Any Prep:
  stage: prepare
  image: $CONTAINER_TEST_IMAGE
  script:
    - git clone https://github.com/matrix-org/matrix-appservice-irc.git