Skip to content

Support for tagging Docker image with latest Git commit hash #22

@mwvaughn

Description

@mwvaughn

A workflow that grew out of some user's CICD workflows is to tell abaco deploy to override the value specified by DOCKER_IMAGE_VERSION in the reactor.rc file with the current Git repo short hash.

This is achieved by detecting the hash and passing it to the -t option, but this requires a separate, out-of-band step to detect the hash.

Extend the abaco deploy workflow to support this automatically:

  1. Add DOCKER_USE_COMMIT_HASH as a reactor.rc variable
  2. Add detection of current git commit hash to abaco deploy
  3. Update behavior of -t so the image tag is set in the following order when DOCKER_USE_COMMIT_HASH=1

Argument -t [value] > [git commit hash] > latest if git | DOCKER_IMAGE_VERSION if ! git

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttest pleaseNeed help validating a feature or fix

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions