-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerfile for census builder #267
Conversation
entrypoint.sh
Outdated
@@ -0,0 +1,3 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is no longer necessary, but I included it as an example if we wanted a simplified build process (without the yaml file)
entrypoint.py
Outdated
subcommand_args.append(cmd) | ||
add_args(opts, subcommand_args) | ||
print(subcommand_args) | ||
subprocess.call(subcommand_args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of calling subprocess
, we could modify the builder so that it could be called directly. This would require, at minimum, to modify the main
function to accept a Namespace
, but I think for now I'd like to validate this approach before we make major changes.
@@ -134,6 +134,12 @@ def get_git_commit_sha() -> str: | |||
""" | |||
Returns the git commit SHA for the current repo | |||
""" | |||
# Try to get the git commit SHA from the COMMIT_SHA env variable | |||
commit_sha_var = os.getenv("COMMIT_SHA") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is necessary because we don't want the .git
folder to be in the Docker image, so we need to pass the commit SHA externally.
Codecov Report
@@ Coverage Diff @@
## main #267 +/- ##
==========================================
- Coverage 93.52% 93.44% -0.09%
==========================================
Files 34 34
Lines 2023 2028 +5
==========================================
+ Hits 1892 1895 +3
- Misses 131 133 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me as a starting point. I can easily wire it up to the builder package.
thanks!
Dockerfile that can be used for platform independent census builds.
Usage:
Modify the
build-census.yaml
file to include options and build commands. An example is included that runs the builder with a manifest file.Run with:
The mount is necessary so that the built census can be retrieved and uploaded to S3 later.