Skip to content

Commit

Permalink
Merge pull request #82 from sclorg/update_dockerfile_downstream_for_f…
Browse files Browse the repository at this point in the history
…orks

Update dockerfile is needed also for GitLab project forks
  • Loading branch information
phracek authored Sep 16, 2024
2 parents 458243a + 7351688 commit f3674bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
dockerfiles: ./Dockerfile.generator
image: cwt-generator
tags: latest 1 ${{ github.sha }} 1.5.8
tags: latest 1 ${{ github.sha }} 1.5.9

- name: Push cwt-generator image to Quay.io
id: push-to-quay
Expand Down
9 changes: 6 additions & 3 deletions container_workflow_tool/distgit.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ def dist_git_merge_changes(self, images, rebase=False):
downstream_from = self.df_handler.get_from_df(df_path)
self.logger.debug(f"Downstream_from: {downstream_from}\n")
from_tag = self.conf.get("from_tag", "latest")
self.df_handler.update_dockerfile(
df_path, from_tag, downstream_from=downstream_from
)
if rebase or not pull_upstr:
self.df_handler.update_dockerfile(
df_path, from_tag, downstream_from=downstream_from
)
# It is possible for the git repository to have no changes
if repo.is_dirty():
commit = self.get_commit_msg(rebase, image)
Expand All @@ -97,6 +97,9 @@ def dist_git_merge_changes(self, images, rebase=False):
# Save the upstream commit hash
ups_hash = Repo(ups_path).commit().hexsha
self.pull_upstream(component, path, url, repo, ups_name, commands)
self.df_handler.update_dockerfile(
df_path, from_tag, downstream_from=downstream_from
)
repo.git.add("Dockerfile")
# It is possible for the git repository to have no changes
if repo.is_dirty():
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def get_dir(system_path=None, virtual_path=None):

setup(
name='container-workflow-tool',
version="1.5.8",
version="1.5.9",
description='A python3 tool to make rebuilding images easier by automating several steps of the process.',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit f3674bf

Please sign in to comment.