spring cloud contract docker not publishing to artifactory - spring-cloud-contract

Following the steps described here, I ran
1. git clone https://github.com/spring-cloud-samples/spring-cloud-contract-nodejs
2. cd spring-cloud-contract-nodejs
3. npm install
4. npm test
Build is successful, however I don't see the artifacts getting published to artifcatory.
ubuntu#ip-172-31-2-26:~/spring-cloud-contract-nodejs$ git status On branch sc-contract Your branch is up to date with 'origin/sc-contract'.
nothing to commit, working tree clean ubuntu#ip-172-31-2-26:~/spring-cloud-contract-nodejs$ npm install
up to date in 24s
14 packages are looking for funding run `npm fund` for details ubuntu#ip-172-31-2-26:~/spring-cloud-contract-nodejs$ npm test
> bookstore#1.0.0 test
> ./run_tests.sh
Running tests against Artifactory
~/spring-cloud-contract-nodejs/docker ~/spring-cloud-contract-nodejs Killing docker_artifactory_1 ... done Killing docker_mongo_1 ... done ~/spring-cloud-contract-nodejs Fetching submodules Entering 'spring-cloud-contract-nodejs-external-contracts' fatal: couldn't find remote ref master fatal: run_command returned non-zero status for spring-cloud-contract-nodejs-external-contracts . Building docker ~/spring-cloud-contract-nodejs/docker ~/spring-cloud-contract-nodejs Going to remove docker_artifactory_1, docker_mongo_1 Removing docker_artifactory_1 ... done Removing docker_mongo_1 ... done mongo uses an image, skipping Building artifactory Sending build context to Docker daemon 7.68kB Step 1/4 : FROM docker.bintray.io/jfrog/artifactory-oss:5.5.1 ---> add606aca80a Step 2/4 : MAINTAINER Marcin Grzejszczak <mgrzejszczak#pivotal.io> ---> Using cache ---> cbb8dd3f2cff Step 3/4 : COPY artifactory.config.import.yml /var/opt/jfrog/artifactory/etc/artifactory.config.import.yml ---> Using cache ---> 46f1452932fd Step 4/4 : ENTRYPOINT ["/bin/sh", "-c", "/entrypoint-artifactory.sh"] ---> Using cache ---> c8261b8fe68c Successfully built c8261b8fe68c Successfully tagged docker_artifactory:latest Creating docker_artifactory_1 ... done Creating docker_mongo_1 ... done ~/spring-cloud-contract-nodejs Waiting for 30 seconds for artifactory to boot properly Failed to kill app Working around certificate issues npm WARN npm npm does not support Node.js v17.2.0 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9, 10. npm WARN npm You can find the latest version at https://nodejs.org/ npm WARN npm npm does not support Node.js v17.2.0 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9, 10. npm WARN npm You can find the latest version at https://nodejs.org/ npm ERR! cb.apply is not a function
npm ERR! A complete log of this run can be found in: npm ERR! /home/ubuntu/.npm/_logs/2021-12-16T20_30_09_497Z-debug.log Failed to install packages npm WARN npm npm does not support Node.js v17.2.0 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9, 10. npm WARN npm You can find the latest version at https://nodejs.org/ npm ERR! cb.apply is not a function
npm ERR! A complete log of this run can be found in: npm ERR! /home/ubuntu/.npm/_logs/2021-12-16T20_30_09_937Z-debug.log Failed to install package nohup: appending output to 'nohup.out' Sc Contract Version [3.1.0] Application URL [http://172.18.0.1:9876] Artifactory URL [http://172.18.0.1:8081/artifactory/libs-release-local] Project Version [0.0.1.RELEASE] Setting project name to [bookstore] Running the build To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.3/userguide/gradle_daemon.html#sec:disabling_the_daemon. Daemon will be stopped at the end of the build
> Task :buildSrc:compileJava UP-TO-DATE
> Task :buildSrc:compileGroovy NO-SOURCE
> Task :buildSrc:processResources NO-SOURCE
> Task :buildSrc:classes UP-TO-DATE
> Task :buildSrc:jar UP-TO-DATE
> Task :buildSrc:assemble UP-TO-DATE
> Task :buildSrc:compileTestJava NO-SOURCE
> Task :buildSrc:compileTestGroovy NO-SOURCE
> Task :buildSrc:processTestResources NO-SOURCE
> Task :buildSrc:testClasses UP-TO-DATE
> Task :buildSrc:test NO-SOURCE
> Task :buildSrc:check UP-TO-DATE
> Task :buildSrc:build UP-TO-DATE
> Configure project : Will use contracts from the mounted [/contracts] folder
> Task :clean UP-TO-DATE
> Task :compileJava NO-SOURCE
> Task :compileGroovy NO-SOURCE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :bootJarMainClassName
> Task :bootJar SKIPPED
> Task :jar
> Task :copyContracts
> Task :generateClientStubs
> Task :verifierStubsJar
> Task :assemble
> Task :compileTestJava
> Task :compileTestGroovy NO-SOURCE
> Task :processTestResources
> Task :testClasses
> Task :test
> Task :generateContractTests
> Task :compileContractTestJava Note: /spring-cloud-contract/build/generated-test-sources/contractTest/java/contracts/ContractVerifierTest.java uses or overrides a deprecated API. Note: Recompile with
-Xlint:deprecation for details.
> Task :compileContractTestGroovy NO-SOURCE
> Task :processContractTestResources NO-SOURCE
> Task :contractTestClasses
> Task :contractTest 2021-12-16 20:31:43.487 INFO 136 --- [ionShutdownHook] o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.11.0 (camel-1) shutting down (timeout:45s) 2021-12-16 20:31:43.495 INFO 136 --- [ionShutdownHook] o.a.c.impl.engine.AbstractCamelContext : Routes shutdown summary (total:0 stopped:0) 2021-12-16 20:31:43.498 INFO 136 --- [ionShutdownHook] o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.11.0 (camel-1) shutdown in 11ms (uptime:1s480ms) Results: (2 tests, 2 successes, 0 failures, 0 skipped)
> Task :cleanOutput UP-TO-DATE
> Task :copyOutput Execution optimizations have been disabled for task ':copyOutput' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: '/spring-cloud-contract/build'. Reason: Task ':copyOutput' uses this output of task ':bootJarMainClassName' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/spring-cloud-contract/build'. Reason: Task ':copyOutput' uses this output of task ':compileContractTestGroovy' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/spring-cloud-contract/build'. Reason: Task ':copyOutput' uses this output of task ':compileContractTestJava' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/spring-cloud-contract/build'. Reason: Task ':copyOutput' uses this output of task ':contractTest' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/spring-cloud-contract/build'. Reason: Task ':copyOutput' uses this output of task ':copyContracts' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/spring-cloud-contract/build'. Reason: Task ':copyOutput' uses this output of task ':generateClientStubs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/spring-cloud-contract/build'. Reason: Task ':copyOutput' uses this output of task ':generateContractTests' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/spring-cloud-contract/build'. Reason: Task ':copyOutput' uses this output of task ':jar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/spring-cloud-contract/build'. Reason: Task ':copyOutput' uses this output of task ':processContractTestResources' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/spring-cloud-contract/build'. Reason: Task ':copyOutput' uses this output of task ':verifierStubsJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
> Task :check
> Task :build
> Task :publishToMavenLocal SKIPPED
> Task :publish UP-TO-DATE
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3/userguide/command_line_interface.html#sec:command_line_warnings
Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness. Please consult deprecation warnings for more details.
BUILD SUCCESSFUL in 1m 33s 16 actionable tasks: 12 executed, 4 up-to-date

Related

Flutter Gradle task assembleRelease failed with exit code 1 while build apk

PS C:\flutter projeleri\firebase> flutter build apk
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Running Gradle task 'assembleRelease'...
Parameter format not correct -
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.7.0\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not delete old C:\flutter projeleri\firebase\build\app\reports\lint-results-release-fatal.html
* 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 10m 37s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 641,3s (!)
Gradle task assembleRelease failed with exit code 1
what's the problem?
first delete your build folder and use this command in terminal
flutter build apk --split-per-abi

after installing image crop picker and debug problem

my all project is working fine but when i install image crop picker dependency then it shows the error even there is no build.
FAILURE: Build failed with an exception. Error given below
What went wrong:
Execution failed for task ':app:processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
F:\bgbyteappfolder\newbgb\node_modules\react-native-image-crop-picker\android\build\intermediates\library_manifest\debug\AndroidManifest.xml:10:5-14:15: AAPT: error: unexpected element found in .
BUILD FAILED in 31s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Note: Some input files use or override a deprecated API..
i Am expecting rapid action on this failure stackoverflow family
Upgrade your gradle version by adding classpath 'com.android.tools.build:gradle:4.0.1' in your android/build.gradle file:
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
}
}
After this clean your build folder by:
cd android
./gradlew clean

JavaFX GUI testing with TestFX fails on Github workflow but not on local computer

As per title, I am using TestFX to run some simple test on the GUI of a JavaFX application. The result whenever I run gradle test, will return 340 tests passed out of 340 tests. However, on Github's workflow checks for pull requests, it says 340 tests passed, 1 failed.
> Task :test
seedu.address.ui.WidgetViewBoxTest > update_matchingContent(FxRobot) FAILED
java.lang.RuntimeException
Caused by: java.lang.UnsupportedOperationException
340 tests completed, 1 failed
> Task :test FAILED
> Task :jacocoTestReport
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///home/runner/work/tp/tp/build/reports/tests/test/index.html
Yet locally, everything is fine when I run build.
11:43:12 PM: Executing task 'build'...
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :jar UP-TO-DATE
> Task :startScripts UP-TO-DATE
> Task :distTar UP-TO-DATE
> Task :distZip UP-TO-DATE
> Task :shadowJar UP-TO-DATE
> Task :startShadowScripts UP-TO-DATE
> Task :shadowDistTar UP-TO-DATE
> Task :shadowDistZip UP-TO-DATE
> Task :assemble UP-TO-DATE
> Task :checkstyleMain UP-TO-DATE
> Task :compileTestJava UP-TO-DATE
> Task :processTestResources UP-TO-DATE
> Task :testClasses UP-TO-DATE
> Task :checkstyleTest UP-TO-DATE
> Task :test UP-TO-DATE
> Task :jacocoTestReport UP-TO-DATE
> Task :check UP-TO-DATE
> Task :build UP-TO-DATE
BUILD SUCCESSFUL in 0s
16 actionable tasks: 16 up-to-date
11:43:13 PM: Task execution finished 'build'.
I cannot find any relevant issues on the TestFX github page. And the test report generated in index.html indicated 100% text success. Anybody able to provide insights into this issue?

AppCenter build error: Project firebaseauth_web at : is either no Android app project or build version has not been set to override

I have a mobile project in flutter and I am trying to build it on AppCenter but I got this error:
Project firebaseauth_web at : is either no Android app project or build version has not been set to override. Skipping...
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/runner/.pub-cache/hosted/pub.dartlang.org/firebase_auth_web-0.1.3+1/android/build.gradle' line: 22
* What went wrong:
A problem occurred evaluating root project 'firebaseauth_web'.
> Failed to apply plugin [id 'com.android.library']
> Minimum supported Gradle version is 5.4.1. Current version is 4.10.2. If using the gradle wrapper, try editing the distributionUrl in /Users/runner/.pub-cache/hosted/pub.dartlang.org/firebase_auth_web-0.1.3+1/android/gradle/wrapper/gradle-wrapper.properties to gradle-5.4.1-all.zip
* 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
BUILD FAILED in 4s
The plugin firebase_auth_web could not be built due to the issue above.
##[error]The process '/bin/bash' failed with exit code 1
##[error]Bash failed with error: The process '/bin/bash' failed with exit code 1
##[section]Finishing: Post Clone Script
##[section]Starting: Checkout Chofu#master to s
==============================================================================
Task : Get sources
Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version : 1.0.0
Author : Microsoft
Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: Chofu (ExternalGit)
##[section]Finishing: Checkout Chofu#master to s
##[section]Starting: Finalize Job
Cleaning up task ***
Start cleaning up orphan processes.
Terminate orphan process: pid (1490) (java)
Terminate orphan process: pid (1470) (java)
Terminate orphan process: pid (1462) (java)
Terminate orphan process: pid (1404) (java)
Terminate orphan process: pid (1289) (adb)
##[section]Finishing: Finalize Job
##[section]Finishing: Build
My gradle version is actually 6.1.1.
Here is my gradle-wrapper.properties from android/gradle code:
...
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
...
I have tried to change the version to 5.4.1 but I got a similar error:
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/runner/runners/2.170.1/work/1/s/android/app/build.gradle' line: 24
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.internal.version-check']
> Minimum supported Gradle version is 6.1.1. Current version is 5.4.1. If using the gradle wrapper, try editing the distributionUrl in /Users/runner/runners/2.170.1/work/1/s/android/gradle/wrapper/gradle-wrapper.properties to gradle-6.1.1-all.zip
* 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
BUILD FAILED in 18s
Running Gradle task 'assembleRelease'... 19.8s
Gradle task assembleRelease failed with exit code 1
EDITED:
After a better look I discover other 2 errors:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':appcenter:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> 1 exception was raised by workers:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
/Users/runner/.gradle/caches/transforms-2/files-2.1/469951e99791312bb8bf182873580e29/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/runner/.gradle/caches/transforms-2/files-2.1/469951e99791312bb8bf182873580e29/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/ttcIndex not found.
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':appcenter_analytics:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> 1 exception was raised by workers:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
/Users/runner/.gradle/caches/transforms-2/files-2.1/469951e99791312bb8bf182873580e29/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/runner/.gradle/caches/transforms-2/files-2.1/469951e99791312bb8bf182873580e29/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/ttcIndex not found.
If someone could help me I would be grateful!
After one month of struggle I found how to solve the problem:
I have changed gradle version from android/gradle/wrapper/gradle-wrapper.properties from 6.1.1 to 5.6.2 . So my file looks like:
...
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
...
In android/build.gradle I have changed gradle tool version from 4.0.0 to 3.5.0:
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
...
}
In android/app/build.gradle I have added checkReleaseBuilds false to lintOptions :
lintOptions {
...
checkReleaseBuilds false
}
In android/app/appcenter-post-clone.sh I have added two builds before --release build:
...
# build APK
flutter build apk --debug
flutter build apk --profile
flutter build apk --release
...
I hope this will help others :)

Could not determine the dependencies of task ':app:preDebugBuild'

I am build an app with firebase dependencies before creating an app i have done the firebase configuration and added firebase dependencies in pubspec.yaml. But when i run the app i got some errors.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.
1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.android.gms:play-services-flags:15.0.1 -> com.google.android.gms:play-services-basement#[
15.0.1], but play-services-basement version was 16.0.1.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends on project 'firebase_auth' which depends onto com.google.firebase:firebase-auth#16.0.2
-- Project 'app' depends on project 'firebase_core' which depends onto com.google.firebase:firebase-core#16.0.4
-- Project 'app' depends on project 'firebase_database' which depends onto com.google.firebase:firebase-database#15.+
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
* 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
BUILD FAILED in 2s
Finished with error: Gradle task assembleDebug failed with exit code 1
The Problem occur when the dependencies cannot download from jcenter server. change your network connection follows flutter clean and try again
you can still work in debug mode
flutter run --debug will work
or you can goto File > Settings>Build,Execution,Deployment>Build Tools>Gradle>Uncheck Offline work option in Android Studio
You can also invalidate Cache and Restart

Resources