.gitlab-ci.yml 776 Bytes
Newer Older
1
2
3
4
5
6
7
variables:
  GIT_STRATEGY: fetch
  GIT_SSL_NO_VERIFY: "true"
  GIT_LFS_SKIP_SMUDGE: 1

stages:
  - build
8
  - deploy
9
10
11
12
13
14
15
16
17

image_build:
  stage: build
  image: docker:stable
  before_script:
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN http://$CI_REGISTRY
  script: |
    CI_COMMIT_SHA_7=$(echo $CI_COMMIT_SHA | cut -c1-7)
    docker build --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7 .
18
19
20
21
22
    docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7
  tags:
    - image-build
  except:
    variables:
Pauline Maury Laribière's avatar
Pauline Maury Laribière committed
23
      - $CI_PROJECT_URL == "https://gitlab.com/d6538/fso-metadata-r"
24
25
26
27
28
29
30
31

pages:
  stage: deploy
  image: alpine:latest
  script:
    - echo 'Nothing to do...'
  artifacts:
    paths:
32
    - public
33
34
  only:
    variables:
Pauline Maury Laribière's avatar
Pauline Maury Laribière committed
35
      - $CI_PROJECT_URL == "https://gitlab.com/d6538/fso-metadata-r"