-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Docker build (needs C++14 for ROOT)
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
|
||
VERSION="${1:-testing}" | ||
IMAGE="katrinexperiment/kassiopeia" | ||
|
||
RELEASE="$(git describe --tags --exact-match || git symbolic-ref -q --short HEAD)" | ||
|
||
if [ "${VERSION}" != "${RELEASE}" -a "v${VERSION}" != "${RELEASE}" ]; then | ||
echo "ERROR: Provided image version $VERSION does not match git branch/tag: $RELEASE" | ||
exit 1 | ||
fi | ||
|
||
shift 1 | ||
|
||
echo "-- building $IMAGE:$VERSION ..." | ||
sudo docker build -t $IMAGE $@ . || exit $? | ||
sudo docker run -it katrinexperiment/kassiopeia UnitTestKasper || exit $? | ||
|
||
###### | ||
#exit 0 | ||
###### | ||
|
||
echo "-- pushing to DockerHub ..." | ||
sudo docker tag $IMAGE:latest katrinexperiment/kassiopeia:$VERSION | ||
sudo docker push katrinexperiment/kassiopeia:$VERSION | ||
sudo docker push katrinexperiment/kassiopeia:latest | ||
|
||
echo "-- pushing to GitHub ..." | ||
sudo docker tag $IMAGE:latest docker.pkg.github.com/katrin-experiment/kassiopeia/kassiopeia:$VERSION | ||
sudo docker push docker.pkg.github.com/katrin-experiment/kassiopeia/kassiopeia:$VERSION |