Unable to automate Jmeter load testing in Bamboo - performance

simple 14-Jan-2019 15:42:18 Build Global Digital - Application - App_Performance_Test - feature-Jmeter-Test-Feature - JMeter #3 (GDA-AP10-JOB1-3) started building on agent Elastic Agent on i-0375978d6d2732720
simple 14-Jan-2019 15:42:18 Elastic agent on instance i-0375978d6d2732720
simple 14-Jan-2019 15:42:18 Build working directory is /media/ephemeral0/build-dir/GDA-AP10-JOB1
simple 14-Jan-2019 15:42:18 Executing build Global Digital - Application - App_Performance_Test - feature-Jmeter-Test-Feature - JMeter #3 (GDA-AP10-JOB1-3)
simple 14-Jan-2019 15:42:18 Starting task 'Checkout jmeter scripts' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout'
simple 14-Jan-2019 15:42:18 Checking out into /media/ephemeral0/build-dir/GDA-AP10-JOB1
simple 14-Jan-2019 15:42:18 Updating source code to revision: 06bbe6dbc1ab56007bf4b44e270b72d477e7fee6
simple 14-Jan-2019 15:42:18 Fetching 'refs/heads/feature/Jmeter-Test-Feature' from 'ssh://git#stash-QA.gd.com:7999/project/jmeter-scripts.git'. Will try to do a shallow fetch.
simple 14-Jan-2019 15:42:18 Warning: Permanently added '[127.0.0.1]:36663' (RSA) to the list of known hosts.
simple 14-Jan-2019 15:42:19 Checking out revision 06bbe6dbc1ab56007bf4b44e270b72d477e7fee6.
simple 14-Jan-2019 15:42:19 Already on 'feature/Jmeter-Test-Feature'
simple 14-Jan-2019 15:42:19 Updated source code to revision: 06bbe6dbc1ab56007bf4b44e270b72d477e7fee6
simple 14-Jan-2019 15:42:19 Finished task 'Checkout jmeter scripts' with result: Success
simple 14-Jan-2019 15:42:19 Running pre-build action: VCS Version Collector
simple 14-Jan-2019 15:42:19 Running pre-build action: Sauce OnDemand Build Configurator
simple 14-Jan-2019 15:42:19 Running pre-build action: Hung Build Killer PreBuildAction
simple 14-Jan-2019 15:42:19 Skipping execution of task 'Run jmeter scripts' as it is disabled
command 14-Jan-2019 15:42:19 Substituting variable: ${bamboo.capability.system.builder.command.JMeter 3} with /opt/apache-jmeter-3/bin/jmeter
command 14-Jan-2019 15:42:19 Substituting variable: ${bamboo.build.working.directory} with /media/ephemeral0/build-dir/GDA-AP10-JOB1
simple 14-Jan-2019 15:42:19 Starting task 'Test script' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
command 14-Jan-2019 15:42:19 Beginning to execute external process for build 'Global - Application - App_Performance_Test - feature-Jmeter-Test-Feature - JMeter #3 (GDA-AP10-JOB1-3)'\n ... running command line: \n/bin/sh /home/bamboo/bamboo-agent-home/temp/GDA-AP10-JOB1-3-ScriptBuildTask-5020464262256623767.sh\n ... in: /media/ephemeral0/build-dir/GDA-AP10-JOB1\n ... using extra environment variables: \nbamboo_planRepository_1_branch=feature/Jmeter-Test-Feature\nbamboo_duration=5\nbamboo_repository_247496707_revision_number=06bbe6dbc1ab56007bf4b44e270b72d477e7fee6\nbamboo_planRepository_1_branchDisplayName=feature/Jmeter-Test-Feature\nbamboo_repository_revision_number=06bbe6dbc1ab56007bf4b44e270b72d477e7fee6\nbamboo_repository_247496707_name=Global - jmeter-scripts\nbamboo_repository_247496707_git_repositoryUrl=ssh://git#stash-QA.gd.com:7999/project/jmeter-scripts.git\nbamboo_buildKey=GDA-AP10-JOB1\nbamboo_capability_remote=true\nbamboo_capability_system_builder_command_Python_2_7=/usr/bin/python\nbamboo_shortJobName=JMeter\nbamboo_buildResultsUrl=https://bamboo-staging.qa.com/browse/GDA-AP10-JOB1-3\nbamboo_repository_247496707_git_branch=feature/Jmeter-Test-Feature\nbamboo_planRepository_repositoryUrl=ssh://git#stash-QA.gd.com:7999/project/jmeter-scripts.git\nbamboo_agentId=247824395\nbamboo_location=publish\nbamboo_ramp_time=1\nbamboo_planRepository_revision=06bbe6dbc1ab56007bf4b44e270b72d477e7fee6\nbamboo_planRepository_previousRevision=06bbe6dbc1ab56007bf4b44e270b72d477e7fee6\nbamboo_repository_branch_name=feature/Jmeter-Test-Feature\nbamboo_repository_247496707_branch_name=feature/Jmeter-Test-Feature\nbamboo_ci_password=********\nbamboo_capability_system_builder_command_Python_3=/usr/bin/python3\nbamboo_password=********\nbamboo_capability_ci=true\nbamboo_capability_system_builder_command_foodcritic=/opt/chefdk/bin/foodcritic\nbamboo_dependenciesDisabled=false\nbamboo_locale=en_us\nbamboo_threads=1\nbamboo_planRepository_branch=feature/Jmeter-Test-Feature\nbamboo_planRepository_1_type=bbserver\nbamboo_planRepository_branchName=feature/Jmeter-Test-Feature\nbamboo_environment=lt-000\nbamboo_gdminorversion=6313\nbamboo_capability_release=true\nbamboo_planRepository_1_username=\nbamboo_planRepository_type=bbserver\nbamboo_ManualBuildTriggerReason_userName=bv49406\nbamboo_capability_system_builder_command_rubocop=/opt/chefdk/bin/rubocop\nbamboo_capability_system_builder_node_Node_js=/opt/node/bin/node\nbamboo_capability_system_builder_ant_Ant=/opt/ant\nbamboo_capability_system_builder_mvn3_Maven_3=/opt/maven/current\nbamboo_planKey=GDA-AP10\nbamboo_planRepository_username=\nbamboo_planRepository_1_branchName=feature/Jmeter-Test-Feature\nbamboo_capability_system_agent_environment_ec2_instance_type=c3.xlarge\nbamboo_resultsUrl=https://bamboo-staging.qa.com/browse/GDA-AP10-JOB1-3\nbamboo_capability_system_agent_environment_ebs_optimised=false\nbamboo_build_working_directory=/media/ephemeral0/build-dir/GDA-AP10-JOB1\nbamboo_planRepository_1_name=Global - jmeter-scripts\nbamboo_shortPlanName=feature-Jmeter-Test-Feature\nbamboo_capability_system_builder_command_ansible=/usr/local/bin/ansible\nbamboo_hybris_version=6.3.0.8\nbamboo_capability_system_builder_command_packer=/usr/local/bin/packer\nbamboo_planRepository_name=Global - jmeter-scripts\nbamboo_gdmajorversion=1\nbamboo_capability_system_builder_command_terraform=/usr/local/bin/terraform\nbamboo_buildNumber=3\nbamboo_username=admin\nbamboo_planName=Global - Application - App_Performance_Test - feature-Jmeter-Test-Feature\nbamboo_capability_system_builder_command_git=/usr/bin/git\nbamboo_shortPlanKey=AP10\nbamboo_shortJobKey=JOB1\nbamboo_capability_system_builder_node_npm=/opt/node-7/bin/npm\nbamboo_capability_system_builder_command_JMeter_3=/opt/apache-jmeter-3/bin/jmeter\nbamboo_capability_system_builder_command_berkshelf=/opt/chefdk/bin/berks\nbamboo_buildTimeStamp=2019-01-14T15:42:18.663Z\nbamboo_repository_previous_revision_number=06bbe6dbc1ab56007bf4b44e270b72d477e7fee6\nbamboo_repository_git_branch=feature/Jmeter-Test-Feature\nbamboo_buildResultKey=GDA-AP10-JOB1-3\nbamboo_buildPlanName=Global - Application - App_Performance_Test - feature-Jmeter-Test-Feature - JMeter\nbamboo_capability_system_agent_environment_iam_instance_profile=gd-mantl-agent\nbamboo_planRepository_1_revision=06bbe6dbc1ab56007bf4b44e270b72d477e7fee6\nbamboo_repository_name=Global - jmeter-scripts\nbamboo_domain=www-bose-com\nbamboo_repository_247496707_previous_revision_number=06bbe6dbc1ab56007bf4b44e270b72d477e7fee6\nbamboo_ci_user=gc8281256\nbamboo_buildFailed=false\nbamboo_capability_system_docker_executable=/usr/bin/docker\nbamboo_agentWorkingDirectory=/media/ephemeral0/build-dir\nbamboo_gdtempversion=17216\nbamboo_capability_system_git_executable=/usr/bin/git\nbamboo_repository_git_username=\nbamboo_planRepository_1_previousRevision=06bbe6dbc1ab56007bf4b44e270b72d477e7fee6\nbamboo_planRepository_branchDisplayName=feature/Jmeter-Test-Feature\nbamboo_capability_system_builder_mvn3_Maven_3_x=/opt/maven/current\nbamboo_capability_system_builder_command_awscli=/usr/local/bin/aws\nbamboo_plan_storageTag=plan-247365637\nbamboo_repository_git_repositoryUrl=ssh://git#stash-QA.gd.com:7999/project/jmeter-scripts.git\nbamboo_repository_247496707_git_username=\nbamboo_capability_system_builder_command_knife=/opt/chefdk/bin/knife\nbamboo_working_directory=/media/ephemeral0/build-dir/GDA-AP10-JOB1\nbamboo_planRepository_1_repositoryUrl=ssh://git#stash-QA.gd.com:7999/project/jmeter-scripts.git\nbamboo_capability_system_jdk_JDK_1_8=/opt/jdk-8\nbamboo_capability_system_jdk_JDK_1_9=/opt/jdk-9\nbamboo_capability_system_builder_command_chrome=/usr/bin/google-chrome\n
simple 14-Jan-2019 16:02:25 _ _ ____ _ _
simple 14-Jan-2019 16:02:25 ( )_( )( _ \( )/ )
simple 14-Jan-2019 16:02:25 ) _ ( ) _ < ) (
simple 14-Jan-2019 16:02:25 (_) (_)(____/(_)\_)
simple 14-Jan-2019 16:02:25 This build has been killed by the HBK (Hung Build Killer). Either Bamboo has detected the build has hung or it has been manually stopped.
simple 14-Jan-2019 16:02:25 Attempting to generate stack trace and terminate spawned sub-processes of process id: 2282
simple 14-Jan-2019 16:02:25 Found related process: pid: 2659 ppid: 2282 pgid: 2174 %cpu: 0.0 %mem: 0.0 cmd: /bin/sh /home/bamboo/bamboo-agent-home/temp/GDA-AP10-JOB1-3-ScriptBuildTask-5020464262256623767.sh
simple 14-Jan-2019 16:02:25 Found related process: pid: 2660 ppid: 2659 pgid: 2174 %cpu: 0.0 %mem: 0.0 cmd: /bin/bash
simple 14-Jan-2019 16:02:25 getStackTraceAndKillRelatedProcesses for 2 processes
simple 14-Jan-2019 16:02:25 Executing kill -3 2660
simple 14-Jan-2019 16:02:25 Executing kill -3 2659
simple 14-Jan-2019 16:02:30 Killing: 2660
simple 14-Jan-2019 16:02:30 Executing kill 2660
simple 14-Jan-2019 16:02:30 Killing: 2659
simple 14-Jan-2019 16:02:30 Executing kill 2659
error 14-Jan-2019 16:02:30 Terminated
error 14-Jan-2019 16:02:30 /home/bamboo/bamboo-agent-home/temp/GDA-AP10-JOB1-3-ScriptBuildTask-5020464262256623767.sh: 2: cd: can't cd to /opt/apache-jmeter-3/bin/jmeter
simple 14-Jan-2019 16:02:30 Failing task since return code of [/bin/sh /home/bamboo/bamboo-agent-home/temp/GDA-AP10-JOB1-3-ScriptBuildTask-5020464262256623767.sh] was 2 while expected 0
simple 14-Jan-2019 16:02:30 Finished task 'Test script' with result: Failed
simple 14-Jan-2019 16:02:30 Running post build plugin 'Docker Container Cleanup'
simple 14-Jan-2019 16:02:30 Running post build plugin 'NCover Results Collector'
simple 14-Jan-2019 16:02:30 Running post build plugin 'Clover Results Collector'
simple 14-Jan-2019 16:02:30 Running post build plugin 'Sauce OnDemand Post Runner'
simple 14-Jan-2019 16:02:30 Running post build plugin 'npm Cache Cleanup'
simple 14-Jan-2019 16:02:30 Running post build plugin 'Artifact Copier'
simple 14-Jan-2019 16:02:30 Publishing an artifact: jmeter_jtl
error 14-Jan-2019 16:02:30 Unable to publish artifact [jmeter_jtl]: the source directory /media/ephemeral0/build-dir/GDA-AP10-JOB1/output does not exist.
simple 14-Jan-2019 16:02:30 The artifact hasn't been successfully published after 456.8 μs
simple 14-Jan-2019 16:02:30 Finalising the build...
simple 14-Jan-2019 16:02:30 Stopping timer.
simple 14-Jan-2019 16:02:30 Build GDA-AP10-JOB1-3 completed.
simple 14-Jan-2019 16:02:30 Running on server: post build plugin 'NCover Results Collector'
simple 14-Jan-2019 16:02:30 Running on server: post build plugin 'Build Hanging Detection Configuration'
simple 14-Jan-2019 16:02:30 Running on server: post build plugin 'Clover Delta Calculator'
simple 14-Jan-2019 16:02:30 Running on server: post build plugin 'Maven Dependencies Postprocessor'
simple 14-Jan-2019 16:02:30 All post build plugins have finished
simple 14-Jan-2019 16:02:30 Generating build results summary...
simple 14-Jan-2019 16:02:30 Saving build results to disk...
simple 14-Jan-2019 16:02:30 Logging substituted variables...
simple 14-Jan-2019 16:02:31 Indexing build results...
simple 14-Jan-2019 16:02:31 Finished building GDA-AP10-JOB1-3.
simple 14-Jan-2019 16:02:35 _ _ ____ _ _
simple 14-Jan-2019 16:02:35 ( )_( )( _ \( )/ )
simple 14-Jan-2019 16:02:35 ) _ ( ) _ < ) (
simple 14-Jan-2019 16:02:35 (_) (_)(____/(_)\_)
simple 14-Jan-2019 16:02:35 This build has been killed by the HBK (Hung Build Killer). Either Bamboo has detected the build has hung or it has been manually stopped.
simple 14-Jan-2019 16:02:35 Has finished generating stack trace and terminating spawned sub-processes of process id: 2282
I am planning to automate performance testing through Bamboo. Currently, I am running performance tests using jmeter 3.1 installed on a Windows machine (AWS-EC2 instance).
I am following the below approach to automate my tests:
Create a repository in stash, upload the jmx file
Create a bamboo plan, with a stage(jmeter)->task 1(Source Code Checkout configuration- configured the above repository) and task 2 (Script configuration).
In the second task, I choose /bin/sh or cmd.exe then I have written the code in the script body section:
/bin/bash
cd ${bamboo.capability.system.builder.command.JMeter 3} -n -t \
jmeterscript.jmx -l ${bamboo.build.working.directory}/example.jtl
#runtime the value will be
#${bamboo.capability.system.builder.command.JMeter 3}
# (which is interpolated to `/opt/apache-jmeter-3/bin/jmeter`)
When I run the above plan, it runs for more than 30 mins and fails.
Here's the error I receive (logs are in-line, above):
can't cd to /opt/apache-jmeter-3/bin/jmeter
Unable to publish artifact [jmeter_jtl]: the source directory
/media/ephemeral0/build-dir/GDA-AP10-JOB1/output does not exist.

cd ${bamboo.capability.system.builder.command.JMeter 3} -n -t \jmeterscript.jmx -l ${bamboo.build.working.directory}/example.jtl
By this command you are trying to change dir. But there is no such dir actually.
You have to run JMeter instead:
${bamboo.capability.system.builder.command.JMeter 3} -n -t \jmeterscript.jmx -l ${bamboo.build.working.directory}/example.jtl

Related

Aws elastic beanstalk 'try add execution permission' prebuild hooks error

My eb-engine.log file says the following:
2022/12/02 09:06:55.661307 [INFO] Executing instruction: RunAppDeployPreBuildHooks
2022/12/02 09:06:55.661326 [INFO] Executing platform hooks in .platform/hooks/prebuild/
2022/12/02 09:06:55.661362 [INFO] Following scripts will be executed in order: [00_npm_install.sh]
2022/12/02 09:06:55.661368 [INFO] Try add execution permission
2022/12/02 09:06:55.661375 [INFO] Running script: .platform/hooks/prebuild/00_npm_install.sh
2022/12/02 09:07:19.325093 [ERROR] An error occurred during execution of command [app-deploy] - [RunAppDeployPreBuildHooks]. Stop running the command. Error: Command .platform/hooks/prebuild/00_npm_install.sh failed with error exit status 244.
I do have permissions set up for the file(s) in question:
$ git ls-files -s .platform
100755 e8c201d7464dcf52ae874bb106de1a0da6a7bd20 0 .platform/confighooks/prebuild/00_npm_install.sh
100755 e8c201d7464dcf52ae874bb106de1a0da6a7bd20 0 .platform/hooks/prebuild/00_npm_install.sh
100644 7744deea7dfdafe4f584e01991cb6e80ee3079b9 0 .platform/nginx/conf.d/proxy.conf
But this error occurs anyway ever since I committed (using github desktop) and pushed from a new device, which was an update that did not tweak my files. Before that commit & push, the output was the following:
2022/11/30 18:56:18.539468 [INFO] Executing instruction: RunAppDeployPreBuildHooks
2022/11/30 18:56:18.539488 [INFO] Executing platform hooks in .platform/hooks/prebuild/
2022/11/30 18:56:18.539521 [INFO] Following scripts will be executed in order: [00_npm_install.sh]
2022/11/30 18:56:18.539527 [INFO] Try add execution permission
2022/11/30 18:56:18.539535 [INFO] Adding execute mode to file, original mode is 436
2022/11/30 18:56:18.539543 [INFO] Running script: .platform/hooks/prebuild/00_npm_install.sh
2022/11/30 18:56:32.415210 [INFO] Finished running scripts in /var/app/staging/.platform/hooks/prebuild
Does anyone know what could have changed or how to fix this?
It turns out something was wrong with my configuration of EB, it later also stopped giving me logs when I requested them. I set up some new configuration and after the environment was rebuilt, everything worked again.

go application build with bazel can't link when running inside container

I am trying to containerize my application build, though, when running the build that uses bazel with bazel-gazelle inside a container I will get this error:
$ bazel run --spawn_strategy=local //:gazelle --verbose_failures
INFO: Analyzed target //:gazelle (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/external/go_sdk/BUILD.bazel:43:15: GoToolchainBinary external/go_sdk/builder [for host] failed: (Exit 1): go failed: error executing command
(cd /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/execroot/__main__ && \
exec env - \
GOROOT_FINAL=GOROOT \
external/go_sdk/bin/go tool link -o bazel-out/host/bin/external/go_sdk/builder bazel-out/host/bin/external/go_sdk/builder.a)
# Configuration: e0f1106e28100863b4221c55fca6feb935acec078da5376e291cf644e275dae5
# Execution platform: #local_config_platform//:host
/opt/go/pkg/tool/linux_amd64/link: mapping output file failed: invalid argument
Target //:gazelle failed to build
INFO: Elapsed time: 2.302s, Critical Path: 0.35s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
I tried to run it standalone:
$ /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/external/go_sdk/bin/go tool link -o bazel-out/host/bin/external/go_sdk/builder bazel-out/host/bin/external/go_sdk/builder.a
/opt/go/pkg/tool/linux_amd64/link: mapping output file failed: invalid argument
and still got no success.
Never had this kind of link problem and the linker don't provide much more information. Tried to install all packages I could think of and still no luck.
For context:
Running Ubuntu 20.04 LTS
Docker 20.10.9
Bazel 4.2.2
Rules GO v0.31.0
Bazel Gazelle v0.25.0
Also tried to run it with the strace, though I don't think I am skilled enough to find meaningful information from the tool output.
#edit
For more context:
e$ /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/external/go_sdk/bin/go tool link -v -o bazel-out/host/bin/external/go_sdk/builder bazel-out/host/bin/external/go_sdk/builder.a
HEADER = -H5 -T0x401000 -R0x1000
searching for runtime.a in /opt/go/pkg/linux_amd64/runtime.a
/opt/go/pkg/tool/linux_amd64/link: mapping output file failed: invalid argument

Test suite will not load into VSCode Ruby Test Explorer

I am trying to utilize VSCode's Ruby Test Explorer extension but it is failing to load my test suite.
My tests are all in a ./test/ folder in my root directory. This is my Test Explorer setup:
"rubyTestExplorer.testFramework": "rspec",
"rubyTestExplorer.rspecCommand": "rspec",
"rubyTestExplorer.rspecDirectory": "./test/",
"rubyTestExplorer.logpanel": true
The logger output is displaying the following:
[2020-05-22 17:10:53.877] [INFO] Running Ruby tests ["root"]
[2020-05-22 17:10:53.878] [INFO] Running full test suite.
[2020-05-22 17:10:53.878] [INFO] Running command: rspec --require /Users/Home/.vscode/extensions/connorshea.vscode-ruby-test-adapter-0.7.1/custom_formatter.rb --format CustomFormatter
[2020-05-22 17:10:54.095] [DEBUG] [CHILD PROCESS OUTPUT] START_OF_TEST_JSON{"version":"3.9.2","messages":["No examples found."],"examples":[],"summary":{"duration":0.000242,"example_count":0,"failure_count":0,"pending_count":0,"errors_outside_of_examples_count":0},"summary_line":"0 examples, 0 failures"}END_OF_TEST_JSON
[2020-05-22 17:10:54.096] [DEBUG] Parsing the below JSON:
[2020-05-22 17:10:54.096] [DEBUG] {"version":"3.9.2","messages":["No examples found."],"examples":[],"summary":{"duration":0.000242,"example_count":0,"failure_count":0,"pending_count":0,"errors_outside_of_examples_count":0},"summary_line":"0 examples, 0 failures"}
[2020-05-22 17:10:54.102] [INFO] Child process has exited. Sending test run finish event.
The Test Explorer panel remains blank.

GitHub Actions run Espresso tests

I am currently trying to get my Instrumentation tests to run using GitHub Actions. I have the unit tests running fine but I cannot seem to get the Espresso tests to run. I am currently trying:
- name: Run Instrumentation Tests (reactivecircus)
uses: reactivecircus/android-emulator-runner#v2.6.1
with:
api-level: 23
target: default
arch: x86
profile: Nexus 6
script: ./gradlew connectedCheck --stacktrace
And I get the result:
com.balsdon.ratesapp.behaviour.RateListActivityEntryBehaviourInstrumentedTest > recyclerViewClickOnItemChangesMain[test(AVD) - 6.0] FAILED
android.content.res.Resources$NotFoundException: Resource ID #0x7f0700d3
at android.content.res.Resources.getValue(Resources.java:1351)
Tests on test(AVD) - 6.0 failed: Instrumentation run failed due to 'android.content.res.Resources$NotFoundException'
> Task :app:connectedOfflinemockDebugAndroidTest FAILED
> Task :app:processOnlineecbDebugAndroidTestResources
> Task :app:processProductionDebugAndroidTestResources
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:connectedOfflinemockDebugAndroidTest'.
> There were failing tests. See the report at: file:///Users/runner/runners/2.165.2/work/currency_list_app/currency_list_app/app/build/reports/androidTests/connected/flavors/OFFLINEMOCK/index.html
and when I use:
- uses: malinskiy/action-android/emulator-run-cmd#release/0.0.5
with:
cmd: ./gradlew integrationTest
api: 23
tag: default
abi: x86
I get
/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
error: device 'emulator-5554' not found
The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
If you want to see all my attempts, you can see all the commits on my pull request
Your emulator version that you run locally, it's most likely newer than API 23 android version. On github actions script you're running the emulator using API 23:
uses: reactivecircus/android-emulator-runner#v2
with:
api-level: 23
target: default
arch: x86
profile: Nexus 6
script: ./gradlew connectedCheck --stacktrace
and inside your project there is a app/src/main/res/drawable-v24 inside resources, thus it wont be available for emulators with < 24 API version. You either have to change that directory to be drawable-v23 or you move the resources to an other drawable that older versions can access.
Even if you change the drawable directory to drawable-v23, Espresso may have issues. You'll either have to resolve for that version or you'll have to use a newer API version for your GitHub action emulator, maybe the same as you have on your development environment.

How to fail Gitlab pipeline that calls another pipeline via API?

I have 2 Gitlab repos:
Project A
Integration tests for Project A
I want to stop the pipeline / build of Project A if the integration tests fail but currently the Project A pipeline passes even if the integration tests fail.
My .gitlab-ci.yml for Project A defines these 7 stages:
stages:
- build
- test
- publish
- dev-deployment
- staging-deployment
- trigger-integration-tests
- prod-deployment
The second last stage (trigger-integration-tests) kicks off the integration tests project by using the Gitlab API call with curl:
trigger-integration-tests:
stage: trigger-integration-tests
image: ubuntu:16.04
script:
- apt-get update && apt-get install -y curl
- "curl -X POST -F token=$INTEGRATION_TESTS_TOKEN -F variables[PROJECT_ID]=$CI_PROJECT_ID -F variables[BRANCH_NAME]=$CI_COMMIT_REF_NAME -F ref=master https://gitlab.mycompany.com/api/v4/projects/123/trigger/pipeline"
allow_failure: false
only:
- master
I tried adding the allow_failure: false flag but that didn't help so I'm looking for more ideas.
I found the trigger-and-wait technique but wasn't sure if there's a more simple solution.
As answered on a previous question, you could do the following:
From the main project, using a Python/Bash script:
Trigger the integration tests pipeline (and capture the pipeline ID)
Poll the status of the pipeline, using the captured ID (which can be running, pending, failed, canceled or skipped)
Raise an exception / error if it has failed...
See here for an example python script to achieve this.

Resources