This plugin integrates the incapptic Connect platform with Jenkins. Artifacts are automatically uploaded to the incapptic Connect platform after each successful output from Jenkins CI.
In order to make use of pipeline plugin, the Jenkinsfile should include the following command at any stage of deployment, after the respective artifact has been created.
#!groovy
node {
stage('notify') {
uploadToIncappticConnect url: 'https://instance.incapptic.net/apps/upload-artifact', appId: 1, mask: '**/app-release-unsigned.apk'
}
}
Even though the personal token can also be provided as a token
parameter,
this is strongly discouraged. Instead a token
parameter
should be added to the project configuration.
To do this, select the checkbox that says "This project is parametrized",
and then add a parameter with the default value.
The plugin parameter has precedence over the project parameter.
This parameter should point to incapptic Connects' upload service,
typically with the path value /apps/upload-artifact.
The personal token configured in incapptic Connects' administration panel.
The (numerically valued) ID of the application that you are uploading artifacts to. This application must have its API enabled through incapptic Connects' admin interface.
Used to specify the file location of an artifact to be sent to the incapptic Connect service. This can simply be an absolute path but can also include expandable wildcard patterns.
Standard plugin configurations need to specify a post build action with parameters:
- url
- token
- appId
- mask
They have the same meaning as in the pipeline plugin.
This is short summary of the following manuals:
- Plugin tutorial
- Making the plugin compatible with pipelines
- Hosting account
- Hosting plugins
- Releasing
- FAQ
Compiling the plugin requires mvn
intallation on top of jdk 1.8
. To build a plugin, run mvn install
.
This will create the file ./target/incapptic-connect-uploader.jar
that you can deploy to Jenkins using
Advanced
tab in Manage plugins
section of your Jenkins installation.
This plugin supports both pipeline and notifier modes. Entrypoints for development are perform
methods:
public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)
throws IOException, InterruptedException
is the entrypoint for pipeline plugin, while
public void perform(@Nonnull Run<?, ?> run, @Nonnull FilePath filePath, @Nonnull Launcher launcher,
@Nonnull TaskListener taskListener) throws InterruptedException, IOException
is used by Notifier plugin
.
Distribution of Jenkins plugin to official repositories requires:
- jenkins-ci.org account,
- upload permissions, granted by contribution to
https://github.com/jenkins-infra/repository-permissions-updater
, - proper plugin release to SNAPSHOT repository by means of
mvn deploy
command, which might require passing jenkins account username and encrypted password; this does not require upload permissions from the point above, - proper plugin release to RELEASE repository by means of
mvn release:prepare release:perform
command, which might require passing jenkins account username and encrypted password as well.
incapptic Connect GmbH