Commit 7d48feb9 authored by Simon Cornet's avatar Simon Cornet
Browse files

[ci] feat: add linting stage

parent dccf01c7
Loading
Loading
Loading
Loading
+9 −25
Original line number Diff line number Diff line
---

variables:
  DOCKER_DRIVER: "overlay2"
  DOCKER_HOST: "tcp://localhost:2375/"
  DOCKER_TLS_CERTDIR: ""

# gitLab ci stages
stages:
  - "build"

build image:
  stage: "build"
  image: "docker:27.3.1"
  services:
    - name: "docker:27.3.1-dind"
      command: ["--tls=false"]
  script:

    # login to container registry
    - echo "$CR_PASSWORD" | docker login $CR_HOSTNAME -u $CR_USERNAME --password-stdin

    # build observium-pe image
    - "docker build -t roundcube -f Dockerfile.linux.amd64 ."
  # stages
  - "linting"
  - "build"

    # add tags to image
    - "docker image tag roundcube cr.simoncor.net/siempie/roundcube:latest"

    # push image to dockerhub.
    - "docker push --all-tags cr.simoncor.net/siempie/roundcube"
# include jobs
include:

    # logout from container registry
    - "docker logout $CR_HOSTNAME"
  # deployment
  - local: ".gitlab/linting.yaml"
  - local: ".gitlab/build.yaml"