diff --git a/Dockerfile b/Dockerfile index 87acc3b90..7b5676b00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM 020413372491.dkr.ecr.us-east-1.amazonaws.com/tools/gdc-java-8-jdk-centos9:202311071405.4d8c665 +FROM 020413372491.dkr.ecr.us-east-1.amazonaws.com/tools/gdc-java-11-jre-centos9:202403271423.8c7c22c ARG RVM_VERSION=stable ARG JRUBY_VERSION=9.4.1.0 @@ -6,10 +6,10 @@ ARG JRUBY_VERSION=9.4.1.0 LABEL image_name="GDC LCM Bricks" LABEL maintainer="LCM " LABEL git_repository_url="https://github.com/gooddata/gooddata-ruby/" -LABEL parent_image="020413372491.dkr.ecr.us-east-1.amazonaws.com/tools/gdc-java-8-jdk-centos9:202311071405.4d8c665" +LABEL parent_image="020413372491.dkr.ecr.us-east-1.amazonaws.com/tools/gdc-java-11-jre-centos9:202312060945.d0814f3" # which is required by RVM -RUN yum install -y which patch make git maven procps \ +RUN yum install -y which patch make unzip gnupg git maven procps gzip \ && yum clean all \ && rm -rf /var/cache/yum @@ -33,9 +33,6 @@ RUN rvm install jruby-${JRUBY_VERSION} && gem update --system \ && gem install bundler -v 2.4.6 \ && gem install rake -v 13.0.6 -# Make sure java default running with java8 -RUN update-alternatives --set java java-1.8.0-openjdk.x86_64 - WORKDIR /src RUN groupadd -g 48 apache \ @@ -78,10 +75,11 @@ RUN cp -rf ci/mssql/target/*.jar ./lib/gooddata/cloud_resources/mssql/drivers/ RUN mvn -f ci/mysql/pom.xml clean install -P binary-packaging RUN cp -rf ci/mysql/target/*.jar ./lib/gooddata/cloud_resources/mysql/drivers/ -RUN bundle install +#build datawarehouse dependencies +RUN mvn -f ci/datawarehouse/pom.xml clean install -P binary-packaging +RUN cp -rf ci/datawarehouse/target/*.jar ./lib/gooddata/cloud_resources/datawarehouse/drivers/ -# Check to make sure Java version is always Java8 -RUN java_version=$(java -version 2>&1) && echo "$java_version" | grep 'version.*1.8' || (echo "Java version is not 1.8" && exit 1) +RUN bundle install ARG GIT_COMMIT=unspecified ARG BRICKS_VERSION=unspecified diff --git a/VERSION b/VERSION index ad70aa422..1d8ffbdf5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.7.68 +3.7.69 diff --git a/ci/datawarehouse/pom.xml b/ci/datawarehouse/pom.xml new file mode 100644 index 000000000..ded2c8e98 --- /dev/null +++ b/ci/datawarehouse/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + + com.gooddata.lcm + lcm-datawarehouse-driver + 1.0-SNAPSHOT + + + + com.gooddata.datawarehouse.jdbc + datawarehouse-jdbc-driver + 3.6.0 + + + + + + binary-packaging + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + runtime + + + + + + + + + \ No newline at end of file diff --git a/lib/gooddata/cloud_resources/datawarehouse/datawarehouse_client.rb b/lib/gooddata/cloud_resources/datawarehouse/datawarehouse_client.rb new file mode 100644 index 000000000..04cab32f2 --- /dev/null +++ b/lib/gooddata/cloud_resources/datawarehouse/datawarehouse_client.rb @@ -0,0 +1,11 @@ +# encoding: UTF-8 +# frozen_string_literal: true +# +# Copyright (c) 2021 GoodData Corporation. All rights reserved. +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +base = Pathname(__FILE__).dirname.expand_path +Dir.glob(base + 'drivers/*.jar').each do |file| + require file unless file.start_with?('lcm-datawarehouse-driver') +end diff --git a/lib/gooddata/cloud_resources/datawarehouse/drivers/.gitkeepme b/lib/gooddata/cloud_resources/datawarehouse/drivers/.gitkeepme new file mode 100644 index 000000000..e69de29bb diff --git a/lib/gooddata/lcm/lcm2.rb b/lib/gooddata/lcm/lcm2.rb index e0faeab85..fd932a739 100644 --- a/lib/gooddata/lcm/lcm2.rb +++ b/lib/gooddata/lcm/lcm2.rb @@ -18,6 +18,7 @@ require_relative 'helpers/helpers' require_relative 'exceptions/lcm_execution_error' require_relative 'exceptions/lcm_execution_warning' +require_relative '../../cloud_resources/datawarehouse/datawarehouse_client' if RUBY_PLATFORM == 'java' using TrueExtensions using FalseExtensions diff --git a/spec/lcm/integration/spec/others/data_helper_spec.rb b/spec/lcm/integration/spec/others/data_helper_spec.rb index 056fedb5a..30bb337ad 100644 --- a/spec/lcm/integration/spec/others/data_helper_spec.rb +++ b/spec/lcm/integration/spec/others/data_helper_spec.rb @@ -296,7 +296,8 @@ expect(data).to eq File.open(file_path).read end - it 'connect to mysql mongobi with BASIC authentication' do + # Disable test for MongoBI + xit 'connect to mysql mongobi with BASIC authentication' do data_helper = GoodData::Helpers::DataSource.new(mysql_mongobi_basic_params['input_source']) file_path = data_helper.realize(mysql_mongobi_basic_params) data = File.open('spec/data/mysql_mongobi_data.csv').read