Merge pull request #28 from Hazhzeng/pr-version-14

Bump version to 0.0.14
This commit is contained in:
Hanzhang Zeng (Roger) 2019-03-31 03:19:15 -07:00 коммит произвёл GitHub
Родитель 43d06a62b1 68dae31288
Коммит 28e0d2dd8b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 24 добавлений и 28 удалений

Просмотреть файл

Просмотреть файл

@ -6,6 +6,7 @@
import logging import logging
import vsts.release.v4_1.models as models import vsts.release.v4_1.models as models
from vsts.exceptions import VstsServiceError
from ..base.base_manager import BaseManager from ..base.base_manager import BaseManager
from ..pool.pool_manager import PoolManager from ..pool.pool_manager import PoolManager
from ..constants import (LINUX_CONSUMPTION, LINUX_DEDICATED, WINDOWS) from ..constants import (LINUX_CONSUMPTION, LINUX_DEDICATED, WINDOWS)
@ -48,7 +49,8 @@ class ReleaseManager(BaseManager):
elif app_type == WINDOWS: elif app_type == WINDOWS:
workflowtasks.append(self._app_service_deploy_task_windows(service_endpoint.id, functionapp_name)) workflowtasks.append(self._app_service_deploy_task_windows(service_endpoint.id, functionapp_name))
else: else:
logging.error("Invalid app type provided. Correct types are: Linux Consumption: %s, Linux Dedicated: %s, Windows: %s", logging.error("Invalid app type provided. Correct types are: "
"Linux Consumption: %s, Linux Dedicated: %s, Windows: %s",
LINUX_CONSUMPTION, LINUX_DEDICATED, WINDOWS) LINUX_CONSUMPTION, LINUX_DEDICATED, WINDOWS)
if settings is not None: if settings is not None:
@ -57,7 +59,9 @@ class ReleaseManager(BaseManager):
settings_str += (setting[0] + "='" + setting[1] + "'") settings_str += (setting[0] + "='" + setting[1] + "'")
# Check that settings were actually set otherwise we don't want to use the task # Check that settings were actually set otherwise we don't want to use the task
if settings_str != "": if settings_str != "":
workflowtasks.append(self._app_settings_task_customized(service_endpoint.id, functionapp_name, resource_name, settings_str)) workflowtasks.append(self._app_settings_task_customized(
service_endpoint.id, functionapp_name, resource_name, settings_str
))
deploy_phases = self._get_deploy_phases(deployment_input, workflowtasks, phase_inputs) deploy_phases = self._get_deploy_phases(deployment_input, workflowtasks, phase_inputs)
@ -74,7 +78,6 @@ class ReleaseManager(BaseManager):
conditions=[condition] conditions=[condition]
) )
release_definition = models.release_definition.ReleaseDefinition( release_definition = models.release_definition.ReleaseDefinition(
name=release_definition_name, name=release_definition_name,
environments=[release_definition_environment], environments=[release_definition_environment],
@ -110,7 +113,8 @@ class ReleaseManager(BaseManager):
def _get_service_endpoint_by_name(self, project, service_endpoint_name): def _get_service_endpoint_by_name(self, project, service_endpoint_name):
service_endpoints = self._service_endpoint_client.get_service_endpoints(project.id) service_endpoints = self._service_endpoint_client.get_service_endpoints(project.id)
return next((service_endpoint for service_endpoint in service_endpoints if service_endpoint.name == service_endpoint_name), None) return next((service_endpoint for service_endpoint in service_endpoints
if service_endpoint.name == service_endpoint_name), None)
def _get_pool_by_name(self, pool_name): def _get_pool_by_name(self, pool_name):
"""Helper function to get the pool object from its name""" """Helper function to get the pool object from its name"""
@ -270,7 +274,9 @@ class ReleaseManager(BaseManager):
appsetttingstask_inputs["ConnectedServiceName"] = connectedServiceNameARM appsetttingstask_inputs["ConnectedServiceName"] = connectedServiceNameARM
appsetttingstask_inputs["WebAppName"] = functionapp_name appsetttingstask_inputs["WebAppName"] = functionapp_name
appsetttingstask_inputs["ResourceGroupName"] = resource_name appsetttingstask_inputs["ResourceGroupName"] = resource_name
appsetttingstask_inputs["AppSettings"] = "WEBSITE_RUN_FROM_PACKAGE='$(storageUri)/build$(Build.BuildId).zip$(storageToken)'" appsetttingstask_inputs["AppSettings"] = (
"WEBSITE_RUN_FROM_PACKAGE='$(storageUri)/build$(Build.BuildId).zip$(storageToken)'"
)
appsetttingstask["inputs"] = appsetttingstask_inputs appsetttingstask["inputs"] = appsetttingstask_inputs
return appsetttingstask return appsetttingstask

Просмотреть файл

@ -6,7 +6,7 @@
import os.path as path import os.path as path
import logging import logging
from jinja2 import Environment, PackageLoader, select_autoescape from jinja2 import Environment, PackageLoader, select_autoescape
from ..constants import (WINDOWS, PYTHON, NODE, DOTNET, JAVA) from ..constants import (WINDOWS, PYTHON, NODE, DOTNET)
from ..exceptions import LanguageNotSupportException from ..exceptions import LanguageNotSupportException
class YamlManager(object): class YamlManager(object):
@ -128,13 +128,3 @@ class YamlManager(object):
dependencies.append(" modifyOutputPath: true") dependencies.append(" modifyOutputPath: true")
dependencies.append(" zipAfterPublish: false") dependencies.append(" zipAfterPublish: false")
return dependencies return dependencies
def _java_dependencies(self):
"""Helper to create the standard java dependencies"""
dependencies = ['- script: |', ' dotnet restore', ' dotnet build', ' mvn clean deploy']
logging.critical("java dependencies are currently not implemented")
return dependencies
def _powershell_dependencies(self):
# TODO
exit(1)

Просмотреть файл

@ -7,7 +7,7 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
NAME = "azure-functions-devops-build" NAME = "azure-functions-devops-build"
VERSION = "0.0.13" VERSION = "0.0.14"
# To install the library, run the following # To install the library, run the following
# #