Skip to content

justfile: generate a default docker tag name#1716

Merged
olix0r merged 6 commits intomainfrom
eliza/just-docker-tag
May 27, 2022
Merged

justfile: generate a default docker tag name#1716
olix0r merged 6 commits intomainfrom
eliza/just-docker-tag

Conversation

@hawkw
Copy link
Contributor

@hawkw hawkw commented May 27, 2022

Currently, when running just docker, the image is not given a
meaningful tag name by default. This commit changes the justfile so
that the default tag is something useful, rather than ''. If no tag
name is provided from the command line, the Docker image will be given
the tag gchr.io/linkerd-io/proxy:$USER-$GIT_SHA. The image name of the
actual Linkerd repository is used so that dev images can be selected
using only the --proxy-version flag of linkerd inject, and
--proxy-image is not needed.

If we'd prefer not to output the same image name as release images by
default, I could that part to something different.

Currently, when running `just docker`, the image is not given a
meaningful tag name by default. This commit changes the `justfile` so
that the default tag is something useful, rather than `''`. If no tag
name is provided from the command line, the Docker image will be given
the tag `gchr.io/linkerd-io/proxy:$USER-$GIT_SHA`. The image name of the
actual Linkerd repository is used so that dev images can be selected
using only the `--proxy-version` flag of `linkerd inject`, and
`--proxy-image` is not needed.

If we'd prefer not to output the same image name as release images by
default, I could that part to something different.
@hawkw hawkw requested a review from a team as a code owner May 27, 2022 18:27
hawkw and others added 2 commits May 27, 2022 11:47
Co-authored-by: Oliver Gould <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
@hawkw hawkw requested a review from olix0r May 27, 2022 18:53
Copy link
Member

@olix0r olix0r left a comment

Choose a reason for hiding this comment

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

Now that the docker tag is always set, there's no use to take the tag as an argument or to have conditional logic

justfile Outdated
package_version := `git rev-parse --short HEAD`

# Docker tag
docker_tag := env_var_or_default("USER", "dev") + "/l2-proxy:" + package_version
Copy link
Contributor Author

Choose a reason for hiding this comment

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

another thought...I wonder if we want to include the branch name for this as well, since it's not intended to be used for actual releases?

Suggested change
docker_tag := env_var_or_default("USER", "dev") + "/l2-proxy:" + package_version
docker_tag := env_var_or_default("USER", "dev") + "/l2-proxy:" + `git rev-parse --abbrev-ref HEAD` + "." package_version

or similar?

Copy link
Member

Choose a reason for hiding this comment

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

i'm pretty sure tags cannot have / in them, so we'd need to sed out illegal chars

@olix0r olix0r merged commit ee314ca into main May 27, 2022
@olix0r olix0r deleted the eliza/just-docker-tag branch May 27, 2022 20:52
olix0r added a commit to linkerd/linkerd2 that referenced this pull request Jun 9, 2022
This release includes only minor internal changes and dependency
updates.

---

* build(deps): bump once_cell from 1.11.0 to 1.12.0 (linkerd/linkerd2-proxy#1701)
* build(deps): bump tj-actions/changed-files from 20.1 to 20.2 (linkerd/linkerd2-proxy#1700)
* Shellscript housekeeping (linkerd/linkerd2-proxy#1702)
* Update README to mention just and devcontainers (linkerd/linkerd2-proxy#1703)
* build(deps): bump jemallocator from 0.3.2 to 0.5.0 (linkerd/linkerd2-proxy#1708)
* build(deps): bump prost from 0.10.3 to 0.10.4 (linkerd/linkerd2-proxy#1710)
* build(deps): bump prost-build from 0.10.3 to 0.10.4 (linkerd/linkerd2-proxy#1709)
* ci: Lint markdown files (linkerd/linkerd2-proxy#1707)
* test: replace `profile_test!` macro with builder (linkerd/linkerd2-proxy#1705)
* build(deps): bump tj-actions/changed-files from 20.2 to 21 (linkerd/linkerd2-proxy#1712)
* dev: Fix the `just docker` recipe (linkerd/linkerd2-proxy#1713)
* build(deps): bump prettyplease from 0.1.10 to 0.1.11 (linkerd/linkerd2-proxy#1714)
* justfile: generate a default docker tag name (linkerd/linkerd2-proxy#1716)
* build(deps): bump tj-actions/changed-files from 21 to 22.2 (linkerd/linkerd2-proxy#1727)
* build(deps): bump petgraph from 0.6.1 to 0.6.2 (linkerd/linkerd2-proxy#1717)
* build(deps): bump clang-sys from 1.3.2 to 1.3.3 (linkerd/linkerd2-proxy#1718)
* build(deps): bump flate2 from 1.0.23 to 1.0.24 (linkerd/linkerd2-proxy#1719)
* build(deps): bump hyper from 0.14.18 to 0.14.19 (linkerd/linkerd2-proxy#1720)
* build(deps): bump miniz_oxide from 0.5.1 to 0.5.3 (linkerd/linkerd2-proxy#1722)
* build(deps): bump bumpalo from 3.9.1 to 3.10.0 (linkerd/linkerd2-proxy#1728)
* build(deps): bump async-trait from 0.1.53 to 0.1.56 (linkerd/linkerd2-proxy#1729)
* build(deps): bump parking_lot from 0.12.0 to 0.12.1 (linkerd/linkerd2-proxy#1730)
* build(deps): bump indexmap from 1.7.0 to 1.8.2 (linkerd/linkerd2-proxy#1732)
* http-box: add `EraseResponse` middleware (linkerd/linkerd2-proxy#1723)
* test: don't generate discovery tests in a macro (linkerd/linkerd2-proxy#1711)
* stack: add `ProxyService` for composing a `Proxy` with a `Service` (linkerd/linkerd2-proxy#1726)
* build(deps): bump tokio-stream from 0.1.8 to 0.1.9 (linkerd/linkerd2-proxy#1733)
* build(deps): bump tokio-macros from 1.7.0 to 1.8.0 (linkerd/linkerd2-proxy#1736)
* build(deps): bump tokio from 1.18.2 to 1.19.2 (linkerd/linkerd2-proxy#1737)
* Add 'group' labels to describe policy resources (linkerd/linkerd2-proxy#1738)
* build(deps): bump tokio-util from 0.7.2 to 0.7.3 (linkerd/linkerd2-proxy#1735)
* Move policy protobuf handling into the `server-policy` crate (linkerd/linkerd2-proxy#1739)
* build(deps): bump http from 0.2.7 to 0.2.8 (linkerd/linkerd2-proxy#1740)
* Implement `Deref` for address newtypes (linkerd/linkerd2-proxy#1741)
* Rename `Route*` to `ProfileRoute*` (linkerd/linkerd2-proxy#1742)
* Rename target types from Route to ProfileRoute (linkerd/linkerd2-proxy#1743)

Signed-off-by: Oliver Gould <[email protected]>
olix0r added a commit to linkerd/linkerd2 that referenced this pull request Jun 9, 2022
This release includes only minor internal changes and dependency
updates.

---

* build(deps): bump once_cell from 1.11.0 to 1.12.0 (linkerd/linkerd2-proxy#1701)
* build(deps): bump tj-actions/changed-files from 20.1 to 20.2 (linkerd/linkerd2-proxy#1700)
* Shellscript housekeeping (linkerd/linkerd2-proxy#1702)
* Update README to mention just and devcontainers (linkerd/linkerd2-proxy#1703)
* build(deps): bump jemallocator from 0.3.2 to 0.5.0 (linkerd/linkerd2-proxy#1708)
* build(deps): bump prost from 0.10.3 to 0.10.4 (linkerd/linkerd2-proxy#1710)
* build(deps): bump prost-build from 0.10.3 to 0.10.4 (linkerd/linkerd2-proxy#1709)
* ci: Lint markdown files (linkerd/linkerd2-proxy#1707)
* test: replace `profile_test!` macro with builder (linkerd/linkerd2-proxy#1705)
* build(deps): bump tj-actions/changed-files from 20.2 to 21 (linkerd/linkerd2-proxy#1712)
* dev: Fix the `just docker` recipe (linkerd/linkerd2-proxy#1713)
* build(deps): bump prettyplease from 0.1.10 to 0.1.11 (linkerd/linkerd2-proxy#1714)
* justfile: generate a default docker tag name (linkerd/linkerd2-proxy#1716)
* build(deps): bump tj-actions/changed-files from 21 to 22.2 (linkerd/linkerd2-proxy#1727)
* build(deps): bump petgraph from 0.6.1 to 0.6.2 (linkerd/linkerd2-proxy#1717)
* build(deps): bump clang-sys from 1.3.2 to 1.3.3 (linkerd/linkerd2-proxy#1718)
* build(deps): bump flate2 from 1.0.23 to 1.0.24 (linkerd/linkerd2-proxy#1719)
* build(deps): bump hyper from 0.14.18 to 0.14.19 (linkerd/linkerd2-proxy#1720)
* build(deps): bump miniz_oxide from 0.5.1 to 0.5.3 (linkerd/linkerd2-proxy#1722)
* build(deps): bump bumpalo from 3.9.1 to 3.10.0 (linkerd/linkerd2-proxy#1728)
* build(deps): bump async-trait from 0.1.53 to 0.1.56 (linkerd/linkerd2-proxy#1729)
* build(deps): bump parking_lot from 0.12.0 to 0.12.1 (linkerd/linkerd2-proxy#1730)
* build(deps): bump indexmap from 1.7.0 to 1.8.2 (linkerd/linkerd2-proxy#1732)
* http-box: add `EraseResponse` middleware (linkerd/linkerd2-proxy#1723)
* test: don't generate discovery tests in a macro (linkerd/linkerd2-proxy#1711)
* stack: add `ProxyService` for composing a `Proxy` with a `Service` (linkerd/linkerd2-proxy#1726)
* build(deps): bump tokio-stream from 0.1.8 to 0.1.9 (linkerd/linkerd2-proxy#1733)
* build(deps): bump tokio-macros from 1.7.0 to 1.8.0 (linkerd/linkerd2-proxy#1736)
* build(deps): bump tokio from 1.18.2 to 1.19.2 (linkerd/linkerd2-proxy#1737)
* Add 'group' labels to describe policy resources (linkerd/linkerd2-proxy#1738)
* build(deps): bump tokio-util from 0.7.2 to 0.7.3 (linkerd/linkerd2-proxy#1735)
* Move policy protobuf handling into the `server-policy` crate (linkerd/linkerd2-proxy#1739)
* build(deps): bump http from 0.2.7 to 0.2.8 (linkerd/linkerd2-proxy#1740)
* Implement `Deref` for address newtypes (linkerd/linkerd2-proxy#1741)
* Rename `Route*` to `ProfileRoute*` (linkerd/linkerd2-proxy#1742)
* Rename target types from Route to ProfileRoute (linkerd/linkerd2-proxy#1743)

Signed-off-by: Oliver Gould <[email protected]>
zhlsunshine pushed a commit to zhlistio/linkerd2 that referenced this pull request Jun 15, 2022
This release includes only minor internal changes and dependency
updates.

---

* build(deps): bump once_cell from 1.11.0 to 1.12.0 (linkerd/linkerd2-proxy#1701)
* build(deps): bump tj-actions/changed-files from 20.1 to 20.2 (linkerd/linkerd2-proxy#1700)
* Shellscript housekeeping (linkerd/linkerd2-proxy#1702)
* Update README to mention just and devcontainers (linkerd/linkerd2-proxy#1703)
* build(deps): bump jemallocator from 0.3.2 to 0.5.0 (linkerd/linkerd2-proxy#1708)
* build(deps): bump prost from 0.10.3 to 0.10.4 (linkerd/linkerd2-proxy#1710)
* build(deps): bump prost-build from 0.10.3 to 0.10.4 (linkerd/linkerd2-proxy#1709)
* ci: Lint markdown files (linkerd/linkerd2-proxy#1707)
* test: replace `profile_test!` macro with builder (linkerd/linkerd2-proxy#1705)
* build(deps): bump tj-actions/changed-files from 20.2 to 21 (linkerd/linkerd2-proxy#1712)
* dev: Fix the `just docker` recipe (linkerd/linkerd2-proxy#1713)
* build(deps): bump prettyplease from 0.1.10 to 0.1.11 (linkerd/linkerd2-proxy#1714)
* justfile: generate a default docker tag name (linkerd/linkerd2-proxy#1716)
* build(deps): bump tj-actions/changed-files from 21 to 22.2 (linkerd/linkerd2-proxy#1727)
* build(deps): bump petgraph from 0.6.1 to 0.6.2 (linkerd/linkerd2-proxy#1717)
* build(deps): bump clang-sys from 1.3.2 to 1.3.3 (linkerd/linkerd2-proxy#1718)
* build(deps): bump flate2 from 1.0.23 to 1.0.24 (linkerd/linkerd2-proxy#1719)
* build(deps): bump hyper from 0.14.18 to 0.14.19 (linkerd/linkerd2-proxy#1720)
* build(deps): bump miniz_oxide from 0.5.1 to 0.5.3 (linkerd/linkerd2-proxy#1722)
* build(deps): bump bumpalo from 3.9.1 to 3.10.0 (linkerd/linkerd2-proxy#1728)
* build(deps): bump async-trait from 0.1.53 to 0.1.56 (linkerd/linkerd2-proxy#1729)
* build(deps): bump parking_lot from 0.12.0 to 0.12.1 (linkerd/linkerd2-proxy#1730)
* build(deps): bump indexmap from 1.7.0 to 1.8.2 (linkerd/linkerd2-proxy#1732)
* http-box: add `EraseResponse` middleware (linkerd/linkerd2-proxy#1723)
* test: don't generate discovery tests in a macro (linkerd/linkerd2-proxy#1711)
* stack: add `ProxyService` for composing a `Proxy` with a `Service` (linkerd/linkerd2-proxy#1726)
* build(deps): bump tokio-stream from 0.1.8 to 0.1.9 (linkerd/linkerd2-proxy#1733)
* build(deps): bump tokio-macros from 1.7.0 to 1.8.0 (linkerd/linkerd2-proxy#1736)
* build(deps): bump tokio from 1.18.2 to 1.19.2 (linkerd/linkerd2-proxy#1737)
* Add 'group' labels to describe policy resources (linkerd/linkerd2-proxy#1738)
* build(deps): bump tokio-util from 0.7.2 to 0.7.3 (linkerd/linkerd2-proxy#1735)
* Move policy protobuf handling into the `server-policy` crate (linkerd/linkerd2-proxy#1739)
* build(deps): bump http from 0.2.7 to 0.2.8 (linkerd/linkerd2-proxy#1740)
* Implement `Deref` for address newtypes (linkerd/linkerd2-proxy#1741)
* Rename `Route*` to `ProfileRoute*` (linkerd/linkerd2-proxy#1742)
* Rename target types from Route to ProfileRoute (linkerd/linkerd2-proxy#1743)

Signed-off-by: Oliver Gould <[email protected]>
Signed-off-by: zhlsunshine <[email protected]>
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