Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dynamic image tags based on service #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Serafin-dev
Copy link

@Serafin-dev Serafin-dev commented Dec 27, 2024

Description

This PR aims to add a feature to set Open edX images tags dinamically based on service. It also helps to standarize the way tags are built for different organizations.
The variable needed to enable this feature should be defined at the strain config file as:

Element Description Required Default Value
DOCKER_REGISTRY The Docker registry where images are stored. Optional docker.io
REPO_BASE The base of the Docker repository for the service. Optional tutor-openedx/{service}-tutor
TUTOR_VERSION The version of Tutor used. Required -
TIMESTAMP a timestamp with the format YYYY-MM-DD-HH-mm - Automatically generated if the feature is enabled.

How to test

  • Add this key-value to your strain config.yml file:
ENABLE_DYNAMIC_IMAGE_TAG: true
  • Build an image for any service

Optional

The default value for REPO_BASE is also built dinamically if not provided.
If the default does not work for your case just define a custom repository path:

REPO_BASE: my-registry/repo-base

Other considerations

There is also a possiblity to just ask for dispatch to pass a complete BASE_TAG that includes all the path but the timestamp. e.g:

tutor config save --set "${DOCKER_IMAGE}=${BASE_TAG}-${TIMESTAMP}"
# or keeping TUTOR_VERSION 
tutor config save --set "${DOCKER_IMAGE}=${REGISTRY_BASE}:${TUTOR_VERSION#v}-${TIMESTAMP}"

The one that I am proposing consider reusing variables that the workflow already uses.

@Serafin-dev Serafin-dev changed the title feat: add dynamic timage tags based on service feat: add dynamic image tags based on service Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant