jenkinsci / jenkinsci/debian-package-builder-plugin

parseChangelog always return null when getting "Version", "Distribution" and "Source"

Open
#53 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
28
Forks
28
PR merge metrics
No merged PRs in 30d

Description

HI,

I'm trying to use this plugin but it is always returning null for the values is getting at function parseChangelog, as it's seen in my log:

```
bash -c 'cd "/opt/jenkins/workspace/release-deb-test/web/debian" && dpkg-parsechangelog -lchangelog'
[debian-package-builder] Determined latest version to be null
...
+ dch --check-dirname-level 0 -b --distribution null --newVersion 2016.3.3+dev19 -- 'Build #19. Started by an SCM change.'
dch warning: Recognised distributions are:
{precise,trusty,wily,xenial}{,-updates,-security,-proposed,-backports} and UNRELEASED.
Using your request anyway.
dch: Did you see that warning? Press RETURN to continue...
...
ERROR: Build step failed with exception
java.lang.IllegalArgumentException: Null value not allowed as an environment variable: DEBIAN_SOURCE_PACKAGE
```

If dpkg-parsechangelog is executed over my changelog, I obtain the following:

```
Source: package
Version: 2016.3.3
Distribution: trusty
Urgency: low
Maintainer: SysAdmins
Date: Tue, 08 Mar 2016 09:03:49 +0100
Changes:
package (2016.3.3) trusty; urgency=low
.
* Initial debian realase.
```

I inspected parseChangelog function and it seems correct to me; the only thing makes me suspect is the function `runner.runCommandForOutput`.

Finally, my java version is the following:

```
ubuntu@build-1:/opt/jenkins/workspace$ java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
```

Greetings,
Pablo

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.