Skip to content
Snippets Groups Projects
Select Git revision
  • b5f8ebb059dd100f73b674556a24268eba43b1c4
  • master default protected
  • feature/PRXS-3383-CollectionsRankSort
  • feature/3149-LocaleCodeAsID
  • refactor/PRXS-3053-RefactorFiles
  • feature/3146-UpdateItemStorageInterface
  • feature/3180-RemoveOldHugo
  • feature/3264-FixExtracTranslationsArrays
  • feature/3274-ObjectIndexesFixes
  • feature/2931-AllowPartialDecode
  • feature/3055-ItemsRestAPI
  • feature/3082-gitlab-triage
  • feature/3055-LogsRestAPI
  • feature/2985-add-preset-settings
  • feature/2929-MultiInvitationFix
  • feature/2929-MultiInvitation
  • docs/2889-HugoModules
  • docs/2954-CheckResource
  • docs/3012-SplitBuild
  • docs/3024-PerxisWebStatic
  • feature/2911-GetArchive
  • v0.27.0
  • v0.21.0
  • v0.19.0
  • v0.20.0
25 results

.gitlab-ci.yml

Blame
  • .gitlab-ci.yml 1.89 KiB
    stages:
      - release
    
    start_release:
      image: golang:1.22.0-alpine3.18
      stage: release
      rules:
        - if: $CI_PIPELINE_SOURCE == "pipeline"
        - if: $CI_PIPELINE_SOURCE == "web"
          when: manual
      variables:
        GIT_STRATEGY: clone
        GIT_DEPTH: 0
      before_script:
        - apk --no-cache add git
      script:
        - echo "Start release for perxis-proto"
        - echo LAST_VERSION=$(git describe --tags --abbrev=0) >> vars.env
      artifacts:
        reports:
          dotenv: vars.env
    
    get_release_info:
      stage: release
      image:
        name: orhunp/git-cliff:latest
        entrypoint: [ "" ]
      rules:
        - if: $CI_PIPELINE_SOURCE == "pipeline"
        - if: $CI_PIPELINE_SOURCE == "web"
      variables:
        GIT_STRATEGY: clone
        GIT_DEPTH: 0
      script:
        - echo "VERSION=$(git-cliff --bumped-version)" >> vars.env
        - echo "$(git-cliff --unreleased | sed '1,6d' | sed '$d')" > CHANGELOG.md
      artifacts:
        reports:
          dotenv: vars.env
        paths:
          - CHANGELOG.md
    
    release:
      stage: release
      image: registry.gitlab.com/gitlab-org/release-cli:latest
      rules:
        - if: $CI_PIPELINE_SOURCE == "pipeline"
        - if: $CI_PIPELINE_SOURCE == "web"
      needs:
        - job: start_release
          artifacts: true
        - job: get_release_info
          artifacts: true
      script:
        - echo "PERXIS_PROTO_RELEASE_VERSION=$VERSION" >> vars.env
        - |
          if [ "$VERSION" == "$LAST_VERSION" ]; then
            exit 204
          fi
    #  # TODO Убрать при влитии feature-ветки в мастер
    #  release:
    #    name: "Release $VERSION"
    #    tag_name: "$VERSION"
    #    description: "$VERSION"
      allow_failure:
        exit_codes:
          - 204
      artifacts:
        when: always
        paths: