Skip to content

Add a config argument to force recreate some containers #6

@evanugarte

Description

@evanugarte

some containers stay in the same state unless we force recreate them, lets add this as an optional boolean argument to the configuration

game plan

  • learn how to load a yml file with an example like
import yaml

yaml_string = """
name: hello
traits:
  - ONE_HAND
  - ONE_EYE
"""
data = yaml.safe_load(yaml_string)

print(data)
# Output: {'name': 'hello', 'traits': ['ONE_HAND', 'ONE_EYE']}
print(type(data))
# Output: <class 'dict'>
  • in --development mode, we dont load a yml file. lets run the server without this argument locally, and create a config file config.yml like
repos:
  - name: git-workshop
    branch: cicd
    path: /home/sce/git-workshop
  • push random commits to a cicd branch on https://github.com/SCE-Development/git-workshop/, do we see logs?
  • lets add a new entry in the yaml file, like force_recreate: [ 'list of containers here']
  • if this field exists, after running docker compose, lets run a new docker-compose argument like
docker-compose up --build -d --force-recreate --no-deps SPACE_SEPARATED_CONTAINER_NAMES_GO_HERE

below

def update_repo(repo_config: RepoToWatch) -> RepoUpdateResult:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions