No description, website, or topics provided.
Clone or download
Pull request Compare This branch is 58 commits ahead of javidgon:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/main
.gitignore
Jenkinsfile
LICENSE
PULL_REQUEST_TEMPLATE.md
README.md
pom.xml
test.json

README.md

incapptic Connect Uploader Plugin

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.

Usage - Pipeline Plugin

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.

Parameters

url

This parameter should point to incapptic Connects' upload service, typically with the path value /apps/upload-artifact.

token

The personal token configured in incapptic Connects' administration panel.

appId

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.

mask

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.

Usage - Standard Plugin

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.

Packaging, development and distribution

This is short summary of the following manuals:

Packaging

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.

Development

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

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