Hi Ben,

yes you got right understanding of my problem.

There is no build associated yet, as it doesn't even get to the stage when
it would fireup any build for the pipeline. It's literally a scond after
sending the build task to Jenkins....

OpenShift version is 3.5. Jenkins sync plugin is 0.1.25.

Regards,
TH


On 18 August 2017 at 21:56, Ben Parees <[email protected]> wrote:

>
>
> On Fri, Aug 18, 2017 at 4:39 AM, Thorvald Hallvardsson <
> [email protected]> wrote:
>
>> Hi,
>>
>> I configured Gitlab webhook for my test pipeline to fire up a build. The
>> problem is as soon as I commit something jenkins complains with an error
>> below:
>>
>
> To make sure i understand your scenario, you've defined a pipeline
> buildconfig in openshift and enabled a gitlab webhook trigger to trigger
> the build?  (vs defining a gitlab trigger in jenkins itself).
>
>
>
>>
>> OpenShift Build jenkins/nodejs-pipeline-master-3 from
>> http://gitlab.os.hr4.local/jenkins/nodejs-ex-1.git
>> Checking out git http://gitlab.os.hr4.local/jenkins/nodejs-ex-1.git to
>> read Jenkinsfile
>>  > git rev-parse --is-inside-work-tree # timeout=10
>> Fetching changes from the remote Git repository
>>  > git config remote.origin.url http://gitlab.os.hr4.local/jen
>> kins/nodejs-ex-1.git # timeout=10
>> Fetching upstream changes from http://gitlab.os.hr4.local/jen
>> kins/nodejs-ex-1.git
>>  > git --version # timeout=10
>>  > git fetch --tags --progress http://gitlab.os.hr4.local/jen
>> kins/nodejs-ex-1.git +refs/heads/*:refs/remotes/origin/*
>>  > git rev-parse null^{commit} # timeout=10
>> hudson.plugins.git.GitException: Command "git rev-parse null^{commit}"
>> returned status code 128:
>> stdout: null^{commit}
>>
>> stderr: fatal: ambiguous argument 'null^{commit}': unknown revision or
>> path not in the working tree.
>> Use '--' to separate paths from revisions, like this:
>> 'git <command> [<revision>...] -- [<file>...]'
>>
>> at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandI
>> n(CliGitAPIImpl.java:1799)
>> at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandI
>> n(CliGitAPIImpl.java:1772)
>> at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandI
>> n(CliGitAPIImpl.java:1768)
>> at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(
>> CliGitAPIImpl.java:1415)
>> at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(
>> CliGitAPIImpl.java:1427)
>> at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(
>> CliGitAPIImpl.java:686)
>> at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
>> at hudson.plugins.git.RevisionParameterAction.toRevision(Revisi
>> onParameterAction.java:98)
>> at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:991)
>> at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1108)
>> at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(
>> SCMStep.java:109)
>> at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.
>> create(CpsScmFlowDefinition.java:130)
>> at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.
>> create(CpsScmFlowDefinition.java:59)
>> at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowR
>> un.java:232)
>> at hudson.model.ResourceController.execute(ResourceController.java:97)
>> at hudson.model.Executor.run(Executor.java:405)
>> Finished: FAILURE
>>
>> It works when I take generic webhook URL however it engages a build
>> regardless of which branch I'm commiting the change to - which is no ideal.
>>
>> Any ideas why commit number in the code above is null ?
>>
>
> can you share the build json associated w/ the build that was kicked off
> by the webhook trigger?
>
> also what version of the openshift sync plugin are you running and what
> version is your openshift cluster?
>
>
>
>
>>
>> Thanks
>> TH
>>
>> _______________________________________________
>> users mailing list
>> [email protected]
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>>
>
>
> --
> Ben Parees | OpenShift
>
>
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to