From 6c43eae13bca0430e4bd97016fc5da73cfd0ad63 Mon Sep 17 00:00:00 2001 From: alrocar Date: Thu, 3 Oct 2024 16:24:36 +0200 Subject: [PATCH] remove releases jobs --- .github/workflows/release.yml | 133 ---------------------------------- .gitlab/ci_cd.yaml | 89 ----------------------- 2 files changed, 222 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index b3137ff..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,133 +0,0 @@ -name: Tinybird Release - -on: - workflow_call: - inputs: - job_to_run: - description: 'Select the job to run manually' - required: true - type: string - default: 'promote' - data_project_dir: - description: "relative path of the folder containing the data project" - required: false - type: string - default: . - secrets: - tb_admin_token: - required: true - tb_host: - required: true - -jobs: - promote: - if: inputs.job_to_run == 'promote' - runs-on: ubuntu-latest - defaults: - run: - working-directory: ${{ inputs.data_project_dir }} - steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v5 - with: - python-version: "3.11" - architecture: "x64" - cache: 'pip' - - - name: Validate input - run: | - [[ "${{ secrets.tb_admin_token }}" ]] || { echo "Go to the tokens section in your Workspace, copy the 'admin token' and set TB_ADMIN_TOKEN as a Secret in your Git repository"; exit 1; } - - name: Install Tinybird CLI - run: | - if [ -f "requirements.txt" ]; then - pip install -r requirements.txt - else - pip install tinybird-cli - fi - - name: Tinybird version - run: tb --version - - - name: Promote Release - run: | - source .tinyenv - tb \ - --host ${{ secrets.tb_host }} \ - --token ${{ secrets.tb_admin_token }} \ - release promote \ - --semver $VERSION - - dry_run_rm_oldest_rollback: - name: DRY-RUN Remove latest rollback Release - runs-on: ubuntu-latest - if: inputs.job_to_run == 'dry_run_rm_oldest_rollback' - - defaults: - run: - working-directory: ${{ inputs.data_project_dir }} - steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v5 - with: - python-version: "3.11" - architecture: "x64" - cache: 'pip' - - - name: Validate input - run: | - [[ "${{ secrets.tb_admin_token }}" ]] || { echo "Go to the tokens section in your Workspace, copy the 'admin token' and set TB_ADMIN_TOKEN as a Secret in your Git repository"; exit 1; } - - name: Install Tinybird CLI - run: | - if [ -f "requirements.txt" ]; then - pip install -r requirements.txt - else - pip install tinybird-cli - fi - - name: Tinybird version - run: tb --version - - - name: Remove Release - run: | - source .tinyenv - tb \ - --host ${{ secrets.tb_host }} \ - --token ${{ secrets.tb_admin_token }} \ - release rm \ - --oldest-rollback --force --dry-run - - rm_oldest_rollback: - name: Remove latest rollback Release - runs-on: ubuntu-latest - if: inputs.job_to_run == 'rm_oldest_rollback' - - defaults: - run: - working-directory: ${{ inputs.data_project_dir }} - steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v5 - with: - python-version: "3.11" - architecture: "x64" - cache: 'pip' - - - name: Validate input - run: | - [[ "${{ secrets.tb_admin_token }}" ]] || { echo "Go to the tokens section in your Workspace, copy the 'admin token' and set TB_ADMIN_TOKEN as a Secret in your Git repository"; exit 1; } - - name: Install Tinybird CLI - run: | - if [ -f "requirements.txt" ]; then - pip install -r requirements.txt - else - pip install tinybird-cli - fi - - name: Tinybird version - run: tb --version - - - name: Remove Release - run: | - source .tinyenv - tb \ - --host ${{ secrets.tb_host }} \ - --token ${{ secrets.tb_admin_token }} \ - release rm \ - --oldest-rollback --force --yes \ No newline at end of file diff --git a/.gitlab/ci_cd.yaml b/.gitlab/ci_cd.yaml index 33a314a..64106fe 100644 --- a/.gitlab/ci_cd.yaml +++ b/.gitlab/ci_cd.yaml @@ -3,7 +3,6 @@ stages: - ci - cd - cleanup - - release variables: PYTHON_VERSION: "3.11" @@ -298,91 +297,3 @@ variables: --token $TB_ADMIN_TOKEN \ branch rm ${BRANCH_NAME} \ --yes - -.release_promote: - stage: release - image: ${IMAGE_BASE} - script: - - cd $CI_PROJECT_DIR/$DATA_PROJECT_DIR - - # Create Python Virtual Environment - - python -m venv .venv - - source .venv/bin/activate - - # Install Tinybird CLI - - | - if [ -f "requirements.txt" ]; then - pip install -r requirements.txt - else - pip install tinybird-cli - fi - - # Tinybird version - - tb --version - - # Promote Release - - | - source .tinyenv - tb \ - --host $TB_HOST \ - --token $TB_ADMIN_TOKEN \ - release promote \ - --semver $VERSION - -.dry_run_release_rm_oldest_rollback: - stage: release - image: ${IMAGE_BASE} - script: - - cd $CI_PROJECT_DIR/$DATA_PROJECT_DIR - - # Create Python Virtual Environment - - python -m venv .venv - - source .venv/bin/activate - - # Install Tinybird CLI - - | - if [ -f "requirements.txt" ]; then - pip install -r requirements.txt - else - pip install tinybird-cli - fi - - # Tinybird version - - tb --version - - # Promote Release - - | - source .tinyenv - tb \ - --host $TB_HOST \ - --token $TB_ADMIN_TOKEN \ - release rm --oldest-rollback --force --dry-run - -.release_rm_oldest_rollback: - stage: release - image: ${IMAGE_BASE} - script: - - cd $CI_PROJECT_DIR/$DATA_PROJECT_DIR - - # Create Python Virtual Environment - - python -m venv .venv - - source .venv/bin/activate - - # Install Tinybird CLI - - | - if [ -f "requirements.txt" ]; then - pip install -r requirements.txt - else - pip install tinybird-cli - fi - - # Tinybird version - - tb --version - - # Promote Release - - | - source .tinyenv - tb \ - --host $TB_HOST \ - --token $TB_ADMIN_TOKEN \ - release rm --oldest-rollback --force --yes