diff --git a/base/Dockerfile b/base/Dockerfile index d8b9e6b..cb81264 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -7,6 +7,9 @@ ENV KATALON_MAKE_EXECUTABLE_SCRIPT=$KATALON_BASE_ROOT_DIR/make_executable.sh ENV KATALON_CLEAN_UP_SCRIPT=$KATALON_BASE_ROOT_DIR/cleanup.sh ENV KATALON_VERSION_FILE=/katalon/version +ENV GRADLE_HOME=/opt/gradle +ENV GRADLE_BIN=$GRADLE_HOME/bin + ENV DISPLAY=:99 ENV DISPLAY_CONFIGURATION=1024x768x24 @@ -22,4 +25,6 @@ RUN ./index.sh RUN $KATALON_CLEAN_UP_SCRIPT +ENV PATH "$PATH:$GRADLE_BIN" + WORKDIR / \ No newline at end of file diff --git a/base/src/index.sh b/base/src/index.sh index 2e4c3ff..f3f5d2b 100644 --- a/base/src/index.sh +++ b/base/src/index.sh @@ -9,3 +9,4 @@ setup/xvfb.sh setup/jre.sh setup/circleci-tools.sh setup/fonts.sh +setup/gradle.sh diff --git a/base/src/setup/gradle.sh b/base/src/setup/gradle.sh new file mode 100644 index 0000000..1c4545a --- /dev/null +++ b/base/src/setup/gradle.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -xe + +echo "Install Gradle" +version=5.4.1 +package=gradle-$version-bin.zip +unzipped_package=gradle-$version + +wget https://downloads.gradle.org/distributions/gradle-$version-bin.zip +ls +unzip $package +ls +rm $package + +mv $unzipped_package $GRADLE_HOME +ls $GRADLE_HOME + +mkdir -p ~/.gradle && echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties \ No newline at end of file diff --git a/katalon/src/scripts/katalon-execute.sh b/katalon/src/scripts/katalon-execute.sh index ec183b4..2098c30 100644 --- a/katalon/src/scripts/katalon-execute.sh +++ b/katalon/src/scripts/katalon-execute.sh @@ -26,6 +26,13 @@ mkdir -p $project_dir cp -r $source_dir/* $project_dir +# download dependencies +cd $project_dir +if [ -f "$project_dir/build.gradle" ]; then + gradle --console=plain katalonCopyDependencies +fi +cd $current_dir + # create .classpath if not exist touch $project_dir/.classpath || exit chmod -R 777 $project_dir diff --git a/katalon/src/setup/katalon.sh b/katalon/src/setup/katalon.sh index 596ad49..c637d0e 100644 --- a/katalon/src/setup/katalon.sh +++ b/katalon/src/setup/katalon.sh @@ -4,12 +4,13 @@ set -xe echo "Install Katalon" -version=6.1.2 +version=6.1.3 directory=$version package=Katalon_Studio_Linux_64-$version.tar.gz unzipped_directory=Katalon_Studio_Linux_64-$version wget -O $package https://github.com/katalon-studio/katalon-studio/releases/download/v$version/Katalon_Studio_Linux_64-$version.tar.gz +ls tar -xvzf $package -C $KATALON_KATALON_INSTALL_DIR_PARENT ls rm $package diff --git a/test/project/.gitignore b/test/project/.gitignore index 5cc6312..1891881 100644 --- a/test/project/.gitignore +++ b/test/project/.gitignore @@ -2,5 +2,8 @@ /Libs/ /.settings/ /.classpath -.svn/ -/Reports \ No newline at end of file +/.svn/ +/Reports +/Drivers +/.project +/.gradle \ No newline at end of file diff --git a/test/project/.project b/test/project/.project deleted file mode 100644 index 994f62d..0000000 --- a/test/project/.project +++ /dev/null @@ -1,344 +0,0 @@ - - - E%%WebUI%Sample Web Testing Project.prj - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.groovy.core.groovyNature - org.eclipse.jdt.core.javanature - - - - 0 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 0 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 0 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 0 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 0 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 0 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 0 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 0 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 0 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 0 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 0 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 0 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 1487842772260 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 1487842772297 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 1515058956123 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 1515058956154 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 1515258365900 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 1515258365921 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 1515260825797 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 1515260825820 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 1515377932600 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 1515377932625 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 1517453795248 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 1517453795268 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 1517453958559 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 1517453958592 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 1517454680474 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 1517454680504 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 1525880576771 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 1525880576797 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 1541733419008 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 1541733419024 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 1541733574100 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 1541733574137 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - 1545295207419 - - 10 - - org.eclipse.core.resources.regexFilterMatcher - .*\.svn$ - - - - 1545295207438 - - 6 - - org.eclipse.core.resources.regexFilterMatcher - (.*\.svn-base$)|(.*\.png$)|(.*\.log$)|(.*\.xlsx$)|(.*\.xls$)|(.*\.csv$)|(.*\.txt$) - - - - diff --git a/test/project/build.gradle b/test/project/build.gradle new file mode 100644 index 0000000..594b145 --- /dev/null +++ b/test/project/build.gradle @@ -0,0 +1,12 @@ +plugins { + id 'java' + id "com.katalon.gradle-plugin" version "0.0.7" +} + +repositories { + mavenCentral() +} + +dependencies { + compile 'net.lingala.zip4j:zip4j:1.3.2' +} \ No newline at end of file