Upload Bootstrapped Repository
Description of the change
This adds a step to the release CI that uploads the ready bootstrapped repository. This provides a ready development environment for people to start hacking Atom's Core without running and dealing with the bootstrap script (similar to a pre-built docker images).
Verification
The CI passes
Typo "bootstraped" --> "bootstrapped"
This gets uploaded to Azure artifacts. How do we upload it to the release page of GitHub?
With the GitHub API I think.
Making a correct HTTP POST to the API some way or other.
https://docs.github.com/en/rest/reference/repos#upload-a-release-asset
Edit:
- See this https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/github-release?view=azure-devops
- and also this file that already exists in the repo: https://github.com/atom/atom/blob/master/script/vsts/upload-artifacts.js
- See this docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/github-release?view=azure-devops
- and also this file that already exists in the repo: atom/atom:script/vsts/upload-artifacts.js@
master
It seems we already have the scripts needed for releasing. We just need to test and try it to see if we need to add some variables or tokens.
We can probably reuse the bootstrapped repository in other jobs. Now MacOS bootstraps atom 4 times in total! (each being ~10min). We can reduce this time by uploading and downloading it.
One reason for Windows tests failing is that all the tests run at once in one machine which stops responding properly. If we reuse the bootstrapped repo, we can speed up the CI.
There is probably a better way. We might just cache the repository for the next job. This is easy in GitHub actions and should be possible in Azure too. Edit: yes there exists! https://docs.microsoft.com/en-us/azure/devops/pipelines/release/caching?view=azure-devops https://devblogs.microsoft.com/devops/caching-and-faster-artifacts-in-azure-pipelines/
As far as I know, the Lighthouse thing is supposed to be doing that already. This mostly works at upstream. Not sure what's preventing it from working here. I have tried a lot of things.
As you have pointed out, the docs say to do it another way, with a separate caching feature, rather than the artifacts system.
If we can get this working, I sincerely hope upstream will do it to. Part of the reason upstream is frustrating is that it is slow. Perhaps upstream would be happy to see faster builds just as we would. (I can't think of why not!) So I'm very interested in doing this here and doing it right, per the docs and all that.
See https://github.com/atom-ide-community/atom/pull/11
Closing this. Re-open if you need it. Thanks.
I want to merge this eventually (only on release builds). We can release bootstrapped repositories with our binaries.
For the record, with master having recently had #46 merged into it, and most of the PRs being rebased lately, I want to note that this PR is currently at commit c4a6eb4bf4346e5a696ec274840818e56e5240c9. It should be easy to go back and revisit that commit, even after a rebase, having made a record of this.
As you can see most checks did not pass