Skip to content
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

Automated CI Pipeline #118

Closed
wants to merge 29 commits into from
Closed

Automated CI Pipeline #118

wants to merge 29 commits into from

Conversation

tayomadein
Copy link
Contributor

@tayomadein tayomadein commented Nov 3, 2022

Overview

An automated ADO pipeline to push to the MR GraphicsTool package to MRTK NPM feed

Changes

Verification (Before Merge)

  • Check that NPM feed for the test version pushed via the pipeline

Post-merge tasks

  • Remove current branch from exclude list.
  • Update pipeline to point to main
  • Create a new release tag for 0.4.14

Verification (After Merge)

  • Check that the latest release is pushed to the MRTK NPM feed.
  • Check that the pipeline only runs for release tags.

@tayomadein tayomadein changed the title User tayomadein ci cd Automated CI Pipeline Nov 3, 2022
Pipelines/Config/settings.yaml Outdated Show resolved Hide resolved
Comment on lines 22 to 29
trigger:
tags:
include:
- '*'
branches:
exclude:
- main
- user-tayomadein-ci-cd
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the idea here to only run this when a tag is created? Or is there also the goal of running on every merge or something?

I'm mostly wondering about the explicit exclusion of main. Is there a specific branch that's used for releases?

Copy link
Contributor Author

@tayomadein tayomadein Nov 4, 2022

Choose a reason for hiding this comment

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

Yes, the goal here is to run the pipeline only when a tag is created, running on every merge to main will make the publish task for the job fail and it will be failing because the package name will already exist in the pipeline.

Sample: https://dev.azure.com/EDT/MRTK/_build/results?buildId=78387&view=logs&j=00a17365-9fc3-5f6d-b77f-ab9491956439&t=6657bc81-5a29-5f52-a71a-7b7eb826b852&l=24

Currently, main is used for releases, I am looking to include a flow that only recognizes tags as the release. What do you think about this approach.?


- checkout: PipelineTools

- pwsh: Write-Host "##vso[build.updatebuildnumber]$(MRTKGraphicsToolsVersion)"
Copy link
Contributor

Choose a reason for hiding this comment

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

Will $(MRTKGraphicsToolsVersion) change for each run? If not, you might want to update this to make the build number unique. If it will, then no problem!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current plan is to run for tags, in that case, $(MRTKGraphicsToolsVersion) will change for each run.

Copy link
Member

@Cameron-Micka Cameron-Micka left a comment

Choose a reason for hiding this comment

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

This is amazing, thanks for getting this PR up so quickly! I've added @keveleigh as a reviewer since I'm not versed in PowerShell/YAML or how our pipelines work.

# Note that when updating this value also ensure that you update the
# following locations to match. There will be a CI failure if they don't
# match (see scripts/packaging/versionmetadata.ps1)
# ProjectSettings/ProjectSettings.asset: bundleVersion: x.x.x
Copy link
Member

Choose a reason for hiding this comment

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

Could you explain this requirement? Do we need to update the bundleVersion and metroPackageVersion when we change the MRTKGraphicsToolsVersion?

- '*'
branches:
exclude:
- main
Copy link
Member

Choose a reason for hiding this comment

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

Sorry I'm not familiar with this syntax. Does this mean these branches are not considered for the trigger?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, my goal is to exclude main from the trigger so it doesn't run for every merge to main.

Copy link
Member

Choose a reason for hiding this comment

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

Oh okay, that makes sense. I wonder if we need to exclude "all branches" and only look for when tags change?

Pipelines/ci.yaml Show resolved Hide resolved
test exclude

remove settings usage

test version

Update ci.yaml

Update ci.yaml

Update ci.yaml
@Cameron-Micka
Copy link
Member

Closing since this is no longer needed.

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.

Create an automated pipeline to push to the MRTK NPM feed
3 participants