chore(circleci): remove python from common.sh and remove python dependency (#2102)
This commit is contained in:
Родитель
956f917418
Коммит
5d7df71d28
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче