Skip to content

Backward Incompatibility IT #10

Backward Incompatibility IT

Backward Incompatibility IT #10

Workflow file for this run

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: "Xyz"
env:
MYSQL_DRIVER_CLASSNAME: com.mysql.jdbc.Driver # Used to set druid config in docker image for revised ITs
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
BACKWARD_COMPATIBILITY_IT_ENABLED: false
DRUID_PREVIOUS_VERSION: 30.0.0
DRUID_PREVIOUS_VERSION_DOWNLOAD_URL: https://dlcdn.apache.org/druid/30.0.0/apache-druid-30.0.0-bin.tar.gz
DRUID_PREVIOUS_IT_IMAGE_NAME: org.apache.druid.integration-tests/test:30.0.0
jobs:
test-build:
name: "build"
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
# skip the "cache: maven" step from setup-java. We explicitly use a
# different cache key since we cannot reuse it across commits.
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 8
# the build step produces SNAPSHOT artifacts into the local maven repository,
# we include github.sha in the cache key to make it specific to that build/jdk
- name: Cache Maven m2 repository
id: maven
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: maven-${{ runner.os }}-8-${{ github.sha }}
restore-keys: setup-java-Linux-maven-${{ hashFiles('**/pom.xml') }}
- name: Cache targets
id: target
uses: actions/cache@v4
with:
path: |
./**/target
key: maven-${{ runner.os }}-8-targets-${{ github.sha }}
- name: Cache image
id: docker_container
uses: actions/cache@v4
with:
key: druid-container-jdk8.tar.gz-${{ github.sha }}
path: |
./druid-container-jdk8.tar.gz
./integration-tests-ex/image/target/env.sh
- name: Maven build
id: maven_build
run: |
./it.sh ci
- name: Container build
run: |
./it.sh image
source ./integration-tests-ex/image/target/env.sh
docker tag $DRUID_IT_IMAGE_NAME $DRUID_IT_IMAGE_NAME-jdk8
- name: Save docker container to archive
run: |
source ./integration-tests-ex/image/target/env.sh
echo $DRUID_IT_IMAGE_NAME
docker save "$DRUID_IT_IMAGE_NAME" | gzip > druid-container-jdk8.tar.gz
- name: Save old version docker image
if: (${{ env.BACKWARD_COMPATIBILITY_IT_ENABLED == 'true' }}
run: |
docker tag $DRUID_PREVIOUS_IT_IMAGE_NAME $DRUID_PREVIOUS_IT_IMAGE_NAME-jdk8-version${{ inputs.DRUID_PREVIOUS_VERSION }}
echo $DRUID_PREVIOUS_IT_IMAGE_NAME
docker save "$DRUID_PREVIOUS_IT_IMAGE_NAME" | gzip > druid-container-jdk8-version${{ inputs.DRUID_PREVIOUS_VERSION }}.tar.gz
test-revised-its:
needs: test-build
if: ${{ always() }}
uses: ./.github/workflows/revised-its.yml
with:
BACKWARD_COMPATIBILITY_IT_ENABLED: ${{ env.BACKWARD_COMPATIBILITY_IT_ENABLED }}
DRUID_PREVIOUS_VERSION: ${{ env.DRUID_PREVIOUS_VERSION }}
DRUID_PREVIOUS_VERSION_DOWNLOAD_URL: ${{ env.DRUID_PREVIOUS_VERSION_DOWNLOAD_URL }}
DRUID_PREVIOUS_IT_IMAGE_NAME: ${{ env.DRUID_PREVIOUS_IT_IMAGE_NAME }}