From ecf7bb2af426f29c55b193315fe4ccaaec27d294 Mon Sep 17 00:00:00 2001 From: Tortue Torche <126358-tortuetorche@users.noreply.gitlab.com> Date: Thu, 18 Feb 2021 14:04:38 +0100 Subject: [PATCH] Bump psu version to 1.1.0 Update CHANGELOG and documentation --- CHANGELOG.md | 20 +++++++++++++++++++- README.md | 34 +++++++++++++++++++--------------- docs/README.md | 2 +- psu | 2 +- 4 files changed, 40 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b27033..01931a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,16 +5,31 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [1.1.0] - 2021-02-18 ### Changed - Use [Traefik 2.2](https://docs.traefik.io/v2.2/) instead of [Traefik 2.1](https://docs.traefik.io/v2.1/) for testing ### Fixed - Changelog link for `psu` version `1.1.0-alpha` +- Fix `cryptography` building error ## [1.1.0-alpha] - 2020-07-29 ### Changed - Upgrade operating system of Docker based images, with [Alpine 3.12](https://hub.docker.com/_/alpine) and [Debian 10](https://hub.docker.com/_/debian) +### Fixed +- Docker build should fail if a shell command failed + +## [1.0.7] - 2021-02-16 +### Fixed +- Remove useless packages after building `docker-compose`, for the main Docker image + +## [1.0.6] - 2021-02-16 +### Fixed +- Docker build should fail if a shell command failed +- Fix `cryptography` building error + ## [1.0.5] - 2020-07-29 ### Added - Test PSU with Portainer [1.24.1](https://app.swaggerhub.com/apis/deviantony/Portainer/1.24.1) API @@ -91,8 +106,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Debug mode - Strict mode -[Unreleased]: https://gitlab.com/psuapp/psu/compare/v1.1.0-alpha...1-1-next +[Unreleased]: https://gitlab.com/psuapp/psu/compare/v1.1.0...1-1-stable +[1.1.0]: https://gitlab.com/psuapp/psu/-/tags/v1.1.0 [1.1.0-alpha]: https://gitlab.com/psuapp/psu/-/tags/v1.1.0-alpha +[1.0.7]: https://gitlab.com/psuapp/psu/-/tags/v1.0.7 +[1.0.6]: https://gitlab.com/psuapp/psu/-/tags/v1.0.6 [1.0.5]: https://gitlab.com/psuapp/psu/-/tags/v1.0.5 [1.0.4]: https://gitlab.com/psuapp/psu/-/tags/v1.0.4 [1.0.3]: https://gitlab.com/psuapp/psu/-/tags/v1.0.3 diff --git a/README.md b/README.md index aecbbfa..9e14a6d 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Docker Pulls](https://img.shields.io/docker/pulls/psuapp/psu.svg)](https://hub.docker.com/r/psuapp/psu/) [![Microbadger](https://images.microbadger.com/badges/image/psuapp/psu.svg)](http://microbadger.com/images/psuapp/psu "Image size") -[![pipeline status](https://gitlab.com/psuapp/psu/badges/1-0-stable/pipeline.svg)](https://gitlab.com/psuapp/psu/commits/1-0-stable) +[![pipeline status](https://gitlab.com/psuapp/psu/badges/1-1-stable/pipeline.svg)](https://gitlab.com/psuapp/psu/commits/1-1-stable) Bash script to deploy/update/remove stacks in a [Portainer](https://portainer.io/) instance from a [docker-compose](https://docs.docker.com/compose) [yaml file](https://docs.docker.com/compose/compose-file). @@ -55,7 +55,7 @@ For Debian and similar apt-powered systems: `apt install bash httpie jq`. If you don't want or can't install `psu` and its dependencies, you can run it with the default [published Docker image](https://hub.docker.com/r/psuapp/psu), like this: ```bash -docker run psuapp/psu:1.0 deploy ... +docker run psuapp/psu:1.1 deploy ... ``` > **Note**: Docker images are also available on [GitLab](https://gitlab.com/psuapp/psu/container_registry). @@ -66,8 +66,11 @@ For detailed instructions, see [How to use](#how-to-use) section. Published Docker images are [tagged](https://hub.docker.com/r/psuapp/psu/tags) matching [GitLab tags](https://gitlab.com/psuapp/psu/-/tags): +- `1`, `1.1`, `1.1.0` -> [`v1.1.0`](https://gitlab.com/psuapp/psu/-/tags/v1.1.0) - `1.1.0-alpha` -> [`v1.1.0-alpha`](https://gitlab.com/psuapp/psu/-/tags/v1.1.0-alpha) -- `1`, `1.0`, `1.0.5` -> [`v1.0.5`](https://gitlab.com/psuapp/psu/-/tags/v1.0.5) +- `1.0`, `1.0.7` -> [`v1.0.7`](https://gitlab.com/psuapp/psu/-/tags/v1.0.7) +- `1.0.6` -> [`v1.0.6`](https://gitlab.com/psuapp/psu/-/tags/v1.0.6) +- `1.0.5` -> [`v1.0.5`](https://gitlab.com/psuapp/psu/-/tags/v1.0.5) - `1.0.4` -> [`v1.0.4`](https://gitlab.com/psuapp/psu/-/tags/v1.0.4) - `1.0.3` -> [`v1.0.3`](https://gitlab.com/psuapp/psu/-/tags/v1.0.3) - `1.0.2` -> [`v1.0.2`](https://gitlab.com/psuapp/psu/-/tags/v1.0.2) @@ -82,25 +85,26 @@ Published Docker images are [tagged](https://hub.docker.com/r/psuapp/psu/tags) m The `core` variant doesn't include `docker-compose`, so it's a bit smaller. But you can't lint Docker compose/stack file before deploying a stack. -- `1.1.0-alpha-core` -> [`v1.1.0-alpha`](https://gitlab.com/psuapp/psu/-/tags/v1.1.0-alpha) -- `1-core`, `1.0-core`, `1.0.5-core`, `core` -> [`v1.0.5`](https://gitlab.com/psuapp/psu/-/tags/v1.0.5) +- `1-core`, `1.1-core`, `1.1.0-core`, `core` -> [`v1.1.0`](https://gitlab.com/psuapp/psu/-/tags/v1.1.0) +- `1.0-core`, `1.0.7-core` -> [`v1.0.7`](https://gitlab.com/psuapp/psu/-/tags/v1.0.7) The `debian` and `debian-core` variants use [Debian](https://www.debian.org) instead of [Alpine](https://alpinelinux.org/) as base image for `psu`. -- `1.1.0-alpha-debian` -> [`v1.1.0-alpha`](https://gitlab.com/psuapp/psu/-/tags/v1.1.0-alpha) -- `1.1.0-alpha-debian-core` -> [`v1.1.0-alpha`](https://gitlab.com/psuapp/psu/-/tags/v1.1.0-alpha) -- `1-debian`, `1.0-debian`, `1.0.5-debian`, `debian` -> [`v1.0.5`](https://gitlab.com/psuapp/psu/-/tags/v1.0.5) -- `1-debian-core`, `1.0-debian-core`, `1.0.5-debian-core`, `debian-core` -> [`v1.0.5`](https://gitlab.com/psuapp/psu/-/tags/v1.0.5) + +- `1-debian`, `1.0-debian`, `1.1.0-debian`, `debian` -> [`v1.1.0`](https://gitlab.com/psuapp/psu/-/tags/v1.1.0) +- `1-debian-core`, `1.0-debian-core`, `1.1.0-debian-core`, `debian-core` -> [`v1.1.0`](https://gitlab.com/psuapp/psu/-/tags/v1.1.0) +- `1.0-debian`, `1.0.7-debian`, -> [`v1.0.7`](https://gitlab.com/psuapp/psu/-/tags/v1.0.7) +- `1.0-debian-core`, `1.0.7-debian-core` -> [`v1.0.7`](https://gitlab.com/psuapp/psu/-/tags/v1.0.7) #### Testing/debugging: For testing/debugging, you can use this Docker image in interactive mode, to run any commands inside the container: ```bash -docker run -v $(pwd)/docker-compose.yml:/docker-compose.yml -it --rm --entrypoint bash psuapp/psu:1.0 +docker run -v $(pwd)/docker-compose.yml:/docker-compose.yml -it --rm --entrypoint bash psuapp/psu:1.1 # Run any commands here! E.g. $ psu --version -Portainer Stack Utils, version 1.1.0-alpha +Portainer Stack Utils, version 1.1.0 License GPLv3: GNU GPL version 3 ``` @@ -133,7 +137,7 @@ bash ./psu rm --user admin --password password --url https://portainer.local --n **With Docker:** ```bash -docker run -v $(pwd)/docker-compose.yml:/docker-compose.yml -v $(pwd)/.env:/.env psuapp/psu:1.0 deploy --user admin --password password --url https://portainer.local --name mystack --compose-file docker-compose.yml --env-file .env +docker run -v $(pwd)/docker-compose.yml:/docker-compose.yml -v $(pwd)/.env:/.env psuapp/psu:1.1 deploy --user admin --password password --url https://portainer.local --name mystack --compose-file docker-compose.yml --env-file .env ``` ### With flags @@ -161,7 +165,7 @@ bash ./psu rm -u admin -p password -l https://portainer.local -n mystack **With Docker:** ```bash -docker run -v $(pwd)/docker-compose.yml:/docker-compose.yml -v $(pwd)/.env:/.env psuapp/psu:1.0 deploy -u admin -p password -l https://portainer.local -n mystack -c docker-compose.yml -g .env +docker run -v $(pwd)/docker-compose.yml:/docker-compose.yml -v $(pwd)/.env:/.env psuapp/psu:1.1 deploy -u admin -p password -l https://portainer.local -n mystack -c docker-compose.yml -g .env ``` ### With envvars @@ -203,13 +207,13 @@ bash ./psu **With Docker:** ```bash -docker run -v $(pwd)/docker-compose.yml:/docker-compose.yml -v $(pwd)/.env:/.env -e ACTION="deploy" -e PORTAINER_USER="admin" -e PORTAINER_PASSWORD="password" -e PORTAINER_URL="https://portainer.local" -e PORTAINER_STACK_NAME="mystack" -e DOCKER_COMPOSE_FILE="docker-compose.yml" -e ENVIRONMENT_VARIABLES_FILE=".env" psuapp/psu:1.0 +docker run -v $(pwd)/docker-compose.yml:/docker-compose.yml -v $(pwd)/.env:/.env -e ACTION="deploy" -e PORTAINER_USER="admin" -e PORTAINER_PASSWORD="password" -e PORTAINER_URL="https://portainer.local" -e PORTAINER_STACK_NAME="mystack" -e DOCKER_COMPOSE_FILE="docker-compose.yml" -e ENVIRONMENT_VARIABLES_FILE=".env" psuapp/psu:1.1 ``` ## Documentation
-For advanced usage, see the full PSU documentation. +For advanced usage, see the full PSU documentation.
For detailed instructions, see the [CLI Commands](docs/README.md) documentation. diff --git a/docs/README.md b/docs/README.md index 82e5f46..af89207 100644 --- a/docs/README.md +++ b/docs/README.md @@ -729,5 +729,5 @@ The `psu` definition of a job is a Swarm [service](https://docs.docker.com/engin Using a job is useful when you want to have a service who run a script (e.g. database migration). And shutdown this service when its script is successfully executed. -See the service named `job` in the [`docker-stack-web-app.yml`](https://gitlab.com/psuapp/psu/tree/v1.1.0-alpha/tests/dockerfiles/docker-stack-web-app.yml) file, for a real use case. +See the service named `job` in the [`docker-stack-web-app.yml`](https://gitlab.com/psuapp/psu/tree/v1.1.0/tests/dockerfiles/docker-stack-web-app.yml) file, for a real use case. It has both a container's label `job-name` and a restart policy set to `none`. diff --git a/psu b/psu index b62baee..c544873 100644 --- a/psu +++ b/psu @@ -27,7 +27,7 @@ set -e # None # ############################ main() { - VERSION="1.1.0-alpha" + VERSION="1.1.0" OPTIONS_TABLE=( # option_key;flag_text;option_text;description