chore(circleci): remove python from common.sh and remove python dependency (#2102)

This commit is contained in:
Iain Sproat 2024-03-01 16:42:30 +00:00 коммит произвёл GitHub
Родитель 956f917418
Коммит 5d7df71d28
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 9 добавлений и 8 удалений

Просмотреть файл

@ -8,7 +8,7 @@ DOCKER_FILE_NAME="$(echo ${DOCKER_IMAGE_TAG}_${IMAGE_VERSION_TAG} | sed -e 's/[^
# shellcheck disable=SC2068,SC2046
LAST_RELEASE="$(git describe --always --tags $(git rev-list --tags) | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)" # get the last release tag. FIXME: Fails if a commit is tagged with more than one tag: https://stackoverflow.com/questions/8089002/git-describe-with-two-tags-on-the-same-commit/56039163#56039163
# shellcheck disable=SC2034
NEXT_RELEASE="$(echo "${LAST_RELEASE}" | python -c "parts = input().split('.'); parts[-1] = str(int(parts[-1])+1); print('.'.join(parts))")"
NEXT_RELEASE="$(echo "${LAST_RELEASE}" | awk -F. -v OFS=. '{$NF += 1 ; print}')"
# shellcheck disable=SC2034
BRANCH_NAME_TRUNCATED="$(echo "${CIRCLE_BRANCH}" | cut -c -50 | sed 's/[^a-zA-Z0-9_.-]/_/g')" # docker has a 128 character tag limit, so ensuring the branch name will be short enough
# shellcheck disable=SC2034

Просмотреть файл

@ -312,8 +312,8 @@ workflows:
jobs:
get-version:
docker: &docker-python-image
- image: cimg/python:3.12.1
docker: &docker-base-image
- image: cimg/base:2024.02
working_directory: &work-dir /tmp/ci
steps:
- checkout
@ -771,7 +771,7 @@ jobs:
./.circleci/deployment/helm-chart-shell.nix
docker-build: &build-job
docker: *docker-python-image
docker: *docker-base-image
resource_class: medium
working_directory: *work-dir
steps:
@ -839,7 +839,7 @@ jobs:
SPECKLE_SERVER_PACKAGE: docker-compose-ingress
docker-publish: &publish-job
docker: *docker-python-image
docker: *docker-base-image
resource_class: medium
working_directory: *work-dir
steps:
@ -948,7 +948,8 @@ jobs:
command: 'yarn workspaces foreach -pv --no-private npm publish --access public'
publish-helm-chart:
docker: *docker-python-image
docker:
- image: cimg/python:3.12.1
working_directory: *work-dir
steps:
- checkout

Просмотреть файл

@ -11,9 +11,9 @@ if [[ "${CIRCLE_TAG}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
fi
if [[ "${CIRCLE_BRANCH}" == "main" ]]; then
echo "$NEXT_RELEASE-alpha.${CIRCLE_BUILD_NUM}"
echo "${NEXT_RELEASE}-alpha.${CIRCLE_BUILD_NUM}"
exit 0
fi
echo "$NEXT_RELEASE-branch.${BRANCH_NAME_TRUNCATED}.${CIRCLE_BUILD_NUM}-${COMMIT_SHA1_TRUNCATED}"
echo "${NEXT_RELEASE}-branch.${BRANCH_NAME_TRUNCATED}.${CIRCLE_BUILD_NUM}-${COMMIT_SHA1_TRUNCATED}"
exit 0