Skip to content
.gitlab-ci.yml 772 B
Newer Older
variables:
  GIT_STRATEGY: fetch
  GIT_SSL_NO_VERIFY: "true"
  GIT_LFS_SKIP_SMUDGE: 1

stages:
  - build
  - deploy

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 .
    docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA_7
  tags:
    - image-build
  except:
    variables:
      - $CI_PROJECT_URL == "https://gitlab.com/dscc/fso-metadata-r"

pages:
  stage: deploy
  image: alpine:latest
  script:
    - echo 'Nothing to do...'
  artifacts:
    paths:
    - docs
  only:
    variables:
      - $CI_PROJECT_URL == "https://gitlab.com/dscc/fso-metadata-r"