diff --git a/src/core/azp/cd-stages.yml b/src/core/azp/cd-stages.yml index 43318d581..c64953d32 100644 --- a/src/core/azp/cd-stages.yml +++ b/src/core/azp/cd-stages.yml @@ -11,12 +11,8 @@ stages: jobs: - job: cd_publish displayName: CD - Publish - # pool: - # vmImage: ubuntu-16.04 pool: - name: Default - demands: - - AZP_AGENT_VAGRANT -equals ${{ parameters.provider }} + vmImage: ubuntu-16.04 workspace: clean: all timeoutInMinutes: 120 @@ -27,16 +23,16 @@ stages: steps: - checkout: self submodules: recursive - - # - script: | - # dotnet tool install Cake.Tool --global --version 0.33.0 - # displayName: Init - .NET - # - script: | - # wget -q https://releases.hashicorp.com/vagrant/2.2.5/vagrant_2.2.5_x86_64.deb - # sudo dpkg -i vagrant_2.2.5_x86_64.deb - # vagrant --version - # displayName: Init - Vagrant + - script: | + dotnet tool install Cake.Tool --global --version 0.33.0 + displayName: Init - .NET + + - script: | + wget -q https://releases.hashicorp.com/vagrant/2.2.5/vagrant_2.2.5_x86_64.deb + sudo dpkg -i vagrant_2.2.5_x86_64.deb + vagrant --version + displayName: Init - Vagrant - ${{ if parameters.parent }}: - task: DownloadPipelineArtifact@2 @@ -51,25 +47,14 @@ stages: runBranch: $(Build.SourceBranch) displayName: Artifacts - Download - # - script: | - # ~/.dotnet/tools/dotnet-cake build.cake --target=publish --configuration=${{ parameters.image }}-${{ parameters.provider }}-${{ parameters.configuration }} - # displayName: Build - Publish - # env: - # VAGRANT_CLOUD_TOKEN: $(environment-vagrant-cloud-token) - - # - script: | - # ~/.dotnet/tools/dotnet-cake build.cake --target=clean - # displayName: Build - Clean - # condition: always() - - script: | - dotnet cake build.cake --target=publish --configuration=${{ parameters.image }}-${{ parameters.provider }}-${{ parameters.configuration }} + ~/.dotnet/tools/dotnet-cake build.cake --target=publish --configuration=${{ parameters.image }}-${{ parameters.provider }}-${{ parameters.configuration }} displayName: Build - Publish env: VAGRANT_CLOUD_TOKEN: $(environment-vagrant-cloud-token) - script: | - dotnet cake build.cake --target=clean + ~/.dotnet/tools/dotnet-cake build.cake --target=clean displayName: Build - Clean condition: always() diff --git a/src/core/azp/ci-stages.yml b/src/core/azp/ci-stages.yml index ad78a86e5..1d65e90fa 100644 --- a/src/core/azp/ci-stages.yml +++ b/src/core/azp/ci-stages.yml @@ -18,7 +18,7 @@ stages: - AZP_AGENT_VAGRANT -equals ${{ parameters.provider }} workspace: clean: all - timeoutInMinutes: 360 + timeoutInMinutes: 240 variables: - group: pipeline diff --git a/src/core/cake/template.cake b/src/core/cake/template.cake index 50b05bf9d..240909ea4 100644 --- a/src/core/cake/template.cake +++ b/src/core/cake/template.cake @@ -139,27 +139,12 @@ void PackerTemplate_Publish(PackerTemplate template) { var provider = template.Type.Split('-')[0]; - try { - PackerTemplate_Vagrant(template, "box add" - + $" https://vagrantcloud.com/gusztavvargadr/boxes/{template.GroupName}/versions/{template.GroupVersion}/providers/{provider}.box" - + $" --name local/gusztavvargadr/{template.Name}-deploy" - + $" --provider {provider}" - ); - - PackerTemplate_Vagrant(template, "box remove" - + $" local/gusztavvargadr/{template.Name}-deploy" - + $" --provider {provider}" - ); - } catch (Exception ex) { - PackerTemplate_Log(template, $"Error downloading box, trying uploading: {ex.Message}"); - - PackerTemplate_Vagrant(template, "cloud publish --force" - + $" gusztavvargadr/{template.GroupName}" - + $" {template.GroupVersion}" - + $" {provider}" - + $" {template.GetBuildDirectory()}/output/package/vagrant.box" - ); - } + PackerTemplate_Vagrant(template, "cloud publish --force" + + $" gusztavvargadr/{template.GroupName}" + + $" {template.GroupVersion}" + + $" {provider}" + + $" {template.GetBuildDirectory()}/output/package/vagrant.box" + ); } void PackerTemplate_Download(PackerTemplate template) {