An open API service indexing awesome lists of open source software.

https://github.com/enrico204/portainer-git-redeploy

A very small utility for triggering the Git re-deploy for stacks in Portainer via CLI.
https://github.com/enrico204/portainer-git-redeploy

devops git portainer portainer-api

Last synced: 8 months ago
JSON representation

A very small utility for triggering the Git re-deploy for stacks in Portainer via CLI.

Awesome Lists containing this project

README

          

# Portainer Git Redeploy

A very small utility for triggering the Git re-deploy for stacks in Portainer
via CLI. It was meant to be used in CD pipelines.

## Usage (OCI/docker container)

A container image is available on Docker Hub: `docker.io/enrico204/portainer-git-redeploy`

## Usage (executable)

Example with environment variables:
```shell
$ export PORTAINER_STACK_ID=1
$ export PORTAINER_URL=https://portainer:9443
$ export PORTAINER_ACCESS_TOKEN=abcdef
$ portainer-git-redeploy
```

Example using CLI options (**note that writing your access token to the CLI is a BAD IDEA**):
```shell
$ portainer-git-redeploy -url https://portainer:9443 -stack-id 1 -access-token abcdef
```

To use a custom certificate file, use `PORTAINER_SSL_CERT_FILE` to appending a
certificate to the system CA store, or `SSL_CERT_FILE` for replacing the whole
CA store:

```shell
$ export PORTAINER_SSL_CERT_FILE=~/certificate.pem
$ portainer-git-redeploy -url https://portainer:9443 -stack-id 1 -access-token abcdef
```

# LICENSE

See [LICENSE](LICENSE).