From 361baea17fea2fe3ac7931e50a427e621ece9e81 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Sat, 20 Oct 2018 18:20:21 +0200 Subject: [PATCH] Add beta builds --- .gitlab-ci.yml | 118 ++++++++++++++++++++++++----------- esphomeyaml-beta/config.json | 33 ++++++++++ 2 files changed, 115 insertions(+), 36 deletions(-) create mode 100644 esphomeyaml-beta/config.json diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8194e3150e..684388971d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,12 +76,12 @@ test2: retry: 2 # Generic deploy template -.deploy: &deploy +.deploy-release: &deploy-release <<: *docker-builder stage: deploy script: - version=${CI_COMMIT_TAG:1} - - echo "Publishing version ${version}" + - echo "Publishing release version ${version}" - docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD" - docker pull "${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}" - | @@ -99,6 +99,38 @@ test2: - docker push "${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:latest" - docker push "ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${version}" - docker push "ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:latest" + only: + - /^v\d+\.\d+\.\d+$/ + except: + - /^(?!master).+@/ + +.deploy-beta: &deploy-beta + <<: *docker-builder + stage: deploy + script: + - version=${CI_COMMIT_TAG:1} + - echo "Publishing beta version ${version}" + - docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD" + - docker pull "${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}" + - | + docker tag \ + "${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}" \ + "${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:beta" + - | + docker tag \ + "${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}" \ + "ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${version}" + - | + docker tag \ + "ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${version}" \ + "ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:beta" + - docker push "${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:beta" + - docker push "ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${version}" + - docker push "ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:beta" + only: + - /^v\d+\.\d+\.\d+b\d+$/ + except: + - /^(?!rc).+@/ # Build jobs build:normal: @@ -134,54 +166,68 @@ build:amd64: ADDON_ARCH: amd64 # Deploy jobs -deploy:armhf: - <<: *deploy +deploy-release:armhf: + <<: *deploy-release variables: ADDON_ARCH: armhf - only: - - /^v\d+\.\d+\.\d+(?:(?:(?:\+|\.)?[a-zA-Z0-9]+)*)?$/ - except: - - /^(?!master).+@/ -#deploy:aarch64: -# <<: *deploy +deploy-beta:armhf: + <<: *deploy-beta + variables: + ADDON_ARCH: armhf + +#deploy-release:aarch64: +# <<: *deploy-release # variables: # ADDON_ARCH: aarch64 -# only: -# - /^v\d+\.\d+\.\d+(?:(?:(?:\+|\.)?[a-zA-Z0-9]+)*)?$/ -# except: -# - /^(?!master).+@/ -deploy:i386: - <<: *deploy +#deploy-beta:aarch64: +# <<: *deploy-beta +# variables: +# ADDON_ARCH: aarch64 + +deploy-release:i386: + <<: *deploy-release variables: ADDON_ARCH: i386 - only: - - /^v\d+\.\d+\.\d+(?:(?:(?:\+|\.)?[a-zA-Z0-9]+)*)?$/ - except: - - /^(?!master).+@/ -deploy:amd64: - <<: *deploy +deploy-beta:i386: + <<: *deploy-beta + variables: + ADDON_ARCH: i386 + +deploy-release:amd64: + <<: *deploy-release variables: ADDON_ARCH: amd64 + +deploy-beta:amd64: + <<: *deploy-beta + variables: + ADDON_ARCH: amd64 + +.deploy-pypi: &deploy-pypi + stage: deploy + before_script: + - pip install -e . + - pip install twine + script: + - python setup.py sdist + - twine upload dist/* + tags: + - python2.7 + - esphomeyaml-test + +deploy-release:pypi: + <<: *deploy-pypi only: - - /^v\d+\.\d+\.\d+(?:(?:(?:\+|\.)?[a-zA-Z0-9]+)*)?$/ + - /^v\d+\.\d+\.\d+$/ except: - /^(?!master).+@/ -deploy:pypi: - stage: deploy - before_script: - - pip install -e . - - pip install twine - script: - - python setup.py sdist - - twine upload dist/* - tags: - - python2.7 - - esphomeyaml-test +deploy-beta:pypi: + <<: *deploy-pypi only: - - /^v\d+\.\d+\.\d+(?:(?:(?:\+|\.)?[a-zA-Z0-9]+)*)?$/ + - /^v\d+\.\d+\.\d+b\d+$/ except: - - /^(?!master).+@/ + - /^(?!rc).+@/ diff --git a/esphomeyaml-beta/config.json b/esphomeyaml-beta/config.json new file mode 100644 index 0000000000..b636643cd0 --- /dev/null +++ b/esphomeyaml-beta/config.json @@ -0,0 +1,33 @@ +{ + "name": "esphomeyaml-beta", + "version": "1.9.0b1", + "slug": "esphomeyaml-beta", + "description": "Beta version of esphomeyaml HassIO add-on.", + "url": "https://esphomelib.com/esphomeyaml/index.html", + "startup": "application", + "webui": "http://[HOST]:[PORT:6052]", + "boot": "auto", + "ports": { + "6052/tcp": 6052, + "6053/tcp": 6053 + }, + "auto_uart": true, + "map": [ + "config:rw" + ], + "arch": [ + "amd64", + "armhf", + "i386" + ], + "environment": { + "ESPHOMEYAML_OTA_HOST_PORT": "6053" + }, + "options": { + "password": "" + }, + "schema": { + "password": "str?" + }, + "image": "ottowinter/esphomeyaml-hassio-{arch}" +}