Skip to content

Fix Linux CI to actually run inside a docker container #574

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

Merged
merged 1 commit into from
Jul 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .vsts-dotnet-ci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
resources:
containers:
- container: centos7
image: microsoft/dotnet-buildtools-prereqs:centos-7-b46d863-20180719033416

phases:
- template: /build/ci/phase-template.yml
parameters:
name: Linux
buildScript: ./build.sh
queue:
container: centos7
dockerImage: microsoft/dotnet-buildtools-prereqs:centos-7-b46d863-20180719033416

- template: /build/ci/phase-template.yml
parameters:
Expand Down
4 changes: 4 additions & 0 deletions build/ci/phase-template.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
parameters:
name: ''
buildScript: ''
dockerImage: ''
queue: {}

phases:
- phase: ${{ parameters.name }}
variables:
_buildScript: ${{ parameters.buildScript }}
_phaseName: ${{ parameters.name }}
# if dockerImage is not equal to '' then run under docker container
${{ if ne(parameters.dockerImage, '') }}:
_PREVIEW_VSTS_DOCKER_IMAGE: ${{ parameters.dockerImage }}
Copy link
Member

Choose a reason for hiding this comment

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

@chcosta - do you have any idea how long we will need to continue using this "preview" feature in VSTS? And when a replacement will be possible?

Copy link
Member

Choose a reason for hiding this comment

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

I'm experimenting with using resources / containers in CI now (https://github.com/dotnet/arcade/pull/349/files). Clearly, I've been fighting the system. I'm also talking with VSTS folks as I encounter issues. I hope to have something working (or a definitive "this doesn't work") in the next day or so.

Copy link
Member Author

Choose a reason for hiding this comment

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

For me with resources it didn't work. I tried adding the container image as the full name
microsoft/dotnet-buildtools-prereqs:centos-7-b46d863-20180719033416

and I also tried spliting it:

image: dotnet-buildtools-prereqs:centos-7-b46d863-20180719033416
endpoint: microsoft

and it didn't work. That is why I switched to the variable.

queue:
parallel: 2
matrix:
Expand Down