jenkinsci / jenkinsci/gitlab-plugin

Jenkins Shared LIbrary with Gitlab Fails with URI too large Error

Open
#1,064 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.4k
Forks
615
Avg merge
4h 32m
Merged PRs (30d)
10

Description

`
#!groovy
@Library('build-pods-shared-library@master') _

def label_new = "devops-jenkins-${UUID.randomUUID().toString()}"
def nodePodYaml = libraryResource 'podtemplates/test.yaml'

pipeline {
// agent any
agent {
kubernetes {
// label "kubernetes"
label "${label_new}"
idleMinutes 1
yamlFile nodePodYaml
// yamlFile libraryResource("podtemplates/test.yaml")
defaultContainer 'devops-team-custom-build-tools-image'
}
}
`

When i try to use this snippet I get this Error

-Pipeline/resolution-cloud-pipeline/mam %2F resolution-asset-manager-utils/feature%2FMW-32630-use-jenkins-slaves-for-single-repo-no-concurrency-builds: There was a failure building this commit
hudson.remoting.ProxyException: org.gitlab4j.api.GitLabApiException:
414 Request-URI Too Large

414 Request-URI Too Large



nginx

at org.gitlab4j.api.AbstractApi.validate(AbstractApi.java:633)
at org.gitlab4j.api.AbstractApi.get(AbstractApi.java:213)
at org.gitlab4j.api.RepositoryFileApi.getFile(RepositoryFileApi.java:166)
at org.gitlab4j.api.RepositoryFileApi.getFile(RepositoryFileApi.java:119)
at io.jenkins.plugins.gitlabbranchsource.GitLabSCMFile.type(GitLabSCMFile.java:93)
Caused: hudson.remoting.ProxyException: java.io.IOException: org.gitlab4j.api.GitLabApiException:
414 Request-URI Too Large

414 Request-URI Too Large



nginx

at io.jenkins.plugins.gitlabbranchsource.GitLabSCMFile.type(GitLabSCMFile.java:97)
at jenkins.scm.api.SCMFile.getType(SCMFile.java:265)
at jenkins.scm.api.SCMFile.isDirectory(SCMFile.java:252)
at io.jenkins.plugins.gitlabbranchsource.GitLabSCMFile.content(GitLabSCMFile.java:114)
at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:335)
at org.jenkinsci.plugins.workflow.multibranch.ReadTrustedStep$Execution.run(ReadTrustedStep.java:185)
at org.jenkinsci.plugins.workflow.multibranch.ReadTrustedStep$Execution.run(ReadTrustedStep.java:82)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:290)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

Running on Jenkins version :2.204.6

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.