Skip to content

Setting up Azure pipelines #1

Description

@aminya

We need to set up Azure pipelines to get CI similar to upstream.

Activity

  1. DeeDeeG commented on Jul 3, 2020

    @DeeDeeG
    Member

    Checking in, that all sounds good. 👍

  2. aminya commented on Jul 3, 2020

    @aminya
    MemberAuthor

    @DeeDeeG Could you set up the CI? I saw you had Azure Pipelines running on your personal account. How did you do this?

  3. DeeDeeG commented on Jul 3, 2020

    @DeeDeeG
    Member

    Someone at upstream was kind enough to put my branches up at upstream and run it themselves. I'll look into if there is a free tier of Azure Pipelines though, so we can set it up here without paying some sort of subscription.

    Edit: This looks like the place to do it. "Start free with GitHub" https://azure.microsoft.com/en-us/services/devops/pipelines/

    Kinda makes sense now that Microsoft owns Github...

  4. aminya commented on Jul 3, 2020

    @aminya
    MemberAuthor

    Someone at upstream was kind enough to put my branches up at upstream and run it themselves. I'll look into if there is a free tier of Azure Pipelines though, so we can set it up here without paying some sort of subscription.

    Edit: This looks like the place to do it. "Start free with GitHub" https://azure.microsoft.com/en-us/services/devops/pipelines/

    Kinda makes sense now that Microsoft owns Github...

    There is a free tier, but how do we get the same configuration that upstream is using? Is there a duplicate button or something, or is there a config file we need to use somewhere? I could not find anything in the repository itself.

  5. DeeDeeG commented on Jul 3, 2020

    @DeeDeeG
    Member

    Ah yeah, the config is in a pretty obscure place. I only found it because it mentions Python, and I did some PRs about being ready for Python3.

    https://github.com/atom/atom/tree/master/script/vsts

    (VSTS is short for Visual Studio Team System, which got renamed to Azure Devops Server... according to Wikipedia.)

    According to upstream's nice README.md for the CI, VSTS = Visual Studio Team Services, which dot renamed to Azure DevOps.

  6. DeeDeeG commented on Jul 3, 2020

    @DeeDeeG
    Member
  7. DeeDeeG commented on Jul 3, 2020

    @DeeDeeG
    Member

    Editing this as I go to be as complete as I can manage:

    • Visit here https://azure.microsoft.com/services/devops/pipelines/ and press "Start free with GitHub"
      • If you already have a Microsoft account, and you don't want to make one linked to your GitHub account, you can just press "Start free".
    • Visit https://dev.azure.com
    • Click the "+ New project" button (it's blue for me)
      • Fill in some details (name, description) and press "Create"
    • In the new project, click "Pipelines" in the side nav area
    • Press "New pipeline"
    • After adding the three pipelines ("Atom Nightly", "Atom Production Branches", and "Atom Pull Requests"), manual tweaking might be required.
      • They all seem to have "Pull Request" and "Continuous Integration" triggers enabled by default, even though they shouldn't.
      • Visit the Pipelines view, from the Pipelines sidebar nav entry
      • Press the specific pipeline you want to adjust
      • Press "Edit"
      • Press the "vertical three dots" button (this appears gray for me with black dots)
      • Press "Triggers" from the dropdown menu
      • Depending on which pipeline you are editing, use the "Triggers" tab to:
        • disable the "Pull request validation" trigger (for the "Atom Production Branches" pipeline)
        • disable the "Continuous integration" trigger (for the "Atom Pull requests" pipeline)
        • disable both of these triggers and add a scheduled trigger for every night at midnight (for the "Atom Nightly" pipeline)
      • Optionally use the "YAML" tab to rename the pipeline and make sure the correct yaml file is selected.
        • Don't change the "Default agent pool for YAML" setting for now, or it might break subsequent runs at the moment.
      • Press the "Save & queue" button, then "Save" or "Save & queue" to save these changes and update the pipeline.
      • Optionally enter a message explaining the edits you made to the pipeline settings.
  8. aminya commented on Jul 3, 2020

    @aminya
    MemberAuthor

    I have created the repository: https://dev.azure.com/atomcommunity/atomcommunity
    I am now trying to see how I can set up build using the files in VSTs 🤔

  9. DeeDeeG commented on Jul 3, 2020

    @DeeDeeG
    Member

    I'm curious what happens if you add a pipeline from the side nav bar area, and after authenticating to GitHub with OAuth so it can officially link up with/access this repo. (Trying to write out the instructions in my above comment, but that's where I get stuck.)

  10. DeeDeeG commented on Jul 3, 2020

    @DeeDeeG
    Member

    I'm trying it on my own personal fork now to see how far I can get and update my instructions/steps above.

  11. aminya commented on Jul 3, 2020

    @aminya
    MemberAuthor

    I added pull requests and release builds for now: https://dev.azure.com/atomcommunity/atomcommunity/_build.
    We might have to edit the release configuration once we wanted to release things with the new name.

  12. DeeDeeG commented on Jul 3, 2020

    @DeeDeeG
    Member

    I'm a bit confused about what this means, but there are "Missing tasks" required to run the CI, and supposedly these are installable via https://marketplace.visualstudio.com/ according to the error message.

  13. DeeDeeG commented on Jul 3, 2020

    @DeeDeeG
    Member

    Hmm, maybe we need to get some VMs running? In the Pipelines sidebar there is a subsection "Environments", which is empty by default.

    Disregard, I'll update if I figure something new out.

  14. DeeDeeG commented on Jul 3, 2020

    @DeeDeeG
    Member

    I created the "starter pipeline" with no errors.

    Full starter pipeline yaml (click to expand)
    # Starter pipeline
    # Start with a minimal pipeline that you can customize to build and deploy your code.
    # Add steps that build, run tests, deploy, and more:
    # https://aka.ms/yaml
    
    trigger:
    - master
    
    pool:
      vmImage: 'ubuntu-latest'
    
    steps:
    - script: echo Hello, world!
      displayName: 'Run a one-line script'
    
    - script: |
        echo Add other tasks to build, test, and deploy your project.
        echo See https://aka.ms/yaml
      displayName: 'Run a multi-line script'

    I can't tell if it's stalled waiting on an Azure Pipelines worker/VM, or because there are no actual steps in the script, so it never finishes... https://dev.azure.com/DeeDeeG/b/_build/results?buildId=3&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9

    Now to read the docs and see if I can make one that actually does something. Working toward eventually running the Linux/Windows/macOS tests from upstream Atom.

  15. 66 remaining items

  16. DeeDeeG commented on Jul 20, 2020

    @DeeDeeG
    Member

    Now that #46 is merged, and the node/npm install parts of CI aren't in platforms/$(os), we should probably add platforms/templates/preparation.yml and bootstrap.yml to the cache identifier.

    This is for the hypothetical case where we have updated Node, NPM, or some environment variables or config relevant to how the bootstrap and build should proceed.

  17. DeeDeeG commented on Jul 20, 2020

    @DeeDeeG
    Member

    CI isn't passing on master. Hmm. Not sure why.

  18. aminya commented on Jul 25, 2020

    @aminya
    MemberAuthor

    CI isn't passing on master. Hmm. Not sure why.

    This is fixed in #63

  19. linked a pull request that will close this issueParallel tests #50on Jul 25, 2020
  20. linked a pull request that will close this issuecollect console log in renderer tests #63on Jul 25, 2020
  21. DeeDeeG commented on Jul 25, 2020

    @DeeDeeG
    Member

    Glad that CI is working.

    We should disable or delete the CI steps that try to publish artifacts to Amazon S3 buckets, since we don't own an Amazon S3 account, and that step has been erroring out at the very end, making our "Release Branch Build" pipeline always look red.

    Other than that, CI is functionally working (tests passing) so that is great, thank you!

    Edit: This is a PR now: #66

  22. DeeDeeG commented on Jul 25, 2020

    @DeeDeeG
    Member

    Doing npm install is slower on Windows, due to NTFS's poor performance writing lots of small files versus EXT4.

    Interesting discussion here: https://github.com/rust-lang/rustup/issues/1540

    If possible/if it's okay with you, I'd like to revert #3 (or explicitly set to use Linux) for the GetReleaseVersion and Release CI jobs, and use forward-slashes for cross-platform/Linux compatibility: DeeDeeG@fbc3742

    Status: Will make a PR once I'm done with the stuff from my comment directly above this one.

  23. aminya commented on Jul 25, 2020

    @aminya
    MemberAuthor

    That sounds like a PR. We will not revert things on master anymore. It is OK if you want to do it in your PR.

  24. added a commit that references this issue on Aug 11, 2020
  25. DeeDeeG commented on Aug 13, 2020

    @DeeDeeG
    Member

    Linux Build in CI has been failing by exiting out after the two package formats are apparently successfully built.

    I also had a similar experience outside of CI on my personal machine, where the dpkg-deb command building the .deb package errors out.

    I think this is flakiness, not a hard "100% of the time" issue, but it's still weird.

  26. DeeDeeG commented on Aug 13, 2020

    @DeeDeeG
    Member

    Also, just a heads up that there are some more hard-coded URLs pointing to github.com/atom/atom in various parts of the repo, and semi-relatedly, if we fall behind with which tags are on our atom-nightly-releases repo vs upstream's atom-nightly-relleases repo, it can cause the Windows build to fail on building differential/"update from previous version" partial .nupkg files.

    I do think if we fix the hard-coded URLs like we did in #70, then this build failure scenario should also go away when using non-hard-coded URLs pointing to our own repos.

  27. aminya commented on Aug 17, 2020

    @aminya
    MemberAuthor

    I will close this as this is mostly done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions