mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-25 18:16:32 +00:00
Create image
This commit is contained in:
parent
6143d0060a
commit
d121f3bed8
@ -95,7 +95,6 @@ docker run --rm \
|
|||||||
--shared-downloads /yocto/shared-downloads \
|
--shared-downloads /yocto/shared-downloads \
|
||||||
--shared-sstate /yocto/shared-sstate
|
--shared-sstate /yocto/shared-sstate
|
||||||
|
|
||||||
exit
|
|
||||||
# Write deploy artifacts
|
# Write deploy artifacts
|
||||||
BUILD_DEPLOY_DIR=$WORKSPACE/deploy
|
BUILD_DEPLOY_DIR=$WORKSPACE/deploy
|
||||||
DEVICE_TYPE_JSON=$WORKSPACE/$MACHINE.json
|
DEVICE_TYPE_JSON=$WORKSPACE/$MACHINE.json
|
||||||
@ -127,25 +126,17 @@ cp $DEVICE_TYPE_JSON $BUILD_DEPLOY_DIR/device-type.json
|
|||||||
# move to deploy directory the kernel modules headers so we have it as a build artifact in jenkins
|
# move to deploy directory the kernel modules headers so we have it as a build artifact in jenkins
|
||||||
mv -v $WORKSPACE/build/tmp/deploy/images/$MACHINE/kernel_modules_headers.tar.gz $BUILD_DEPLOY_DIR
|
mv -v $WORKSPACE/build/tmp/deploy/images/$MACHINE/kernel_modules_headers.tar.gz $BUILD_DEPLOY_DIR
|
||||||
|
|
||||||
# If this is a clean production build, push a resinhup package to dockerhub
|
exit
|
||||||
# and registry.resinstaging.io.
|
echo "INFO: Pushing resinhup package to dockerhub"
|
||||||
if [[ "$sourceBranch" == production* ]] && [ "$metaResinBranch" == "__ignore__" ] && [ "$supervisorTag" == "__ignore__" ]; then
|
DOCKER_IMAGE="$DOCKER_REPO/hassio"
|
||||||
echo "INFO: Pushing resinhup package to dockerhub and registry.resinstaging.io."
|
DOCKER_TAG="$HASSIO_VERSION-$MACHINE"
|
||||||
SLUG=$(jq --raw-output '.slug' $DEVICE_TYPE_JSON)
|
if [ -f $BUILD_DEPLOY_DIR/resinhup-$VERSION_HOSTOS.tar ]; then
|
||||||
DOCKER_REPO="resin/resinos"
|
docker import $BUILD_DEPLOY_DIR/resinhup-$VERSION_HOSTOS.tar $DOCKER_IMAGE:$DOCKER_TAG
|
||||||
DOCKER_TAG="$VERSION_HOSTOS-$SLUG"
|
docker push $DOCKER_IMAGE:$DOCKER_TAG
|
||||||
RESINREG_REPO="registry.resinstaging.io/resin/resinos"
|
docker rmi $DOCKER_IMAGE:$DOCKER_TAG # cleanup
|
||||||
RESINREG_TAG="$VERSION_HOSTOS-$SLUG"
|
|
||||||
if [ -f $BUILD_DEPLOY_DIR/resinhup-$VERSION_HOSTOS.tar ]; then
|
|
||||||
docker import $BUILD_DEPLOY_DIR/resinhup-$VERSION_HOSTOS.tar $DOCKER_REPO:$DOCKER_TAG
|
|
||||||
docker push $DOCKER_REPO:$DOCKER_TAG
|
|
||||||
docker rmi $DOCKER_REPO:$DOCKER_TAG # cleanup
|
|
||||||
else
|
|
||||||
echo "ERROR: The build didn't produce a resinhup package."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "WARNING: There is no need to upload resinhup package for a non production clean build."
|
echo "ERROR: The build didn't produce a resinhup package."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Cleanup the build directory
|
# Cleanup the build directory
|
||||||
|
Loading…
x
Reference in New Issue
Block a user