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 vsts.release.v4_1.models as models
from vsts.exceptions import VstsServiceError
from ..base.base_manager import BaseManager
from ..pool.pool_manager import PoolManager
from ..constants import (LINUX_CONSUMPTION, LINUX_DEDICATED, WINDOWS)
@ -48,7 +49,8 @@ class ReleaseManager(BaseManager):
elif app_type == WINDOWS:
workflowtasks.append(self._app_service_deploy_task_windows(service_endpoint.id, functionapp_name))
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)
if settings is not None:
@ -57,7 +59,9 @@ class ReleaseManager(BaseManager):
settings_str += (setting[0] + "='" + setting[1] + "'")
# Check that settings were actually set otherwise we don't want to use the task
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)
@ -74,7 +78,6 @@ class ReleaseManager(BaseManager):
conditions=[condition]
)
release_definition = models.release_definition.ReleaseDefinition(
name=release_definition_name,
environments=[release_definition_environment],
@ -110,7 +113,8 @@ class ReleaseManager(BaseManager):
def _get_service_endpoint_by_name(self, project, service_endpoint_name):
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):
"""Helper function to get the pool object from its name"""
@ -142,7 +146,7 @@ class ReleaseManager(BaseManager):
def _get_deployment_input(self, pool_id):
deployment_input = {}
deployment_input["parallelExecution"] = { "parallelExecutionType": 0 }
deployment_input["parallelExecution"] = {"parallelExecutionType": 0}
deployment_input["queueId"] = pool_id
return deployment_input
@ -198,17 +202,17 @@ class ReleaseManager(BaseManager):
def _get_pre_post_approvals(self):
pre_approval = models.release_definition_approval_step.ReleaseDefinitionApprovalStep(
id = 0,
rank = 1,
is_automated = True,
is_notification_on = False
id=0,
rank=1,
is_automated=True,
is_notification_on=False
)
post_approval = models.release_definition_approval_step.ReleaseDefinitionApprovalStep(
id = 0,
rank = 1,
is_automated = True,
is_notification_on = False
id=0,
rank=1,
is_automated=True,
is_notification_on=False
)
@ -270,7 +274,9 @@ class ReleaseManager(BaseManager):
appsetttingstask_inputs["ConnectedServiceName"] = connectedServiceNameARM
appsetttingstask_inputs["WebAppName"] = functionapp_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
return appsetttingstask

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

@ -6,7 +6,7 @@
import os.path as path
import logging
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
class YamlManager(object):
@ -128,13 +128,3 @@ class YamlManager(object):
dependencies.append(" modifyOutputPath: true")
dependencies.append(" zipAfterPublish: false")
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
NAME = "azure-functions-devops-build"
VERSION = "0.0.13"
VERSION = "0.0.14"
# To install the library, run the following
#