While I was searching for how I use Artifactory as Debian repository, I came across official Artifactory documentation: How do I cache artifacts from a remote Debian repository?. But, it did not work because there is no apt-add-repository
command as documentation mentioned. I had to figure out the correct way by myself and following steps worked for me.
While building a Maven project on Jenkins, environment variables(e.g. GIT_COMMIT, SVN_REVISION) set by Jenkins can be added to MANIFEST.MF
file residing in JAR and WAR files.
For example, if we want to add Jenkins build number, Jenkins build url, Git commit id and custom implementation version to MANIFEST.MF
of a JAR file, we can use:
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
By following https://blog.josephscott.org/2011/10/14/timing-details-with-curl/, create curl-format.txt
having following lines:
\n
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
When the code is ready to be released:
- Add change log to
CHANGELOG.md
- Commit and push it to GitHub
- Create release tag(e.g. 1.1) by providing changes added to
CHANGELOG.md
:- Create
tag.md
file and copy target release changes fromCHANGELOG.md
. git tag -F tag.md 1.1
git push --tags
- Create
- Visit the tag's page in GitHub
If we have myapp.jar
file that has following MANIFEST.MF
inside,
Manifest-Version: 1.0
Implementation-Title: My Project
Implementation-Version: 1.0.0-SNAPSHOT.18b47fff41d30758a2756c13844026d
fee323b50.5
Jenkins-Build-Number: 8
Archiver-Version: Plexus Archiver
WARNING: Using this is dangerous in a collaborative environment: you're rewriting history
References:
$ git clone $URL