Saving name of library in variable group and mv previos version to folder oldversions
Former-commit-id: 0b051a85b3e1229cac0f2a0fcae4135d6abf65e7
This commit is contained in:
Родитель
288fade3ca
Коммит
fbfc25cb41
|
@ -35,10 +35,13 @@ stages:
|
|||
azureServiceConnection: ${{ parameters.azureServiceConnection }}
|
||||
- script: |
|
||||
echo "DBFS URL ${DATABRICKS_HOST}"
|
||||
echo "Delete previous versions od the library in cluster ${DATABRICKS_LIB_PATH}"
|
||||
databricks fs rm -r "${DATABRICKS_LIB_PATH}/dataopslib*.whl"
|
||||
echo "Copy library in cluster from ${PYPI_REPO} to ${DATABRICKS_LIB_PATH}"
|
||||
databricks fs cp --overwrite -r "${PYPI_REPO}" "${DATABRICKS_LIB_PATH}"
|
||||
echo "Move previous versions of the library in cluster from ${DATABRICKS_LIB_PATH}/new_version/ ${DATABRICKS_LIB_PATH}/old_version"
|
||||
databricks fs mkdirs "${DATABRICKS_LIB_PATH}/old_version"
|
||||
databricks fs mkdirs "${DATABRICKS_LIB_PATH}/new_version"
|
||||
databricks fs cp --overwrite -r "${DATABRICKS_LIB_PATH}/new_version/" "${DATABRICKS_LIB_PATH}/old_version/"
|
||||
databricks fs rm -r "${DATABRICKS_LIB_PATH}/new_version/dataops*.whl"
|
||||
echo "Copy library in cluster from ${PYPI_REPO} to ${DATABRICKS_LIB_PATH}/new_version/"
|
||||
databricks fs cp --overwrite -r "${PYPI_REPO}" "${DATABRICKS_LIB_PATH}/new_version/"
|
||||
env:
|
||||
DATABRICKS_HOST: https://$(databricksWorkspaceUrl)
|
||||
DATABRICKS_TOKEN: $(DATABRICKS_TOKEN)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
parameters:
|
||||
- name: libraryDirectory
|
||||
type: string
|
||||
|
@ -142,9 +141,14 @@ jobs:
|
|||
|
||||
- script: |
|
||||
python setup.py bdist_wheel
|
||||
ls dist/
|
||||
file=$(ls dist/)
|
||||
echo "$file"
|
||||
az pipelines variable-group variable update --group-id $groupId --name VERSION --value "$file"
|
||||
displayName: "Build the library"
|
||||
workingDirectory: ${{ parameters.libraryDirectory }}
|
||||
env:
|
||||
groupId: $(variable_group_id)
|
||||
package_version: $(package_version)
|
||||
|
||||
- task: TwineAuthenticate@0
|
||||
|
@ -156,11 +160,11 @@ jobs:
|
|||
workingDirectory: ${{ parameters.libraryDirectory }}
|
||||
displayName: "Publish the library"
|
||||
|
||||
- script: |
|
||||
- script: |
|
||||
az pipelines variable-group variable update --group-id $groupId --name MINOR --value $minor
|
||||
az pipelines variable-group variable update --group-id $groupId --name PATCH --value $patch
|
||||
displayName: "Update versions on variable group"
|
||||
env:
|
||||
groupId: $(variable_group_id)
|
||||
minor: $(minor)
|
||||
patch: $(patch)
|
||||
patch: $(patch)
|
|
@ -17,6 +17,7 @@ function CreateAzDevOpsVariableGroups {
|
|||
CreateAzureDevOpsVariable -VariableGroupName "lib-versions" -AzureDevOpsOrganizationURI $RepoConfiguration.AzureDevOpsOrganizationURI -AzureDevOpsProject $RepoConfiguration.AzureDevOpsProject -VariableName "MAJOR" -VariableValue "0"
|
||||
CreateAzureDevOpsVariable -VariableGroupName "lib-versions" -AzureDevOpsOrganizationURI $RepoConfiguration.AzureDevOpsOrganizationURI -AzureDevOpsProject $RepoConfiguration.AzureDevOpsProject -VariableName "MINOR" -VariableValue "1"
|
||||
CreateAzureDevOpsVariable -VariableGroupName "lib-versions" -AzureDevOpsOrganizationURI $RepoConfiguration.AzureDevOpsOrganizationURI -AzureDevOpsProject $RepoConfiguration.AzureDevOpsProject -VariableName "PATCH" -VariableValue "0"
|
||||
CreateAzureDevOpsVariable -VariableGroupName "lib-versions" -AzureDevOpsOrganizationURI $RepoConfiguration.AzureDevOpsOrganizationURI -AzureDevOpsProject $RepoConfiguration.AzureDevOpsProject -VariableName "VERSION" -VariableValue ""
|
||||
}
|
||||
|
||||
function GetAzureDevOpsVariableGroup {
|
||||
|
|
Загрузка…
Ссылка в новой задаче