Closed parndt closed 3 months ago
@parndt please note that I had to remove a few lines in webpack as it was resulting in build errors (guess that merge for this PR was a bit premature =) ) https://github.com/marine-defrag/marine-defrag-client/commit/1245f3a8d222a821e76578df616e0d9ac6843d10
@tmfrnz all good - can you think of another way to pass that info through?
I wonder if we could just rely on there being, or not being, an environment variable before we even define the function:
if (process.env.COMMIT_SHA) {
WebpackGitHash.prototype.getSkipHash = function(length) {
return process.env.COMMIT_SHA.substr(0, 7);
}
}
This complements the deployment added to marine-defrag/marine-defrag-server#112
We first build the application inside a temporary container running the specified node version, and then we deploy its files to the production container so that it can be deployed to the server.
I've had to patch
WebpackGitHash.prototype.getSkipHash
to support the commit SHA being passed in, as Docker will not be able to access the repository during build.