docs: cleanup post-release-* trigger documentation

This commit is contained in:
Jose Diaz-Gonzalez committed 2020-02-18 01:32:41 -05:00
1 parent 8e4dc1c2d0
commit 9d3785147e
1 file changed
+7 -13
+7 -13
View File
@@ -971,6 +971,8 @@ haproxy-build-config "$APP"
### `post-release-buildpack` ### `post-release-buildpack`
> Warning: Image mutation in this trigger may result in an invalid run state, and is heavily discouraged.
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to apps using buildpacks. - Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to apps using buildpacks.
- Invoked by: `internal function dokku_release() (release phase)` - Invoked by: `internal function dokku_release() (release phase)`
- Arguments: `$APP $IMAGE_TAG` - Arguments: `$APP $IMAGE_TAG`
@@ -978,27 +980,19 @@ haproxy-build-config "$APP"
```shell ```shell
#!/usr/bin/env bash #!/usr/bin/env bash
# Installs a package specified by the `CONTAINER_PACKAGE` env var
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG) APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP" verify_app_name "$APP"
dokku_log_info1 "Installing $CONTAINER_PACKAGE..." # TODO
CMD="cat > gm && \
dpkg -s CONTAINER_PACKAGE >/dev/null 2>&1 || \
(apt-get update && apt-get install -y CONTAINER_PACKAGE && apt-get clean)"
CID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
test $(docker wait $CID) -eq 0
DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.app-name=$APP")
docker commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" $CID $IMAGE >/dev/null
``` ```
### `post-release-dockerfile` ### `post-release-dockerfile`
> Warning: Image mutation in this trigger may result in an invalid run state, and is heavily discouraged.
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to apps using a dockerfile. - Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to apps using a dockerfile.
- Invoked by: `internal function dokku_release() (release phase)` - Invoked by: `internal function dokku_release() (release phase)`
- Arguments: `$APP $IMAGE_TAG` - Arguments: `$APP $IMAGE_TAG`
@@ -1183,9 +1177,9 @@ CMD="cat > gm && \
dpkg -s graphicsmagick >/dev/null 2>&1 || \ dpkg -s graphicsmagick >/dev/null 2>&1 || \
(apt-get update && apt-get install -y graphicsmagick && apt-get clean)" (apt-get update && apt-get install -y graphicsmagick && apt-get clean)"
CID=$(docker run "${DOCKER_COMMIT_LABEL_ARGS[@]}" -i -a stdin $IMAGE /bin/bash -c "$CMD") CID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.app-name=$APP")
test $(docker wait $CID) -eq 0 test $(docker wait $CID) -eq 0
DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.app-name=$APP")
docker commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" $CID $IMAGE >/dev/null docker commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" $CID $IMAGE >/dev/null
``` ```