diff --git a/Gemfile b/Gemfile deleted file mode 100644 index cdd3a6b34..000000000 --- a/Gemfile +++ /dev/null @@ -1,6 +0,0 @@ -source "https://rubygems.org" - -gem "fastlane" - -plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') -eval_gemfile(plugins_path) if File.exist?(plugins_path) diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 8e2a8dfa4..000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,208 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (3.0.3) - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) - artifactory (3.0.15) - atomos (0.1.3) - aws-eventstream (1.1.1) - aws-partitions (1.434.0) - aws-sdk-core (3.113.0) - aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.239.0) - aws-sigv4 (~> 1.1) - jmespath (~> 1.0) - aws-sdk-kms (1.43.0) - aws-sdk-core (~> 3, >= 3.112.0) - aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.92.0) - aws-sdk-core (~> 3, >= 3.112.0) - aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.3) - aws-eventstream (~> 1, >= 1.0.2) - babosa (1.0.4) - claide (1.0.3) - colored (1.2) - colored2 (3.1.2) - commander-fastlane (4.4.6) - highline (~> 1.7.2) - declarative (0.0.20) - declarative-option (0.1.0) - digest-crc (0.6.3) - rake (>= 12.0.0, < 14.0.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - dotenv (2.7.6) - emoji_regex (3.2.2) - excon (0.79.0) - faraday (1.3.0) - faraday-net_http (~> 1.0) - multipart-post (>= 1.2, < 3) - ruby2_keywords - faraday-cookie_jar (0.0.7) - faraday (>= 0.8.0) - http-cookie (~> 1.0.0) - faraday-net_http (1.0.1) - faraday_middleware (1.0.0) - faraday (~> 1.0) - fastimage (2.2.3) - fastlane (2.178.0) - CFPropertyList (>= 2.3, < 4.0.0) - addressable (>= 2.3, < 3.0.0) - artifactory (~> 3.0) - aws-sdk-s3 (~> 1.0) - babosa (>= 1.0.3, < 2.0.0) - bundler (>= 1.12.0, < 3.0.0) - colored - commander-fastlane (>= 4.4.6, < 5.0.0) - dotenv (>= 2.1.1, < 3.0.0) - emoji_regex (>= 0.1, < 4.0) - excon (>= 0.71.0, < 1.0.0) - faraday (~> 1.0) - faraday-cookie_jar (~> 0.0.6) - faraday_middleware (~> 1.0) - fastimage (>= 2.1.0, < 3.0.0) - gh_inspector (>= 1.1.2, < 2.0.0) - google-api-client (>= 0.37.0, < 0.39.0) - google-cloud-storage (>= 1.15.0, < 2.0.0) - highline (>= 1.7.2, < 2.0.0) - json (< 3.0.0) - jwt (>= 2.1.0, < 3) - mini_magick (>= 4.9.4, < 5.0.0) - multipart-post (~> 2.0.0) - naturally (~> 2.2) - plist (>= 3.1.0, < 4.0.0) - rubyzip (>= 2.0.0, < 3.0.0) - security (= 0.1.3) - simctl (~> 1.6.3) - slack-notifier (>= 2.0.0, < 3.0.0) - terminal-notifier (>= 2.0.0, < 3.0.0) - terminal-table (>= 1.4.5, < 2.0.0) - tty-screen (>= 0.6.3, < 1.0.0) - tty-spinner (>= 0.8.0, < 1.0.0) - word_wrap (~> 1.0.0) - xcodeproj (>= 1.13.0, < 2.0.0) - xcpretty (~> 0.3.0) - xcpretty-travis-formatter (>= 0.0.3) - fastlane-plugin-automated_test_emulator_run (1.6.0) - fastlane-plugin-firebase_app_distribution (0.2.5) - fastlane-plugin-versioning_android (0.1.0) - gh_inspector (1.1.3) - google-api-client (0.38.0) - addressable (~> 2.5, >= 2.5.1) - googleauth (~> 0.9) - httpclient (>= 2.8.1, < 3.0) - mini_mime (~> 1.0) - representable (~> 3.0) - retriable (>= 2.0, < 4.0) - signet (~> 0.12) - google-apis-core (0.3.0) - addressable (~> 2.5, >= 2.5.1) - googleauth (~> 0.14) - httpclient (>= 2.8.1, < 3.0) - mini_mime (~> 1.0) - representable (~> 3.0) - retriable (>= 2.0, < 4.0) - rexml - signet (~> 0.14) - webrick - google-apis-iamcredentials_v1 (0.2.0) - google-apis-core (~> 0.1) - google-apis-storage_v1 (0.3.0) - google-apis-core (~> 0.1) - google-cloud-core (1.6.0) - google-cloud-env (~> 1.0) - google-cloud-errors (~> 1.0) - google-cloud-env (1.5.0) - faraday (>= 0.17.3, < 2.0) - google-cloud-errors (1.1.0) - google-cloud-storage (1.31.0) - addressable (~> 2.5) - digest-crc (~> 0.4) - google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.1) - google-cloud-core (~> 1.2) - googleauth (~> 0.9) - mini_mime (~> 1.0) - googleauth (0.16.0) - faraday (>= 0.17.3, < 2.0) - jwt (>= 1.4, < 3.0) - memoist (~> 0.16) - multi_json (~> 1.11) - os (>= 0.9, < 2.0) - signet (~> 0.14) - highline (1.7.10) - http-cookie (1.0.3) - domain_name (~> 0.5) - httpclient (2.8.3) - jmespath (1.4.0) - json (2.5.1) - jwt (2.2.2) - memoist (0.16.2) - mini_magick (4.11.0) - mini_mime (1.0.2) - multi_json (1.15.0) - multipart-post (2.0.0) - nanaimo (0.3.0) - naturally (2.2.1) - os (1.1.1) - plist (3.6.0) - public_suffix (4.0.6) - rake (13.0.3) - representable (3.0.4) - declarative (< 0.1.0) - declarative-option (< 0.2.0) - uber (< 0.2.0) - retriable (3.1.2) - rexml (3.2.4) - rouge (2.0.7) - ruby2_keywords (0.0.4) - rubyzip (2.3.0) - security (0.1.3) - signet (0.15.0) - addressable (~> 2.3) - faraday (>= 0.17.3, < 2.0) - jwt (>= 1.5, < 3.0) - multi_json (~> 1.10) - simctl (1.6.8) - CFPropertyList - naturally - slack-notifier (2.3.2) - terminal-notifier (2.0.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - tty-cursor (0.7.1) - tty-screen (0.8.1) - tty-spinner (0.9.3) - tty-cursor (~> 0.7) - uber (0.1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.7) - unicode-display_width (1.7.0) - webrick (1.7.0) - word_wrap (1.0.0) - xcodeproj (1.19.0) - CFPropertyList (>= 2.3.3, < 4.0) - atomos (~> 0.1.3) - claide (>= 1.0.2, < 2.0) - colored2 (~> 3.1) - nanaimo (~> 0.3.0) - xcpretty (0.3.0) - rouge (~> 2.0.7) - xcpretty-travis-formatter (1.0.1) - xcpretty (~> 0.2, >= 0.0.7) - -PLATFORMS - universal-darwin-20 - -DEPENDENCIES - fastlane - fastlane-plugin-automated_test_emulator_run - fastlane-plugin-firebase_app_distribution - fastlane-plugin-versioning_android - -BUNDLED WITH - 2.2.13 diff --git a/PrebidMobile/gradle.properties b/PrebidMobile/gradle.properties deleted file mode 100644 index d015431a8..000000000 --- a/PrebidMobile/gradle.properties +++ /dev/null @@ -1,2 +0,0 @@ -android.useAndroidX=true -android.enableJetifier=true \ No newline at end of file diff --git a/PrebidMobile/gradle/wrapper/gradle-wrapper.jar b/PrebidMobile/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index f6b961fd5..000000000 Binary files a/PrebidMobile/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/PrebidMobile/gradle/wrapper/gradle-wrapper.properties b/PrebidMobile/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 7d18d7fce..000000000 --- a/PrebidMobile/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Wed Sep 09 18:03:15 IST 2020 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip diff --git a/PrebidMobile/gradlew b/PrebidMobile/gradlew deleted file mode 100755 index cccdd3d51..000000000 --- a/PrebidMobile/gradlew +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env sh - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/PrebidMobile/gradlew.bat b/PrebidMobile/gradlew.bat deleted file mode 100644 index e95643d6a..000000000 --- a/PrebidMobile/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/fastlane/AVD_setup.json b/fastlane/AVD_setup.json deleted file mode 100644 index a7c1bb43e..000000000 --- a/fastlane/AVD_setup.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "avd_list": [ - { - "avd_name": "Nexus_5X_API_28_SDK_TESTS", - - "create_avd_package": "system-images;android-28;google_apis_playstore;x86", - "create_avd_device": "Nexus 5X", - "create_avd_tag": "google_apis_playstore", - "create_avd_abi": "x86", - "create_avd_additional_options": "", - "create_avd_hardware_config_filepath": "", - - "launch_avd_port": "", - "launch_avd_snapshot_filepath": "", - "launch_avd_launch_binary_name": "emulator", - "launch_avd_additional_options": "-gpu on -no-snapshot" - } - ] -} diff --git a/fastlane/Appfile b/fastlane/Appfile deleted file mode 100644 index a2de80412..000000000 --- a/fastlane/Appfile +++ /dev/null @@ -1,2 +0,0 @@ -json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one -# package_name("org.prebid.mobile") # e.g. com.krausefx.app diff --git a/fastlane/Fastfile b/fastlane/Fastfile deleted file mode 100644 index aaf1a0ab2..000000000 --- a/fastlane/Fastfile +++ /dev/null @@ -1,215 +0,0 @@ -# This file contains the fastlane.tools configuration -# You can find the documentation at https://docs.fastlane.tools -# -# For a list of all available actions, check out -# -# https://docs.fastlane.tools/actions -# -# For a list of all available plugins, check out -# -# https://docs.fastlane.tools/plugins/available-plugins -# - -# Uncomment the line if you want fastlane to automatically update itself -# update_fastlane - -default_platform(:android) - -platform :android do - - before_all do - OUTPUT_DIR = './fastlane/Builds' - end - -# ------------------------------------------ -# Build -# ------------------------------------------ - - lane :build_apps do - gradle( - task: "clean assembleDebug", - gradle_path: "./gradlew" - ) - end - -# ------------------------------------------ -# Unit Tests -# ------------------------------------------ - - desc "Running Unit tests for PrebidMobile-rendering" - lane :unit_tests do - - sh("rm -f ../local.properties") - - gradle( - task: ":PrebidMobile-rendering:clean", - gradle_path: "./gradlew" - ) - - gradle( - task: ":PrebidMobile-rendering:testDebugUnitTest -x lint -x lintVitalRelease", - gradle_path: "./gradlew" - ) - - gradle( - task: ":PrebidMobile-gamEventHandlers:clean", - gradle_path: "./gradlew" - ) - - gradle( - task: ":PrebidMobile-gamEventHandlers:testDebugUnitTest -x lint -x lintVitalRelease", - gradle_path: "./gradlew" - ) - - gradle( - task: ":PrebidMobile-mopubAdapters:clean", - gradle_path: "./gradlew" - ) - - gradle( - task: ":PrebidMobile-mopubAdapters:testDebugUnitTest -x lint -x lintVitalRelease", - gradle_path: "./gradlew" - ) - - end - -# ------------------------------------------ -# UI Tests -# ------------------------------------------ - - desc "Running UI tests for Prebid SDK PPM examples" - lane :ui_tests_ppm do - - # Waking up the machine... - sh("caffeinate -u -t 1") - - automated_test_emulator_run( - AVD_setup_path: "fastlane/AVD_setup.json", - AVD_recreate_new: false, - AVD_clean_after: false, - gradle_task: "connectedMockDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.package=org.prebid.mobile.renderingtestapp.uiAutomator.tests.ppm" - ) - - end - - desc "Running UI tests for Prebid SDK GAM examples" - lane :ui_tests_gam do - - # Waking up the machine... - sh("caffeinate -u -t 1") - - automated_test_emulator_run( - AVD_setup_path: "fastlane/AVD_setup.json", - AVD_recreate_new: false, - AVD_clean_after: false, - gradle_task: "connectedMockDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.package=org.prebid.mobile.renderingtestapp.uiAutomator.tests.gam" - ) - - end - - desc "Running UI tests for Prebid SDK MoPub examples" - lane :ui_tests_mopub do - - # Waking up the machine... - sh("caffeinate -u -t 1") - - automated_test_emulator_run( - AVD_setup_path: "fastlane/AVD_setup.json", - AVD_recreate_new: false, - AVD_clean_after: false, - gradle_task: "connectedMockDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.package=org.prebid.mobile.renderingtestapp.uiAutomator.tests.mopub" - ) - - end - -# ------------------------------------------ -# Slack Notification -# ------------------------------------------ - - desc "Sends a notification to the Slack channel" - lane :send_slack_message do |options| - step = options[:step] - url = options[:build_url] - warning = options[:warning] - - slack_warning_message(step, url, warning) - end - - -# ------------------------------------------ -# Helpers -# ------------------------------------------ - - def slack_message(scheme, build_url, exception) - - # Do not send the Slack message from the dev machine - return if not is_ci - - message = exception ? "#{scheme} build failed!" : "#{scheme} build successful!" - - payload = { - "Build Date" => Time.new.to_s, - "Build Machine" => sh("hostname"), - "Platform" => "Android" - } - - if build_url then - payload[:"FirebaseAppDistribution dashboard: "] = build_url - end - - attachment_properties = nil - if exception then - attachment_properties = { - fields: [{ title: "Error", value: exception }] - } - end - - slack( - message: message, - slack_url: SLACK_URL, - channel: SLACK_CHANNEL, - username: "Jenkins", - default_payloads: [:git_branch], - payload: payload, - attachment_properties: attachment_properties - ) - - if exception then - UI.user_error!("Error: #{exception}") - end - end - - def slack_warning_message(scheme, build_url, warning) - - # Do not send the Slack message from the dev machine - return if not is_ci - - message = scheme - - payload = { - "Build Date" => Time.new.to_s, - "Build Machine" => sh("hostname"), - "Platform" => "Android" - } - - if build_url then - payload[:"Build URL "] = build_url - end - - attachment_properties = { - fields: [{ title: "Message", value: warning }] - } - - slack( - message: message, - success: false, - slack_url: SLACK_URL, - channel: SLACK_CHANNEL, - username: "Jenkins", - default_payloads: [:git_branch], - payload: payload, - attachment_properties: attachment_properties - ) - end - -end diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile deleted file mode 100644 index 70384c87b..000000000 --- a/fastlane/Pluginfile +++ /dev/null @@ -1,7 +0,0 @@ -# Autogenerated by fastlane -# -# Ensure this file is checked in to source control! - -gem 'fastlane-plugin-versioning_android' -gem 'fastlane-plugin-automated_test_emulator_run' -gem 'fastlane-plugin-firebase_app_distribution' diff --git a/fastlane/README.md b/fastlane/README.md deleted file mode 100644 index c73ad5b52..000000000 --- a/fastlane/README.md +++ /dev/null @@ -1,54 +0,0 @@ -fastlane documentation -================ -# Installation - -Make sure you have the latest version of the Xcode command line tools installed: - -``` -xcode-select --install -``` - -Install _fastlane_ using -``` -[sudo] gem install fastlane -NV -``` -or alternatively using `brew install fastlane` - -# Available Actions -## Android -### android build_apps -``` -fastlane android build_apps -``` - -### android unit_tests -``` -fastlane android unit_tests -``` -Running Unit tests for PrebidMobile-rendering -### android ui_tests_ppm -``` -fastlane android ui_tests_ppm -``` -Running UI tests for Prebid SDK PPM examples -### android ui_tests_gam -``` -fastlane android ui_tests_gam -``` -Running UI tests for Prebid SDK GAM examples -### android ui_tests_mopub -``` -fastlane android ui_tests_mopub -``` -Running UI tests for Prebid SDK MoPub examples -### android send_slack_message -``` -fastlane android send_slack_message -``` -Sends a notification to the Slack channel - ----- - -This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run. -More information about fastlane can be found on [fastlane.tools](https://fastlane.tools). -The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools). diff --git a/jenkins/build-pr.groovy b/jenkins/build-pr.groovy deleted file mode 100644 index d1fb27717..000000000 --- a/jenkins/build-pr.groovy +++ /dev/null @@ -1,130 +0,0 @@ -pipeline { - agent none - - environment { - JOB_ID = getJobId() - } - - stages { - - stage('Build') { - - when { not { branch 'develop' } } - agent { label 'mobile' } - - steps { - sh 'hostname' - sh 'echo $ANDROID_SDK_ROOT' - sh 'echo $ANDROID_HOME' - setCommitShortEnv() - sh 'bash scripts/disable_web_proxy_if_needed.sh' - sh 'bundle install' - sh 'bundle exec fastlane build_apps' - } - - post { - cleanup { deleteDir() } - } - } - - stage('Tests') { - - when { not { branch 'develop' } } - - parallel { - - stage('Unit Tests') { - agent { label 'mobile' } - - steps { - sh 'hostname' - sh 'bash scripts/disable_web_proxy_if_needed.sh' - runFastlaneLane('unit_tests') - } - post { - cleanup { - deleteDir() - } - } - } - - stage('UI Tests - PPM') { - agent { label 'android-tests' } - - steps { - runUiTests('ui_tests_ppm') - } - post { - cleanup { - deleteDir() - } - } - } - - stage('UI Tests - GAM') { - agent { label 'android-tests' } - - steps { - runUiTests('ui_tests_gam') - } - post { - cleanup { - deleteDir() - } - } - } - - stage('UI Tests - MoPub') { - agent { label 'android-tests' } - - steps { - runUiTests('ui_tests_mopub') - } - post { - cleanup { - deleteDir() - } - } - } - } - } - } -} - -static def getJobId() { - String datePart = new Date().format('yyyyMMddHHmmss') - int randomInt = new Random().nextInt((int) 9e7) + (int) 1e7 - return datePart + "-" + randomInt.toString() -} - -def setCommitShortEnv() { - script{ - env.COMMIT_SHORT = sh(script:'git rev-parse --short HEAD', returnStdout: true).trim() - } -} - -def runUiTests(String task){ - sh 'hostname' - prepareEmulator() - setupMockServer() - runFastlaneLane(task) -} - -def runFastlaneLane(String task){ - sh 'bundle install' - sh "bundle exec fastlane ${task}" -} - -def prepareEmulator() { - sh 'caffeinate -u -t 1' - sh 'bash scripts/disable_web_proxy_if_needed.sh' - sh 'bash scripts/kill_emulators.sh' -} - -def setupMockServer() { - sh 'git clone git@github.com:openx/mobile-mock-server.git' - sh 'mobile-mock-server/install.sh' - sh 'python3 mobile-mock-server/manage.py makemigrations' - sh 'python3 mobile-mock-server/manage.py migrate' - sh 'python3 mobile-mock-server/manage.py runserver_plus 0.0.0.0:8000 --cert-file mobile-mock-server/emulator.crt &' -} \ No newline at end of file