Skip to content

Conversation

@livarcocc
Copy link
Contributor

No description provided.

@livarcocc livarcocc added this to the 3.0.1xx milestone Mar 29, 2019
@livarcocc livarcocc requested review from a team and chcosta March 29, 2019 20:12
Copy link
Member

@chcosta chcosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For confidence, when I'm making changes like this. I like to manually push to the internal git repo and schedule a build to validate the internal builds are still working before I merge a major yaml change.

eng/build.yml Outdated
strategy: {}

# Job timeout
timeoutInMinutes: 180
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, your default is 180, but you're explicitly passing 120 everywhere. You might just set the default to 120 and then not override the default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
/p:PB_PublishType=$(_PublishType)
_SignArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
- ${{ insert }}: ${{ parameters.variables }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this might work, but only because you only have one variable defined in .vsts-ci.yml. As soon as you add another variable, I think yaml will get confused because you'll be trying to insert the yaml variables "object" into the variables "array" and it won't know what to do with that. The way to fix this would be to change .vsts-ci.yml to pass variables as an array...

      variables:
      - _PREVIEW_VSTS_DOCKER_IMAGE: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-e435274-20180628134544

… and then insert each of those items here like we do in job.yml...

https://github.com/dotnet/arcade/blob/master/eng/common/templates/job/job.yml#L89-L109

eng/build.yml Outdated
phases:
- template: /eng/common/templates/phases/base.yml
# Build strategy - matrix
strategy: {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this to '' so that it aligns properly with the condition below that is checking to see if "strategy" is an empty string or not. I'm not sure if the comparison of {} resolves to '' or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

eng/build.yml Outdated
TargetFolder: '$(Build.ArtifactStagingDirectory)'
continueOnError: true
condition: not(succeeded())
- ${{ if and(eq(parameters.enablePublishBuildAssets, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to delete this section of code as it is handled automatically by job.yml since you specified enablePublishBuildAssets=true above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

_DotNetPublishToBlobFeed: true

phases:
jobs:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variables above need to be defined using the array syntax. You can either define variables using the object syntax or the array syntax, but you can't mix n' match.

https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/PhaseToJobSchemaChange.md#phase-to-job-schema-transition

We've settled on the array syntax because the object syntax doesn't support variable groups. In its current state, I think all of the above variables will just get silently ignored.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

@chcosta chcosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One not, one comment, and I think you're aware that the docker thing will probably be broken until addressed.

.vsts-ci.yml Outdated
PB_PublishBlobFeedKey:
PB_PublishBlobFeedUrl:
_DotNetPublishToBlobFeed: false
- name: PB_PublishBlobFeedUrl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: For variables defined using array syntax, you could just define the default and then override with the internal condition. ie.

variables:
- name: teamName
  value: Roslyn-Project-System
- name: PB_PublishBlobFeedUrl
  value: ''
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
  - name: PB_PublishBlobFeedUrl
    value: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
  - name: _DotNetPublishToBlobFeed
    value: true

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

.vsts-ci.yml Outdated
PB_PublishBlobFeedKey:
PB_PublishBlobFeedUrl:
_DotNetPublishToBlobFeed: false
- name: PB_PublishBlobFeedUrl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conditions in this variables block have to be treated the same way as the rest of the values in the object. ie, you have to treat them as array entries meaning prefix them with -

ie - ${{ if eq(variables['System.TeamProject'], 'public') }}:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@livarcocc livarcocc force-pushed the change_yaml_to_use_jobs branch from 90cf3ad to b130d41 Compare April 1, 2019 23:11
@livarcocc
Copy link
Contributor Author

Ack on the docker issue.

@johnbeisner
Copy link
Contributor

closing and re-opening...

@johnbeisner johnbeisner closed this Apr 4, 2019
@johnbeisner johnbeisner reopened this Apr 4, 2019
@johnbeisner
Copy link
Contributor

@chcosta
Why do the legs timeout at 60 minutes when the variable "timeoutInMinutes" is set to "120"?

@johnbeisner johnbeisner closed this Apr 4, 2019
@johnbeisner johnbeisner reopened this Apr 4, 2019
@johnbeisner johnbeisner closed this Apr 4, 2019
@johnbeisner johnbeisner reopened this Apr 4, 2019
strategy: ''

# Job timeout
timeoutInMinutes: 120
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't appear that this property (timeoutInMinutes) is being passed through to the job.yml template.

@johnbeisner
Copy link
Contributor

closing PR in favor of: #3078

@johnbeisner johnbeisner closed this Apr 4, 2019
dsplaisted pushed a commit to dsplaisted/sdk that referenced this pull request Feb 19, 2020
….2 (dotnet#3062)

- Microsoft.DotNet.Cli.Runtime - 3.1.100-preview1.19504.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants