Skip to main content

CLI Confluence/Jira Plugin uploader

Project description

pluploader

PyPI version Upload Python Package

pluploader

A advanced command-line plugin uploader/installer/manager for atlassian server and cloud instances (Confluence/Jira) written in python(3).

Installation

pipx (recommended)

pipx install pluploaderng

pip

pip3 install pluploaderng

Docker

If you do not want to install python3 or pip, you can also pull the latest docker image from dockerhub or github:

docker pull craftamap/pluploader:latest
# OR
docker pull ghcr.io/craftamap/pluploader/pluploader:v0.8.3

pluploaderng can then be run by executing

docker run -v "$(pwd)":/workdir -it craftamap/pluploader:v0.8.3

Usage

For a in-depth explanation, see pluploader --help

ℹ This documentation describes the master branch, and not (necessarily) the latest release.

Global Options

You can specify various global options:

  • --base-url <base-url>, default: http://localhost:8090
    For Confluence Cloud Instances, make sure to append the path, /wiki, to your base url.
  • --user <username>, default: admin
  • --password <password>, default: admin
    It is recommended to use Access Tokens instead of your password. Newer versions of the server / datacenter products support creating Access Tokens called Personal Access Tokens - Read more about them here.
    For cloud instances, it is required to use Access Tokens. Those are called API Tokens and can be created here. If you do not want to put your password or access token in the command line plaintext, you can also use...
  • --ask-for-password

All Global Options can be overwritten by using a configuration file or enviroment variables. See more in Configuration and Environment variables

Configuration

If you don't want to write the username or password (or any other global parameter) each time, you can use a filed called .pluprc, either placed in your current maven project or/and in your home directory. A example looks like this:

base_url: https://example.com:8090
user: admin
password: admin

Environment variables

You can also specify username, password and base url by using PLUP_USER, PLUP_PASSWORD and PLUP_BASEURL.

Uploading plugins

If you are in a maven project, the basic usage is fairly simple. Just type:

pluploaderng --user admin --password admin

The pluploader then uploads and enables the current artifact specified in the pom.xml

If you are not in a maven directory currently, but you want to upload a specific file, you can also use the -f plugin.jar flag.

If you want to confirm your upload, you can also use the -i / --interactive flag.

It is recommended to use the pluploader with maven. The usage looks like:

atlas-mvn clean package && pluploader

Installing apps from the marketplace

Uploading  gifs

pluploader supports downloading apps from the atlassian marketplace to your local machine and installing them afterwards. You need to supply either --mpac-key, which is the normal addon-key, or --mpac-id (experimental), which is the numeric id of an marketplace id (72307 https://marketplace.atlassian.com/apps/72307)

pluploaderng --mpac-key com.atlassian.confluence.extra.team-calendars

NOTE: If you specify one of the global options, you need to add the install-command:

pluploaderng --base-url https://your-confluence.com:8090 install

You can work around this by using the configuration file or by using environment variables.

Installing a connect descriptor to a cloud instance.

Uploading to cloud

pluploader also supports installing atlassian-connect plugins to cloud instances by enabling cloud support with --cloud and providing the descriptor url with --plugin-uri.

pluploaderng install --cloud --plugin-uri https://your.ngrok.here

Managing plugins

Managing plugins

pluploader can also replace the usage of the universal plugin manager completely by using the subcommands list, info, enable, disable, and uninstall (enable and disable are not supported in the atlassian cloud).

To get a list of all installed plugins of the configured instance, just type:

pluploaderng list

A green checkmark indicates that the plugin is enabled, while a exclamation mark indicates that the plugin is disabled.

In order to retrieve more information about a specific plugin, you can use the command info.

pluploaderng info com.example.plugin.key

The plugin key can be omitted in a maven directory, if the parameter atlassian.plugin.key is set in plaintext.

The commands enable, disable or uninstall follow the same syntax.

Safe Mode

pluploader also supports disabling or enabling all apps using Safe Mode (does not work in cloud).

To retrieve the status if safe-mode is enabled at the moment, use

pluploaderng safe-mode status

You can enable and disable safe mode by using

pluploaderng safe-mode enable

And

pluploaderng safe-mode disable
# OR
pluploaderng safe-mode disable --keep-state

Licenses

You can also use the pluploader to get and set licenses for your plugins.

To get the current license information:

pluploaderng license info com.example.plugin.key

To set a license, use the update functionality.

pluploaderng license update com.example.plugin.key --license "AAA..."

ℹ Pro tip: Use xargs to read a license from a file by using

cat license.txt | xargs pluploader license update --license

You can also apply timebomb licenses

by using

pluploaderng license timebomb com.example.plugin.key --timebomb threehours

You can choose between 3 hours (threehours), 60 seconds (sixtyseconds) and 10 seconds (tenseconds)

To remove an applied license, you can use:

pluploaderng license delete com.example.plugin.key

Access Tokens (Cloud Development Licenses)

You can also use pluploader to list, get, update/set and delete access tokens of apps.

pluploaderng license access-token list
pluploaderng license access-token info com.example.plugin.key
pluploaderng license access-token update com.example.plugin.key --token "token"
pluploaderng license access-token delete com.example.plugin.key

API

You can interact with the HTTP/REST-API of your configured instance by using pluploader api ENDPOINT [BODY]. The arguments work a bit like the well-known tool curl. You can use -X METHOD to choose the HTTP method and -H "HEADER-NAME: HEADER-VALUE" to add a HTTP header.

pluploaderng api -X POST -H "content-type: application/json" rest/api/content/ '{ "type":"page", "title":"My Test Page", "space":{"key":"TEST"}, "body":{ "storage": { "value":"<p>This is a new page</p>", "representation":"storage" } } }'

RPC

pluploader rpc allows interaction with the (deprecated, but still functional) confluence rpc api by providing the method name and it's required arguments. You do not need to care about the rpc-authentication, as this command takes care of it. Therefore, you can also obmit the first parameter (String token) required for many commands.

pluploaderng rpc addUser '{"name":"charlie", "fullname": "charlie", "email":"charlie@charlie"}' charlie

Scheduled Jobs (Confluence - Experimental)

ℹ This feature is currently experimental and only works in specific version of Confluence (tested on Confluence 7.5).

Pluploader can also be used to retrieve information about confluence jobs and execute them.

You can grab a list of all jobs by running

pluploaderng job list

Available options are:

  • --hide-default - Hides confluence internal jobs
  • --print-all-infos - print more informations

You can also run jobs by running

pluploaderng job run

Get more information about a job by running

pluploaderng job info

And disable or enable jobs by running

pluploaderng job enable
# AND
pluploaderng job disable

A job can be specified by either using --id <job id> or by using --idx <job index in list>. If no job is specified, you will be asked interactively.

Development

pluploader uses poetry as it's package manager. As a command line argument parser, Typer is used.

FAQ

Why would I use the pluploader over X?

Of course, you can use whatever tool you want to.

Why would I use the pluploader over the UPM?

It's a faster workflow.

Why would I use the pluploader over the Atlas-CLI?

atlas-cli is awesome, but sadly it's deprecated. Also since you can use your own maven command with pluploader, you therefore can skip tests, make a mvn clean, and many more.

In general, pluploader is just a bit more flexiable.

Why would I use the pluploader over QuickReload?

QuickReload is cool, but some of us prefer to use docker instances or atlas-standalone rather than atlas-run.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pluploaderng-0.9.2.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pluploaderng-0.9.2-py3-none-any.whl (34.5 kB view details)

Uploaded Python 3

File details

Details for the file pluploaderng-0.9.2.tar.gz.

File metadata

  • Download URL: pluploaderng-0.9.2.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Linux/6.13.5-2-MANJARO

File hashes

Hashes for pluploaderng-0.9.2.tar.gz
Algorithm Hash digest
SHA256 1ec3823078044def1ed3997d2cd3381bd47e4b5aad9153c02b2865265302a0d2
MD5 5142d36241fa493b121f16e7a6b99566
BLAKE2b-256 b7b54662d35844e1aa4f68e1148a2d45d761a6dce4a355bbabe53f242308620d

See more details on using hashes here.

File details

Details for the file pluploaderng-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: pluploaderng-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 34.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Linux/6.13.5-2-MANJARO

File hashes

Hashes for pluploaderng-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cc4a827bbbbdc148d58217b16f54f34d994de17adc11310d62ad4a9893db9fc5
MD5 b14b622533ddc0fabc3e395e2024deb5
BLAKE2b-256 8298e6f616e57c4377d6ace16921ef022b95ff71844b048f7239a94c2a969007

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page