-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Switching to Jobs from Phases for YAML and also switch to new pools. #3062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
chcosta
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 }} |
There was a problem hiding this comment.
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: {} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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')) }}: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
chcosta
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
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: trueThere was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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') }}:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
90cf3ad to
b130d41
Compare
|
Ack on the docker issue. |
|
closing and re-opening... |
|
@chcosta |
| strategy: '' | ||
|
|
||
| # Job timeout | ||
| timeoutInMinutes: 120 |
There was a problem hiding this comment.
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.
|
closing PR in favor of: #3078 |
….2 (dotnet#3062) - Microsoft.DotNet.Cli.Runtime - 3.1.100-preview1.19504.2
No description provided.