I am getting below error when Jenkins pipeline is run :
Welcome to Gradle 7.0!
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'Auth-mapper'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.7.7.
Required by:
project :
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.7.7.
> Could not get resource 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/2.7.7/spring-boot-gradle-plugin-2.7.7.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/2.7.7/spring-boot-gradle-plugin-2.7.7.pom'.
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/146.75.32.215] failed: connect timed out
> Could not resolve io.spring.gradle:dependency-management-plugin:1.1.0.
Required by:
project :
> Could not resolve io.spring.gradle:dependency-management-plugin:1.1.0.
my build.gradle file is having these entries :
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.7.7"
classpath "io.spring.gradle:dependency-management-plugin:1.1.0"
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0"
}
apply plugin: "org.springframework.boot"
apply plugin: "io.spring.dependency-management"
apply plugin: "org.sonarqube"
When I run this application in local then its working fine but when I try deploying it to openshift via Jenkins then in the build step its failing due to the above issue.