Commit a7ed4219 authored by Dimitrios Giannopoulos's avatar Dimitrios Giannopoulos
Browse files

fixed job inclusion

parent 0942d268
Loading
Loading
Loading
Loading
Loading
+1 −23
Original line number Original line Diff line number Diff line
stages:
include: ci-templates/build.yml
  - .pre
  - build
  - test
  - post
  - security

.default:
  variables:
    DEFAULT_TAG: "1.2.0-SNAPSHOT"
  before_script:
    - |
      if [ "$CI_COMMIT_REF_NAME" = "main" ] && [ -n "$CI_COMMIT_TAG" ]; then
        export APP_VERSION=$CI_COMMIT_TAG
      elif [ "$CI_COMMIT_REF_NAME" = "develop" ]; then
        export APP_VERSION="develop"
      else
        export APP_VERSION=$DEFAULT_TAG
      fi
  rules:
    - if: $CI_COMMIT_REF_NAME == "main"
    - if: $CI_COMMIT_REF_NAME == "develop"
    - if: $CI_COMMIT_REF_NAME == "12-create-a-pipeline-to-build-and-publish-the-docker-image-in-gitlab-registry"


maven_build:
maven_build:
  extends: .maven_build
  extends: .maven_build
 No newline at end of file
+23 −0
Original line number Original line Diff line number Diff line
stages:
  - .pre
  - build
  - test
  - post
  - security

.default:
  variables:
    DEFAULT_TAG: "1.2.0-SNAPSHOT"
  before_script:
    - |
      if [ "$CI_COMMIT_REF_NAME" = "main" ] && [ -n "$CI_COMMIT_TAG" ]; then
        export APP_VERSION=$CI_COMMIT_TAG
      elif [ "$CI_COMMIT_REF_NAME" = "develop" ]; then
        export APP_VERSION="develop"
      else
        export APP_VERSION=$DEFAULT_TAG
      fi
  rules:
    - if: $CI_COMMIT_REF_NAME == "main"
    - if: $CI_COMMIT_REF_NAME == "develop"
    - if: $CI_COMMIT_REF_NAME == "12-create-a-pipeline-to-build-and-publish-the-docker-image-in-gitlab-registry"
 No newline at end of file