Skip to content
Snippets Groups Projects
Commit 371e7579 authored by vladislav's avatar vladislav
Browse files

fix release

parent 5c681bc9
No related branches found
No related tags found
Loading
Pipeline #99427 passed with warnings
......@@ -53,6 +53,6 @@ At GCP project we could find cloudFunction which is called `postman-function-pyt
## Release process
* Create release branch from master, if not exist. Example: `release/0.14`
* Run pipeline on master brunch with manually set variable TAG. Example: `TAG=v0.14.0`
* Run pipeline on *release* brunch with manually set variable TAG. Example: `TAG=v0.14.0`
* After pipeline success, new MR should be generated in release branch. Example MR name: `Auto-release for 0.14.0`
* If MR merged, go to release brunch and drop a proper [tag](https://community.opengroup.org/osdu/platform/deployment-and-operations/infra-gcp-provisioning/-/tags) on it.
import requests
import os
import argparse
class TagDumper:
......@@ -59,8 +58,14 @@ class TagDumper:
@staticmethod
def _get_tag_by_service( service, base_url: str, tag: str) -> str:
"""
Collect tag for each service in SERVICE_REPOSITORIES, filtered by provided TAG argument.
Fetch tag for service
"""
# for infrastructure repository final tag is not exists on this step,
# so we assume it will be equals to *tag* variable
if base_url == 'https://community.opengroup.org/api/v4/projects/163':
return tag
r = requests.get(base_url + '/repository/tags?search=' + tag)
data = r.json()
......
......@@ -42,11 +42,10 @@ make-release-merge-request:
script:
- *define_TAG
- SHORT_TAG=${TAG%.*}
- TIMESTAMP=$(date '+%Y-%m-%d-T%H-%M-%S')
- git checkout -b auto_release_${TIMESTAMP}
- git checkout -b release/$SHORT_TAG
- git add -A
- git commit -m "auto-release-${TIMESTAMP}"
- git push -o ci.skip -o merge_request.create -o merge_request.target=release/$SHORT_TAG -o merge_request.title="Auto-release for $TAG" -o merge_request.label="GCP" -o merge_request.assign="@Oleksandr_Kosse" https://vladislav_shishko:${RELEASE_USER_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git HEAD:auto-release-${TIMESTAMP}
- git commit -m "auto-release for $TAG"
- git push -o ci.skip -o merge_request.create -o merge_request.target=release/$SHORT_TAG -o merge_request.title="Auto-release for $TAG" -o merge_request.label="GCP" -o merge_request.assign="@Oleksandr_Kosse" https://vladislav_shishko:${RELEASE_USER_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git HEAD:release/$SHORT_TAG
# - git push -o ci-skip -o merge_request.create -o merge_request.target=release/$TAG -o merge_request.remove_source_branch https://vladislav_shishko:${RELEASE_USER_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git HEAD:auto_release_${TIMESTAMP}
rules:
- if: "$TAG"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment