Skip to content

feat(jig): jig deploy --image#380

Draft
dulaj-me wants to merge 1 commit into
mainfrom
dulaj-me/eng-87040-improve-dx-for-pushing-arbitrary-images
Draft

feat(jig): jig deploy --image#380
dulaj-me wants to merge 1 commit into
mainfrom
dulaj-me/eng-87040-improve-dx-for-pushing-arbitrary-images

Conversation

@dulaj-me
Copy link
Copy Markdown
Contributor

src/together/lib/cli/api/beta/jig/jig.py

  1. Jig.push() (line 670): added source_image param. If set with empty tag, derives tag from source image (default "latest"). Branches to docker tag + docker push instead of buildx.
  2. push() wrapper (line ~1190): forwards source_image.
  3. push_cli() (line ~1458): adds --image flag, tag default → None. Passes "latest" when no image specified, "" (meaning "derive from source") when image specified without explicit tag.

Usage:

jig push                                  # builds & pushes to <upstream>:latest
jig push --tag v1                         # builds & pushes to <upstream>:v1
jig push --image myapp:dev                # retags & pushes <upstream>:dev
jig push --image myapp:dev --tag prod     # retags & pushes <upstream>:prod
jig push --image myapp                    # retags & pushes <upstream>:latest

Comment on lines +682 to +685
if source_image:
if subprocess.run(["docker", "tag", source_image, image]).returncode != 0:
raise JigError(f"Failed to retag {source_image}")
ok = subprocess.run(["docker", "push", image]).returncode == 0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you test if this works properly with zstd compressed images? docker push might recompress the image as gzip before push

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
Tbh, I haven't tested this at all. I wanted to make sure if we're all ok with the UX

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.

2 participants