Closed busma13 closed 2 months ago
When this PR is ready for review, lets:
v2.1.0
.I will hold off on bumping versions until after a review, as I don't want to trigger another CI run currently.
I've reviewed the labels and they look good for opencontainers image-spec
@busma13 do you have an image built from this branch? Can you run the following command on the IMAGE and paste the output here?
docker inspect IMAGE | jq '.[0].Config.Labels'
➜ teraslice git:(add-labels-to-docker-image) docker inspect terascope/teraslice:latest-nodev18.19.1 | jq '.[0].Config.Labels'
{
"org.opencontainers.image.created": "2024-07-10T20:51:55.958Z",
"org.opencontainers.image.documentation": "https://terascope.github.io/teraslice/docs/overview",
"org.opencontainers.image.licenses": "Apache-2.0",
"org.opencontainers.image.revision": "someHashValue",
"org.opencontainers.image.source": "https://github.com/terascope/teraslice",
"org.opencontainers.image.title": "Teraslice",
"org.opencontainers.image.url": "https://terascope.github.io/teraslice",
"org.opencontainers.image.vendor": "Terascope",
"org.opencontainers.image.version": "2.0.1"
}
So "org.opencontainers.image.revision": "someHashValue",
is due to this being a local test, right?
So
"org.opencontainers.image.revision": "someHashValue",
is due to this being a local test, right?
Correct. I set a local env var - export GITHUB_SHA=someHashValue
This PR makes the following changes:
dockerBuild
function to allow abuildArgs
array.publishToDocker
function to pass the followingbuildArgs
:TERASLICE_VERSION
: equal toversion
in the teraslice rootpackage.json
.BUILD_TIMESTAMP
: equal to the result ofnew Date().toISOString()
immediately before thedockerBuild
function is called (ex:2024-07-10T14:43:09.429Z
).GITHUB_SHA
: equal to the value ofprocess.env.GITHUB_SHA
immediately before thedockerBuild
function is called. In the Github Actions CI pipeline where this script runs it will equalthe commit SHA that triggered the workflow
(ex:ffac537e6cbbf934b08745a378932722df287a53
).ref: #3257