Skip to content

Conversation

placer14
Copy link
Contributor

@placer14 placer14 commented Feb 3, 2022

Building the lily binary within the docker context makes the build
version always "dirty". This is because dockerignore omits files
from the build context which are committed into the git repo. When
these files are missing, git considers that repo "dirty".

This change allows the Makefile to use LILY_VERSION to set the build
version of the lily binary. This value used as an envvar within the
docker build environment which overrides the default ("dirty")
LILY_VERSION with the version perceived by git before dockerignore
filters/removes files from the build.

@placer14 placer14 force-pushed the mg/fix/dirty-docker-builds-v2 branch 16 times, most recently from be8359d to 6da317b Compare February 3, 2022 17:19
@placer14 placer14 force-pushed the mg/fix/dirty-docker-builds-v2 branch 12 times, most recently from 9919ae8 to c6209b0 Compare February 4, 2022 03:21
Building the lily binary within the docker context makes the build
version always "dirty". This is because dockerignore omits files
from the build context which are committed into the git repo. When
these files are missing, git considers that repo "dirty".

This change allows the Makefile to use LILY_VERSION to set the build
version of the lily binary. This value used as an envvar within the
docker build environment which overrides the default ("dirty")
LILY_VERSION with the version perceived by git before dockerignore
filters/removes files from the build.
@placer14 placer14 force-pushed the mg/fix/dirty-docker-builds-v2 branch from c6209b0 to b63a99f Compare February 4, 2022 03:23
@placer14 placer14 marked this pull request as ready for review February 4, 2022 03:23
@placer14 placer14 requested review from frrist and iand February 4, 2022 03:24
@placer14 placer14 changed the title fix(docker): Allow build version to be overridden; Usage in CI fix(docker): Docker image builds are no longer dirty Feb 4, 2022
@placer14 placer14 changed the title fix(docker): Docker image builds are no longer dirty fix(docker): Docker image build versions are no longer "dirty" Feb 4, 2022
@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 31.7%. Comparing base (e74a26c) to head (b63a99f).
⚠️ Report is 291 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #835   +/-   ##
======================================
  Coverage    31.7%   31.7%           
======================================
  Files          39      39           
  Lines        3780    3780           
======================================
  Hits         1202    1202           
  Misses       2432    2432           
  Partials      146     146           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@placer14
Copy link
Contributor Author

placer14 commented Feb 4, 2022

@frrist if you're happy with this, it's ready to merge. LMK when you do so I can doublecheck the CI results on merge to master. :D

@frrist
Copy link
Member

frrist commented Feb 4, 2022

Ship it!

@placer14 placer14 merged commit beea5b7 into master Feb 8, 2022
@placer14 placer14 deleted the mg/fix/dirty-docker-builds-v2 branch February 8, 2022 17:32
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.

4 participants