Skip to content

Commit

Permalink
Docker ADR (home-assistant#26085)
Browse files Browse the repository at this point in the history
* Migrate Docker image to Hass.io / Multiarch

* Fix sudo

* Update CODEOWNERS

* Fix manifest

* Add more logic

* fix handling

* Move dockerfile

* Modify options
  • Loading branch information
pvizeli authored and balloob committed Aug 20, 2019
1 parent daa0330 commit 97d3f49
Show file tree
Hide file tree
Showing 18 changed files with 62 additions and 548 deletions.
7 changes: 4 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
{
"name": "Home Assistant Dev",
"context": "..",
"dockerFile": "Dockerfile",
"dockerFile": "../Dockerfile.dev",
"postCreateCommand": "pip3 install -e .",
"appPort": 8123,
"runArgs": [
"-e", "GIT_EDITOR=\"code --wait\""
"-e",
"GIT_EDITOR=\"code --wait\""
],
"extensions": [
"ms-python.python",
Expand All @@ -31,4 +32,4 @@
"!include_dir_merge_named scalar"
]
}
}
}
4 changes: 0 additions & 4 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ homeassistant/*.py @home-assistant/core
homeassistant/helpers/* @home-assistant/core
homeassistant/util/* @home-assistant/core

# Virtualization
Dockerfile @home-assistant/docker
virtualization/Docker/* @home-assistant/docker

# Other code
homeassistant/scripts/check_config.py @kellerza

Expand Down
38 changes: 0 additions & 38 deletions Dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions .devcontainer/Dockerfile → Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ RUN apt-get update \

WORKDIR /usr/src

# Setup hass-release
RUN git clone --depth 1 https://github.com/home-assistant/hass-release \
&& cd hass-release \
&& pip3 install -e .
Expand Down
58 changes: 57 additions & 1 deletion azure-pipelines-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ stages:
- script: |
export TWINE_USERNAME="$(twineUser)"
export TWINE_PASSWORD="$(twinePassword)"
twine upload dist/* --skip-existing
displayName: 'Upload pypi'
- job: 'ReleaseDocker'
Expand Down Expand Up @@ -150,3 +150,59 @@ stages:
git commit -am "Bump Home Assistant $version"
git push
displayName: 'Update version files'
- job: 'ReleaseDocker'
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
set -e
export DOCKER_CLI_EXPERIMENTAL=enabled
function create_manifest() {
local tag_l=$1
local tag_r=$2
sudo docker manifest create homeassistant/home-assistant:${tag_l} \
homeassistant/amd64-homeassistant:${tag_r} \
homeassistant/i386-homeassistant:${tag_r} \
homeassistant/armhf-homeassistant:${tag_r} \
homeassistant/armv7-homeassistant:${tag_r} \
homeassistant/aarch64-homeassistant:${tag_r}
sudo docker manifest annotate homeassistant/home-assistant:${tag_l} \
homeassistant/amd64-homeassistant:${tag_r} \
--os linux --arch amd64
sudo docker manifest annotate homeassistant/home-assistant:${tag_l} \
homeassistant/i386-homeassistant:${tag_r} \
--os linux --arch i386
sudo docker manifest annotate homeassistant/home-assistant:${tag_l} \
homeassistant/armhf-homeassistant:${tag_r} \
--os linux --arch arm --variant=v6
sudo docker manifest annotate homeassistant/home-assistant:${tag_l} \
homeassistant/armv7-homeassistant:${tag_r} \
--os linux --arch arm --variant=v7
sudo docker manifest annotate homeassistant/home-assistant:${tag_l} \
homeassistant/aarch64-homeassistant:${tag_r} \
--os linux --arch arm64 --variant=v8
sudo docker manifest push --purge homeassistant/home-assistant:${tag_l}
}
# Create version tag
create_manifest "$(Build.SourceBranchName)" "$(Build.SourceBranchName)"
# Create general tags
if [[ "$version" =~ d ]]; then
create_manifest "dev" "$(Build.SourceBranchName)"
elif [[ "$version" =~ b ]]; then
create_manifest "beta" "$(Build.SourceBranchName)"
else
create_manifest "stable" "$(Build.SourceBranchName)"
create_manifest "latest" "$(Build.SourceBranchName)"
fi
displayName: 'Create Meta-Image'
4 changes: 0 additions & 4 deletions script/hassfest/codeowners.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
homeassistant/helpers/* @home-assistant/core
homeassistant/util/* @home-assistant/core
# Virtualization
Dockerfile @home-assistant/docker
virtualization/Docker/* @home-assistant/docker
# Other code
homeassistant/scripts/check_config.py @kellerza
Expand Down
64 changes: 0 additions & 64 deletions virtualization/Docker/Dockerfile.dev

This file was deleted.

47 changes: 0 additions & 47 deletions virtualization/Docker/scripts/libcec

This file was deleted.

12 changes: 0 additions & 12 deletions virtualization/Docker/scripts/locales

This file was deleted.

32 changes: 0 additions & 32 deletions virtualization/Docker/scripts/openalpr

This file was deleted.

24 changes: 0 additions & 24 deletions virtualization/Docker/scripts/ssocr

This file was deleted.

17 changes: 0 additions & 17 deletions virtualization/Docker/scripts/tellstick

This file was deleted.

Loading

0 comments on commit 97d3f49

Please sign in to comment.