Merge pull request #3358 from dokku/3355-tags-deploys
Image tag deploy workflow cleanup
This commit is contained in:
4 files changed
+16
-4
No files matched your search
@@ -65,7 +65,9 @@ dokku/node-js-app v1 936a42f25901 About a minute ago
|
|||||||
|
|
||||||
### Deploying an image tag
|
### Deploying an image tag
|
||||||
|
|
||||||
Finally, you can also deploy a local image using the `tags:deploy` command.
|
Finally, you can also deploy a local image using the `tags:deploy` command. When specifying a tag that is not `latest`, the released image will be retagged as the `latest` image tag for the app.
|
||||||
|
|
||||||
|
> Warning: For images based on herokuish, using the `tags:deploy` subcommand will reset environment variables written into the image, causing a retag to occur. This will - on average - add two extra layers to your deployed image. Note that this does not affect dockerfile-based images, which are the majority of images deployed via the `tags` command.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku tags:deploy node-js-app v1
|
dokku tags:deploy node-js-app v1
|
||||||
|
|||||||
@@ -12,7 +12,13 @@ tags_deploy_cmd() {
|
|||||||
|
|
||||||
IMAGE="$(get_app_image_name "$APP" "$IMAGE_TAG")"
|
IMAGE="$(get_app_image_name "$APP" "$IMAGE_TAG")"
|
||||||
verify_image "$IMAGE" || return 1
|
verify_image "$IMAGE" || return 1
|
||||||
release_and_deploy "$APP" "$IMAGE_TAG"
|
release_and_deploy "$APP" "$IMAGE_TAG"
|
||||||
|
|
||||||
|
if [[ "$IMAGE_TAG" != "latest" ]]; then
|
||||||
|
local DOKKU_SCHEDULER="$(get_app_scheduler "$APP")"
|
||||||
|
local LATEST_IMAGE="$(get_app_image_name "$APP")"
|
||||||
|
plugn trigger scheduler-tags-create "$DOKKU_SCHEDULER" "$APP" "$IMAGE" "$LATEST_IMAGE"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
tags_deploy_cmd "$@"
|
tags_deploy_cmd "$@"
|
||||||
@@ -10,8 +10,8 @@ tar_deploy_source() {
|
|||||||
|
|
||||||
# bail if another source is detected
|
# bail if another source is detected
|
||||||
if [[ -n "$STDIN" ]]; then
|
if [[ -n "$STDIN" ]]; then
|
||||||
echo "$STDIN"
|
echo "$STDIN"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f "$DOKKU_ROOT/$APP/src.tar" ]]; then
|
if [[ -f "$DOKKU_ROOT/$APP/src.tar" ]]; then
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ teardown() {
|
|||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
run /bin/bash -c "docker images | egrep "dokku/${TEST_APP}"| egrep -q latest"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "(tags) tags:deploy (missing tag)" {
|
@test "(tags) tags:deploy (missing tag)" {
|
||||||
|
|||||||
Reference in new issue
Block a user