How to read pipeline output from gitlab-ci after-script? - gitlab-ci

I created an after-script to purge CDN files to prevent collision after each build, but if the build itself failed, it would result at the after-script running anyways and it too would fail (since those CDN files were never created).
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE
How can I read the pipeline output from the after-script so I could get the last line Finished: FAILURE and thus know the build went wrong.

Related

Task :app:createBundleReleaseJsAndAssets FAILED

I am getting this error which I try to create singed apk in react native
"info Done writing bundle output
info Done writing sourcemap output
info Copying 1 asset files
info Done copying assets
'E:\React' is not recognized as an internal or external command,
operable program or batch file.
enter image description here
Task :app:createBundleReleaseJsAndAssets FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
What went wrong:
Execution failed for task ':app:createBundleReleaseJsAndAssets'.
Process 'command 'cmd'' finished with non-zero exit value 1
"
It will be great if anyone can tell the solution for it?

Build failure in data driven framework while using Jenkins pipeline

**Jenkins pipeline build is failing because of following error. I have added dependencies and plugins but still error is not going while using mvn test command in the pipeline.
The same code is working properly through Maven project job. **
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources (default-testResources) on project : C:\Users\new\.jenkins\workspace\Pipeline\target\test-classes\dataSheet\webFormstestData - Copy (2).xlsx (Access is denied) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE

RNC Slider lint FAILED on ./gradlew clean build and release apk crashes on app start

Before assembling release, I'm trying to make clean build but it throws error and fails the task. When I generate release apk (succesfully generates), after installing it on my LG G4 phone (also tried Samsung Galaxy J3), it is crashing and not starting.
My app succesfully works with react-native run-android on my phone.
Before assembling release build, I typed
cd android
./gradlew clean
./gradlew buildcache
./gradlew clean build
and the last command always gives errors.
After adding
android {
lintOptions {
abortOnError false
}
}
to RNC Slider's build.gradle file as the errors say, ./gradlew clean build succesfully finishes its task. But still I can't open the app after generating and installing release apk.
./gradlew clean build error:
...
> Task :#react-native-community_slider:lint FAILED
Ran lint on variant release: 3 issues found
Ran lint on variant debug: 3 issues found
Wrote HTML report to file:///D:/React/Pure%20RN/dassist/node_modules/#react-native-community/slider/android/build/reports/lint-results.html
Wrote XML report to file:///D:/React/Pure%20RN/dassist/node_modules/#react-native-community/slider/android/build/reports/lint-results.xml
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':#react-native-community_slider:lint'.
> Lint found errors in the project; aborting build.
Fix the issues identified by lint, or add the following to your build script to proceed with errors:
...
android {
lintOptions {
abortOnError false
}
}
...
Errors found:
D:\React\Pure RN\dassist\node_modules\#react-native-community\slider\android\src\main\java\com\reactnativecommunity\slider\ReactSliderManager.java:68: Error: Value must be ? 0 (was -2) [Range]
ViewGroup.LayoutParams.WRAP_CONTENT,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BU¦LD FAILED in 35s
163 actionable tasks: 154 executed, 9 up-to-date
And this is a part of the xml report file (warnings excluded) mentioned in output logs:
<issues format="5" by="lint 3.3.1">
<issue
id="Range"
severity="Error"
message="Value must be ≥ 0 (was -2)"
category="Correctness"
priority="6"
summary="Outside Range"
explanation="Some parameters are required to in a particular numerical range; this check makes sure that arguments passed fall within the range. For arrays, Strings and collections this refers to the size or length."
errorLine1=" ViewGroup.LayoutParams.WRAP_CONTENT,"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="D:\React\Pure RN\dassist\node_modules\#react-native-community\slider\android\src\main\java\com\reactnativecommunity\slider\ReactSliderManager.java"
line="68"
column="13"/>
</issue>
</issues>

Objective-C Travis failed for 'Test runner exited before starting test execution'

Here is my code in .travis.yml file,after run build is passing, but I found the TEST are failed. I have no idea about this and block me a few days, appreciate your help. THX
--- Error as below ---
2018-12-20 05:57:42.698 xcodebuild[2394:8186] [MT]
IDETestOperationsObserverDebug: (CB8F382A-5B77-4BDA-BC4F-6EDF7B7DB822)
Beginning test session aaaaTests-CB8F382A-5B77-4BDA-BC4F-6EDF7B7DB822 at 2018-
12-20 05:57:42.698 with Xcode 10A255 on target <DVTiPhoneSimulator:
0x7f86387e49d0> {
SimDevice: iPhone 6 (B25EC6DB-0B2F-4920-B6C2-8560331BA779, iOS 9.1, Booted)
} (9.1 (13B143))
2018-12-20 05:57:53.744 xcodebuild[2394:8186] [MT]
IDETestOperationsObserverDebug: 11.068 elapsed -- Testing started completed.
2018-12-20 05:57:53.744 xcodebuild[2394:8186] [MT]
IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2018-12-20 05:57:53.744 xcodebuild[2394:8186] [MT]
IDETestOperationsObserverDebug: 11.068 sec, +11.068 sec -- end
2018-12-20 05:57:53.746 xcodebuild[2394:8186] Error
Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit,
operation never finished bootstrapping - no restart will be attempted"
UserInfo={NSLocalizedDescription=Early unexpected exit, operation never
finished bootstrapping - no restart will be attempted,
NSUnderlyingError=0x7f86389df930 {Error
Domain=IDETestOperationsObserverErrorDomain Code=5 "Test runner exited before
starting test execution." UserInfo={NSLocalizedDescription=Test runner exited
before starting test execution., NSLocalizedRecoverySuggestion=If you believe
this error represents a bug, please attach the result bundle at
/Users/travis/Library/Developer/Xcode/DerivedData/aaaa-
bdscsxnorhzvygafnsqdiqoriugx/Logs/Test/Run-aaaa-2018.12.20_05-57-22-
+0000.xcresult}}}
Testing failed:
aaaa.app (2488) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. Underlying error: Test runner exited before starting test execution.)
** TEST FAILED **
The command "set -o pipefail && xcodebuild -workspace aaaa.xcworkspace -scheme aaaa -destination platform\=iOS\ Simulator,OS\=9.1,name\=iPhone\ 6 build test | xcpretty" exited with 65.
Done. Your build exited with 1.
---My code as below---
language: objective-c
osx_image: xcode10
xcode_workspace: aaaa.xcworkspace
xcode_scheme: aaaa
xcode_destination: platform=iOS Simulator,OS=9.1,name=iPhone 6
before_install:
- pod repo update
- npm install ios-sim -g
- ios-sim start --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-6, 9.1"
The issue can fix by below step:
change the version of osx_image in .travis.yml file and retry
// if xcode10.1 build failed, you can change to other version, like xcode9.4
osx_image: xcode10.1
Travis support xcode version list:
https://docs.travis-ci.com/user/languages/objective-c/

create-react-app circle build failed

!/bin/bash -eo pipefail
yarn build
yarn run v1.6.0
$ react-scripts build
Creating an optimized production build...
Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
events.js:183
throw er; // Unhandled 'error' event
^
Error: This socket has been ended by the other party
at Socket.writeAfterFIN [as write] (net.js:364:12)
at PoolWorker.writeJson (/home/circleci/repo/node_modules/thread-loader/dist/WorkerPool.js:89:22)
at PoolWorker.run (/home/circleci/repo/node_modules/thread-loader/dist/WorkerPool.js:69:12)
at WorkerPool.distributeJob (/home/circleci/repo/node_modules/thread-loader/dist/WorkerPool.js:326:20)
at /home/circleci/repo/node_modules/thread-loader/node_modules/async/queue.js:10:5
at Object.process (/home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/queue.js:175:17)
at /home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/queue.js:115:15
at /home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/onlyOnce.js:12:16
at callback (/home/circleci/repo/node_modules/thread-loader/dist/WorkerPool.js:163:21)
at /home/circleci/repo/node_modules/thread-loader/dist/WorkerPool.js:190:15
at /home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/map.js:32:9
at /home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/once.js:12:16
at replenish (/home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/eachOfLimit.js:61:25)
at iterateeCallback (/home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/eachOfLimit.js:50:17)
at /home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/onlyOnce.js:12:16
at /home/circleci/repo/node_modules/thread-loader/node_modules/async/internal/map.js:29:13
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Exited with code 1