Closed godber closed 1 year ago
Here's what build_and_push.sh
does when told to push:
* BUILDING terascope/node-base:14.21.3...
docker build --file Dockerfile --build-arg NODE_VERSION=14.21.3 --pull --tag terascope/node-base:14.21.3 .
* BUILDING terascope/node-base:14.21.3-core...
docker build --file Dockerfile.core --build-arg NODE_VERSION=14.21.3 --pull --tag terascope/node-base:14.21.3-core .
* BUILDING terascope/node-base:16.20.0...
docker build --file Dockerfile --build-arg NODE_VERSION=16.20.0 --pull --tag terascope/node-base:16.20.0 .
* BUILDING terascope/node-base:16.20.0-core...
docker build --file Dockerfile.core --build-arg NODE_VERSION=16.20.0 --pull --tag terascope/node-base:16.20.0-core .
* BUILDING terascope/node-base:18.16.0...
docker build --file Dockerfile --build-arg NODE_VERSION=18.16.0 --pull --tag terascope/node-base:18.16.0 .
* BUILDING terascope/node-base:18.16.0-core...
docker build --file Dockerfile.core --build-arg NODE_VERSION=18.16.0 --pull --tag terascope/node-base:18.16.0-core .
* BUILDING terascope/node-base:20.2.0...
docker build --file Dockerfile --build-arg NODE_VERSION=20.2.0 --pull --tag terascope/node-base:20.2.0 .
* BUILDING terascope/node-base:20.2.0-core...
docker build --file Dockerfile.core --build-arg NODE_VERSION=20.2.0 --pull --tag terascope/node-base:20.2.0-core .
* DONE BUILDING
Do you want to push ? y
* PUSHING terascope/node-base:14.21.3...
docker push terascope/node-base:14.21.3
* PUSHING terascope/node-base:14.21.3-core...
docker push terascope/node-base:14.21.3-core
* PUSHING terascope/node-base:16.20.0...
docker push terascope/node-base:16.20.0
* PUSHING terascope/node-base:16.20.0-core...
docker push terascope/node-base:16.20.0-core
* PUSHING terascope/node-base:18.16.0...
docker push terascope/node-base:18.16.0
* PUSHING terascope/node-base:18.16.0-core...
docker push terascope/node-base:18.16.0-core
* PUSHING terascope/node-base:20.2.0...
docker push terascope/node-base:20.2.0
* PUSHING terascope/node-base:20.2.0-core...
docker push terascope/node-base:20.2.0-core
I think as a rule, I'm going to try and avoid embedding any action logic in bash scripts like this does. So I am going to shoot for
Edit: I change the build/push to happen on release instead of merge to master.
This PR worked
https://github.com/terascope/base-docker-image/pull/10
You can see the output of the first release here:
https://github.com/terascope/base-docker-image/actions/runs/5071106493
The workflow now requires a manual Release after merging in to master.
Also this now has the disadvantage of not being able to do local builds since the build is done by the Github action. We may want to rethink this.
Also note that the versions need to be kept in sync in these two place:
Note, I've added a master
branch protection that requires the three build_matrix
steps to complete ... given that these are parameterized by the matrix, I don't really know what will happen when that list is changed. So that restriction might end up needing to be removed.
https://github.com/terascope/base-docker-image/settings/branches
Otherwise this issue is complete.
The CI for this should be converted to Github actions.