Skip to content

[master] more cleaning up - #442

Merged
silvin-lubecki merged 15 commits into
docker:masterfrom
thaJeztah:more_cleanups
Mar 12, 2020
Merged

[master] more cleaning up#442
silvin-lubecki merged 15 commits into
docker:masterfrom
thaJeztah:more_cleanups

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

opening as draft to see if I broke anything so far; I'll update the description later

Comment thread Makefile
Comment thread deb/Makefile Outdated

@silvin-lubecki silvin-lubecki left a comment

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.

Looks good !

- expand `PLUGINS_DIR` when "used" instead of when declared
- consistently use CLI_DIR to determin GITCOMMIT. When building from
  the docker/docker-ce monorepo, this should make no difference, but
  when building from the upstream repositories, this prevents the
  rpm and deb packages to have a different commit specified.
- only set GO_IMAGE if it's not yet defined

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This should prevent situations where the target directory
does not yet exist when make is called.

given the following makefile:

    DIRECT := $(realpath ./direct)
    LAZY = $(realpath ./lazy)

    clean:
            @rm -rf ./direct ./lazy

    source:
            @mkdir -p direct lazy

    build: source
            @echo DIRECT is $(DIRECT)
            @echo LAZY is $(LAZY)

Running the below, will show that only "LAZY" shows the
correct path:

    make clean && make build
    DIRECT is
    LAZY is /Users/sebastiaan/Projects/test/lazy

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
All images used are multi-arch now, so no need to parameterize

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sync formatting, and add RUN_FLAGS for rpm (it was available
for deb), so allow adding custom flags, without having to
define the whole RUN command.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
We were not currently using these to override, so may as well
remove them.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
DEB_VERSION and STATIC_VERSION are a macro (evaluated/expanded when
called), so renaming them makes it more clear that they're expanded
at that point. GEN_*_VER is also in line with the equivalent
GEN_RPM_VERSION in the rpm/Makefile.

The environment variable used in the container (and scripts) is
kept as DEB_VERSION.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
once we build from upstream repositories, CLI and Engine
will have different git commits; prepare for those changes
by making the variable name more generic.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah changed the title [wip] more cleaning up more cleaning up Mar 11, 2020
@thaJeztah
thaJeztah marked this pull request as ready for review March 11, 2020 17:00
@thaJeztah

Copy link
Copy Markdown
Member Author

Moved this out of draft; I ran the internal "release-packaging" repo with this branch, and everything still was green, so nothing broke 🎉

@silvin-lubecki @glours @StefanScherer ptal

Comment thread static/gen-static-ver

staticVersion="$VERSION"
if [[ "$VERSION" == *-dev ]]; then
# based on golang's pseudo-version: https://groups.google.com/forum/#!topic/golang-dev/a5PqQuBljF4

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll look at extracting this code to a gen-pseudo-version (e.g.) script, as a follow-up. This PR was already big, so I decided to not make it even bigger for now

@silvin-lubecki silvin-lubecki left a comment

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.

LGTM (big one to review but great PR @thaJeztah 🤗 )

@StefanScherer StefanScherer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@silvin-lubecki
silvin-lubecki merged commit e7ba930 into docker:master Mar 12, 2020
@thaJeztah
thaJeztah deleted the more_cleanups branch March 12, 2020 13:34
@thaJeztah thaJeztah changed the title more cleaning up [master] more cleaning up May 1, 2020
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.

3 participants