chore: deprecate the builder-specific post-build-* triggers in favor of a global post-build trigger
The pre-build trigger takes a `BUILDER_TYPE` parameter, allowing folks to perform specific actions as needed.
This commit is contained in:
@@ -7,5 +7,10 @@
|
|||||||
- pre-release-dockerfile
|
- pre-release-dockerfile
|
||||||
- pre-release-lambda
|
- pre-release-lambda
|
||||||
- pre-release-pack
|
- pre-release-pack
|
||||||
|
- The following `post-build-*` plugin triggers have been deprecated and will be removed in the next release. Users should instead trigger the `post-build` plugin trigger.
|
||||||
|
- post-build-buildpack
|
||||||
|
- post-build-dockerfile
|
||||||
|
- post-build-lambda
|
||||||
|
- post-build-pack
|
||||||
|
|
||||||
## Removals
|
## Removals
|
||||||
|
|||||||
@@ -1473,8 +1473,26 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `post-build`
|
||||||
|
|
||||||
|
- Description: Allows you to run commands after the build image is create for a given app.
|
||||||
|
- Invoked by: `internal function dokku_build() (build phase)`
|
||||||
|
- Arguments: `$BUILDER_TYPE $APP $SOURCECODE_WORK_DIR`
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
```
|
||||||
|
|
||||||
### `post-build-buildpack`
|
### `post-build-buildpack`
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> Deprecated, please use `post-build` instead
|
||||||
|
|
||||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to apps using buildpacks.
|
- Description: Allows you to run commands after the build image is create for a given app. Only applies to apps using buildpacks.
|
||||||
- Invoked by: `internal function dokku_build() (build phase)`
|
- Invoked by: `internal function dokku_build() (build phase)`
|
||||||
- Arguments: `$APP` `$SOURCECODE_WORK_DIR`
|
- Arguments: `$APP` `$SOURCECODE_WORK_DIR`
|
||||||
@@ -1488,26 +1506,10 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
# TODO
|
# TODO
|
||||||
```
|
```
|
||||||
|
|
||||||
### `post-build-pack`
|
### `post-build-dockerfile`
|
||||||
|
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
> The pack plugin trigger apis are under development and may change
|
> Deprecated, please use `post-build` instead
|
||||||
> between minor releases until the 1.0 release.
|
|
||||||
|
|
||||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to apps using pack.
|
|
||||||
- Invoked by: `internal function dokku_build() (build phase)`
|
|
||||||
- Arguments: `$APP` `$SOURCECODE_WORK_DIR`
|
|
||||||
- Example:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|
||||||
|
|
||||||
# TODO
|
|
||||||
```
|
|
||||||
|
|
||||||
### `post-build-dockerfile`
|
|
||||||
|
|
||||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to apps using a dockerfile.
|
- Description: Allows you to run commands after the build image is create for a given app. Only applies to apps using a dockerfile.
|
||||||
- Invoked by: `internal function dokku_build() (build phase)`
|
- Invoked by: `internal function dokku_build() (build phase)`
|
||||||
@@ -1524,6 +1526,9 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
|
|
||||||
### `post-build-lambda`
|
### `post-build-lambda`
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> Deprecated, please use `post-build` instead
|
||||||
|
|
||||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to apps using lambda.
|
- Description: Allows you to run commands after the build image is create for a given app. Only applies to apps using lambda.
|
||||||
- Invoked by: `internal function dokku_build() (build phase)`
|
- Invoked by: `internal function dokku_build() (build phase)`
|
||||||
- Arguments: `$APP` `$SOURCECODE_WORK_DIR`
|
- Arguments: `$APP` `$SOURCECODE_WORK_DIR`
|
||||||
@@ -1537,6 +1542,24 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
# TODO
|
# TODO
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `post-build-pack`
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> Deprecated, please use `post-build` instead
|
||||||
|
|
||||||
|
- Description: Allows you to run commands after the build image is create for a given app. Only applies to apps using pack.
|
||||||
|
- Invoked by: `internal function dokku_build() (build phase)`
|
||||||
|
- Arguments: `$APP` `$SOURCECODE_WORK_DIR`
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
```
|
||||||
|
|
||||||
### `post-certs-remove`
|
### `post-certs-remove`
|
||||||
|
|
||||||
- Description: Allows you to run commands after a cert is removed
|
- Description: Allows you to run commands after a cert is removed
|
||||||
|
|||||||
@@ -38,7 +38,11 @@ trigger-builder-dockerfile-builder-build() {
|
|||||||
"$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" ${DOKKU_DOCKER_BUILD_OPTS} -t $IMAGE .
|
"$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" ${DOKKU_DOCKER_BUILD_OPTS} -t $IMAGE .
|
||||||
|
|
||||||
plugn trigger ports-set-detected "$APP" "$(fn-builder-dockerfile-get-detect-port-map "$APP" "$IMAGE" "$SOURCECODE_WORK_DIR/Dockerfile")"
|
plugn trigger ports-set-detected "$APP" "$(fn-builder-dockerfile-get-detect-port-map "$APP" "$IMAGE" "$SOURCECODE_WORK_DIR/Dockerfile")"
|
||||||
plugn trigger post-build-dockerfile "$APP"
|
if fn-plugn-trigger-exists "post-build-dockerfile"; then
|
||||||
|
dokku_log_warn "Deprecated: please upgrade plugin to use 'post-build' plugin trigger instead of post-build-dockerfile"
|
||||||
|
plugn trigger post-build-dockerfile "$APP"
|
||||||
|
fi
|
||||||
|
plugn trigger post-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
trigger-builder-dockerfile-builder-build "$@"
|
trigger-builder-dockerfile-builder-build "$@"
|
||||||
|
|||||||
@@ -95,7 +95,11 @@ trigger-builder-herokuish-builder-build() {
|
|||||||
# ensure we have a port mapping
|
# ensure we have a port mapping
|
||||||
plugn trigger ports-configure "$APP"
|
plugn trigger ports-configure "$APP"
|
||||||
plugn trigger ports-set-detected "$APP" "http:$(plugn trigger ports-get-property "$APP" proxy-port):5000"
|
plugn trigger ports-set-detected "$APP" "http:$(plugn trigger ports-get-property "$APP" proxy-port):5000"
|
||||||
plugn trigger post-build-buildpack "$APP" "$SOURCECODE_WORK_DIR"
|
if fn-plugn-trigger-exists "post-build-buildpack"; then
|
||||||
|
dokku_log_warn "Deprecated: please upgrade plugin to use 'post-build' plugin trigger instead of post-build-buildpack"
|
||||||
|
plugn trigger post-build-buildpack "$APP" "$SOURCECODE_WORK_DIR"
|
||||||
|
fi
|
||||||
|
plugn trigger post-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
trigger-builder-herokuish-builder-build "$@"
|
trigger-builder-herokuish-builder-build "$@"
|
||||||
|
|||||||
@@ -39,7 +39,11 @@ trigger-builder-lambda-builder-build() {
|
|||||||
# ensure we have a port mapping
|
# ensure we have a port mapping
|
||||||
plugn trigger ports-configure "$APP"
|
plugn trigger ports-configure "$APP"
|
||||||
plugn trigger ports-set-detected "$APP" "http:$(plugn trigger ports-get-property "$APP" proxy-port):5000"
|
plugn trigger ports-set-detected "$APP" "http:$(plugn trigger ports-get-property "$APP" proxy-port):5000"
|
||||||
plugn trigger post-build-lambda "$APP"
|
if fn-plugn-trigger-exists "post-build-lambda"; then
|
||||||
|
dokku_log_warn "Deprecated: please upgrade plugin to use 'post-build' plugin trigger instead of post-build-lambda"
|
||||||
|
plugn trigger post-build-lambda "$APP"
|
||||||
|
fi
|
||||||
|
plugn trigger post-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
trigger-builder-lambda-builder-build "$@"
|
trigger-builder-lambda-builder-build "$@"
|
||||||
|
|||||||
@@ -38,7 +38,12 @@ trigger-builder-pack-builder-build() {
|
|||||||
# ensure we have a port mapping
|
# ensure we have a port mapping
|
||||||
plugn trigger ports-configure "$APP"
|
plugn trigger ports-configure "$APP"
|
||||||
plugn trigger ports-set-detected "$APP" "http:$(plugn trigger ports-get-property "$APP" proxy-port):5000"
|
plugn trigger ports-set-detected "$APP" "http:$(plugn trigger ports-get-property "$APP" proxy-port):5000"
|
||||||
plugn trigger post-build-pack "$APP" "$SOURCECODE_WORK_DIR"
|
|
||||||
|
if fn-plugn-trigger-exists "post-build-pack"; then
|
||||||
|
dokku_log_warn "Deprecated: please upgrade plugin to use 'post-build' plugin trigger instead of post-build-pack"
|
||||||
|
plugn trigger post-build-pack "$APP" "$SOURCECODE_WORK_DIR"
|
||||||
|
fi
|
||||||
|
plugn trigger post-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
trigger-builder-pack-builder-build "$@"
|
trigger-builder-pack-builder-build "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user