Commit a64849f4 authored by George Papathanail's avatar George Papathanail
Browse files

Update ci.yaml, use separate tags (docker, shell)

parent d4f9e943
Loading
Loading
Loading
Loading
Loading
+23 −10
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ stages:
  - architecture
  - test
  - build
  - push

variables:
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
@@ -56,15 +57,27 @@ test:

build:
  stage: build
  image: docker:29.3.0
  services:
    - docker:29.3.0-dind
  variables:
    DOCKER_TLS_CERTDIR: ""
  tags:
    - shell
  before_script:
    - docker info
  script:
    - docker build -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" -t "$CI_REGISTRY_IMAGE:latest" .
  rules:
    - if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/'

push:
  stage: push
  tags:
    - shell
  needs:
    - build
  before_script:
    - docker info
  script:
    - docker build -t oeg-ci-test .
  allow_failure: true
    - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
    - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
    - docker push "$CI_REGISTRY_IMAGE:latest"
    - docker logout "$CI_REGISTRY"
  rules:
    - if: '$CI_PIPELINE_SOURCE == "push"'
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
    - if: '$CI_COMMIT_BRANCH == "main"'
 No newline at end of file
    - if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/'
 No newline at end of file