From 27a66db9f24b9a366a9662716237081d7dad7118 Mon Sep 17 00:00:00 2001 From: Sebastian Zumbrunn Date: Fri, 14 Nov 2025 17:33:48 +0100 Subject: [PATCH] remove cirrus files --- .cirrus.star | 4 -- .cirrus.yml | 84 -------------------------------------- .cirrus/analysis.sh | 53 ------------------------ .cirrus/poetry.Dockerfile | 15 ------- .cirrus/run_its.sh | 20 --------- .cirrus/run_macos_tests.sh | 15 ------- 6 files changed, 191 deletions(-) delete mode 100644 .cirrus.star delete mode 100644 .cirrus.yml delete mode 100644 .cirrus/analysis.sh delete mode 100644 .cirrus/poetry.Dockerfile delete mode 100755 .cirrus/run_its.sh delete mode 100755 .cirrus/run_macos_tests.sh diff --git a/.cirrus.star b/.cirrus.star deleted file mode 100644 index bc1f3998..00000000 --- a/.cirrus.star +++ /dev/null @@ -1,4 +0,0 @@ -load("github.com/SonarSource/cirrus-modules@v3", "load_features") - -def main(ctx): - return load_features(ctx) diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index 0664c3b7..00000000 --- a/.cirrus.yml +++ /dev/null @@ -1,84 +0,0 @@ -env: - ARTIFACTORY_URL: VAULT[development/kv/data/repox data.url] - ARTIFACTORY_PRIVATE_USERNAME: vault-${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-private-reader - ARTIFACTORY_PRIVATE_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-private-reader access_token] - ARTIFACTORY_DEPLOY_USERNAME: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-qa-deployer username] - ARTIFACTORY_DEPLOY_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-qa-deployer access_token] - ARTIFACTORY_DEPLOY_REPO: sonarsource-pypi-public-qa - GITHUB_TOKEN: VAULT[development/github/token/licenses-ro token] - DEPLOY_PULL_REQUEST: "true" - POETRY_VIRTUALENVS_PATH: "~/.cache/poetry/venvs" - POETRY_CACHE_DIR: "~/.cache/poetry/pypoetry" - SONARQUBE_VERSION: 25.3.0.104237 - # Use bash (instead of sh on linux or cmd.exe on windows) - CIRRUS_SHELL: bash - JF_ALIAS: "jfrog" - CRON_NIGHTLY_JOB_NAME: "nightly" - -only_if: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_TAG == "" && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == 'master' || $CIRRUS_BRANCH =~ "branch-.*") - -.jfrog_config_template: &JFROG_CONFIG_TEMPLATE - jfrog_config_script: - - $JF_ALIAS config add repox --artifactory-url "$ARTIFACTORY_URL" --access-token "$ARTIFACTORY_PRIVATE_ACCESS_TOKEN" - - $JF_ALIAS poetry-config --server-id-resolve repox --repo-resolve sonarsource-pypi - - $JF_ALIAS poetry install --build-name="$CIRRUS_REPO_NAME" --build-number="$CI_BUILD_NUMBER" - -poetry_cache_template: &POETRY_CACHE - poetry_cache: - folder: ~/.cache/poetry/ - fingerprint_script: cat poetry.lock - -.poetry_macos_template: &POETRY_MACOS_TEMPLATE - <<: *POETRY_CACHE - jfrog_install_script: - - brew install jfrog-cli - - jf intro - poetry_install_script: - - brew install poetry - - poetry config keyring.enabled false # Keyring is locked in macOS VM and not needed for downloading dependencies - <<: *JFROG_CONFIG_TEMPLATE - -macos_worker_template: &MACOS_WORKER_DEFINITION - persistent_worker: - isolation: - tart: - image: ghcr.io/cirruslabs/macos-sonoma-xcode:15.3 - cpu: 3 - memory: 6G - resources: - tart-vms: 1 - labels: - envname: prod - -qa_macos_task: - alias: qa_macos - only_if: $CIRRUS_CRON == "macos-its-cron" - name: "[macOS] Run tests" - <<: [*MACOS_WORKER_DEFINITION, *POETRY_MACOS_TEMPLATE] - env: - PATH: "/Users/admin/.local/bin:$PATH" - install_uv_script: - - brew install uv - test_39_script: - - .cirrus/run_macos_tests.sh "3.9.18" - test_310_script: - - .cirrus/run_macos_tests.sh "3.10.13" - test_311_script: - - .cirrus/run_macos_tests.sh "3.11.7" - test_312_script: - - .cirrus/run_macos_tests.sh "3.12.1" - test_313_script: - - .cirrus/run_macos_tests.sh "3.13.2" - -its_macos_task: - name: "[macOS] Integration Tests" - alias: its_macos - only_if: $CIRRUS_CRON == "macos-its-cron" - # the macOS workers are only available from Monday 06:45 CEST to Friday 20:00 CEST (see https://xtranet-sonarsource.atlassian.net/wiki/spaces/Platform/pages/3447980037/MacOS+Persistent+Workers+User+Guide+-+Cirrus+CI) - <<: [*MACOS_WORKER_DEFINITION, *POETRY_MACOS_TEMPLATE] - sonarqube_cache: - folder: sonarqube_cache/ - populate_script: mkdir -p sonarqube_cache && wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-$SONARQUBE_VERSION.zip -O sonarqube_cache/sonarqube.zip - fingerprint_script: echo "sonarqube-$SONARQUBE_VERSION" - its_script: - - .cirrus/run_its.sh diff --git a/.cirrus/analysis.sh b/.cirrus/analysis.sh deleted file mode 100644 index d964ed59..00000000 --- a/.cirrus/analysis.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -function run_analysis { - # deal with strange SonarQube configuration for the US region - SONAR_REGION="" - if [ "$SONAR_HOST_URL" == "https://sonarqube.us" ]; then - SONAR_REGION="-Dsonar.region=us" - fi - - # extra analysis parameters are set in the 'sonar-project.properties' - pysonar \ - -Dsonar.host.url="$SONAR_HOST_URL" \ - ${SONAR_REGION} \ - -Dsonar.token="$SONAR_TOKEN" \ - -Dsonar.analysis.buildNumber=$CI_BUILD_NUMBER \ - -Dsonar.analysis.pipeline="$PIPELINE_ID" \ - -Dsonar.analysis.sha1="$GIT_SHA1" \ - -Dsonar.analysis.repository="$GITHUB_REPO" \ - "$@" -} - -# generic environment variables -export GIT_SHA1=$CIRRUS_CHANGE_IN_REPO -export GITHUB_BRANCH=$CIRRUS_BRANCH -export GITHUB_REPO=${CIRRUS_REPO_FULL_NAME} -export PULL_REQUEST=${CIRRUS_PR:-false} -export PIPELINE_ID=${CIRRUS_BUILD_ID} - -if $(git rev-parse --is-shallow-repository); then - # repository is shallow - # If there are not enough commits in the Git repository, this command will fail with "fatal: --unshallow on a complete repository does not make sense" - # For this reason errors are ignored with "|| true" - git fetch --unshallow || true -else - # repo is not shallow, retrieving all - git fetch --all -fi - -if [ "${GITHUB_BRANCH}" == "master" ] && [ "$PULL_REQUEST" == "false" ]; then - echo '======= Analyze master' - run_analysis "$@" - -elif [[ "${GITHUB_BRANCH}" == "branch-"* ]] && [ "$PULL_REQUEST" == "false" ]; then - echo '======= Analyze maintenance branches as long-living branches' - run_analysis -Dsonar.branch.name="$GITHUB_BRANCH" "$@" - -elif [ "$PULL_REQUEST" != "false" ]; then - echo '======= Analyze pull request' - run_analysis -Dsonar.analysis.prNumber="$PULL_REQUEST" "$@" - -else - echo '======= No analysis' -fi diff --git a/.cirrus/poetry.Dockerfile b/.cirrus/poetry.Dockerfile deleted file mode 100644 index 950324ab..00000000 --- a/.cirrus/poetry.Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -ARG CIRRUS_AWS_ACCOUNT=275878209202 -FROM ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-latest -USER root -ARG PYTHON_VERSION=3.12.1 -ENV POETRY_VERSION 2.0.1 - -RUN apt-get update && \ - apt-get install -y pipx \ - && rm -rf /var/lib/apt/lists/* -USER sonarsource -RUN pipx install uv -ENV PATH=${PATH}:/home/sonarsource/.local/bin -WORKDIR /home/sonarsource -RUN uv python install ${PYTHON_VERSION} --default --preview && \ - uv tool install poetry==${POETRY_VERSION} \ No newline at end of file diff --git a/.cirrus/run_its.sh b/.cirrus/run_its.sh deleted file mode 100755 index 08fbbcbd..00000000 --- a/.cirrus/run_its.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -unzip -q sonarqube_cache/sonarqube.zip -d sonarqube - -PLATFORM="linux-x86-64" -if [[ "$(uname)" == "Darwin" ]]; then - PLATFORM="macosx-universal-64" -fi - -cd $(ls -d sonarqube/*/) -./bin/${PLATFORM}/sonar.sh start -cd - - -jfrog poetry install - -unset SONAR_TOKEN -unset SONAR_HOST_URL - -poetry run pytest --its tests/its diff --git a/.cirrus/run_macos_tests.sh b/.cirrus/run_macos_tests.sh deleted file mode 100755 index 545a2b52..00000000 --- a/.cirrus/run_macos_tests.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -set -euo pipefail - -if [ $# -eq 0 ]; then - echo "No arguments supplied" -fi - -PYTHON_VERSION="$1" -echo "========================================================================" -echo "Running tests on macOS with Python version: $PYTHON_VERSION" -echo "========================================================================" -uv python install ${PYTHON_VERSION} --default --preview -poetry run python --version -poetry install -poetry run pytest tests/