Skip to content

Conversation

@josesimoes
Copy link
Member

@josesimoes josesimoes commented Feb 27, 2025

Description

  • Move to steps pattern.
  • Add step to find out what to build.
  • Add step to build, pack and publish helper.
  • Kept steps to build, pack and publish library.

Motivation and Context

  • Build and publish helper wasn't handled in the pipeline.

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (add new Unit Test(s) or improved existing one(s), has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist:

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).
  • I have added new tests to cover my changes.

Summary by CodeRabbit

  • Chores
    • Enhanced the build automation process with a restructured, multi-stage pipeline that includes automated validations and conditional execution. This updated system streamlines deployments by processing only necessary components based on detected changes, leading to faster and more reliable releases. The improvements support smoother updates and contribute to a more consistent overall experience.

@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2025

Walkthrough

The pull request refactors the pipeline configuration in the azure-pipelines.yml by introducing a multi-stage structure. It defines three sequential stages: BuildPrep, which runs pre-checks using PowerShell to determine file changes and sets output variables; BuildLibrary, which conditionally builds the library if required; and BuildHelper, which conditionally restores packages, builds the helper solution, runs tests, collects artifacts, signs, and publishes them. The pipeline also incorporates error reporting via a Discord webhook.

Changes

File Change Summary
azure-pipelines.yml Refactored pipeline into multi-stage: BuildPrep performs change checks and sets output variables; BuildLibrary conditionally builds the library; BuildHelper handles package restore, builds, tests, artifact collection, signing, and publishing with conditional triggering.

Sequence Diagram(s)

sequenceDiagram
    participant P as Pipeline
    participant R as RunPreChecks Job
    participant L as BuildLibrary Stage
    participant H as BuildHelper Stage

    P->>R: Execute pre-checks (PowerShell commands)
    R-->>P: Set BUILD_LIBRARY and BUILD_HELPER flags

    alt BUILD_LIBRARY true
        P->>L: Trigger BuildLibrary Stage (build via template, report errors)
    end

    alt BUILD_HELPER true
        P->>H: Trigger BuildHelper Stage (restore, build, test, sign, publish)
    end
Loading

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🔭 Outside diff range comments (1)
azure-pipelines.yml (1)

173-299: 🛠️ Refactor suggestion

Review BuildHelper Stage Formatting and Structure
The BuildHelper stage (lines 173–299) introduces multiple steps including NuGet restoration, building, testing, artifact collection, signing, and publishing. Verify that:

  • All nested items (such as the jobs, variables, and steps) are indented consistently.
  • Conditions and multi-line command blocks (e.g. the PowerShell signing command with backticks in lines 251–263) are correctly formatted for readability and cross-platform robustness.
    Overall, the modular approach here is sound; just ensure that the formatting adheres strictly to YAML best practices.
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 177-177: wrong indentation: expected 4 but found 2

(indentation)


[warning] 180-180: wrong indentation: expected 4 but found 2

(indentation)


[error] 185-185: trailing spaces

(trailing-spaces)


[error] 212-212: trailing spaces

(trailing-spaces)


[error] 228-228: trailing spaces

(trailing-spaces)


[error] 236-236: trailing spaces

(trailing-spaces)


[error] 242-242: trailing spaces

(trailing-spaces)


[error] 250-250: trailing spaces

(trailing-spaces)


[error] 266-266: trailing spaces

(trailing-spaces)


[error] 275-275: trailing spaces

(trailing-spaces)


[error] 292-292: trailing spaces

(trailing-spaces)


[error] 294-294: trailing spaces

(trailing-spaces)

🧹 Nitpick comments (1)
azure-pipelines.yml (1)

32-33: Remove Unnecessary Commented Pool Block
The commented-out pool configuration (lines 32–33) appears to be legacy code. If it’s no longer needed, consider removing it to simplify the file.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9dd0c43 and 37edd47.

📒 Files selected for processing (1)
  • azure-pipelines.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
azure-pipelines.yml

[warning] 49-49: wrong indentation: expected 2 but found 0

(indentation)


[warning] 52-52: wrong indentation: expected 4 but found 2

(indentation)


[error] 75-75: trailing spaces

(trailing-spaces)


[error] 77-77: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


[error] 104-104: trailing spaces

(trailing-spaces)


[error] 105-105: trailing spaces

(trailing-spaces)


[error] 106-106: trailing spaces

(trailing-spaces)


[error] 108-108: trailing spaces

(trailing-spaces)


[error] 121-121: trailing spaces

(trailing-spaces)


[warning] 146-146: wrong indentation: expected 4 but found 2

(indentation)


[error] 147-147: trailing spaces

(trailing-spaces)


[warning] 149-149: wrong indentation: expected 4 but found 2

(indentation)


[error] 167-167: trailing spaces

(trailing-spaces)


[warning] 177-177: wrong indentation: expected 4 but found 2

(indentation)


[warning] 180-180: wrong indentation: expected 4 but found 2

(indentation)


[error] 185-185: trailing spaces

(trailing-spaces)


[error] 212-212: trailing spaces

(trailing-spaces)


[error] 228-228: trailing spaces

(trailing-spaces)


[error] 236-236: trailing spaces

(trailing-spaces)


[error] 242-242: trailing spaces

(trailing-spaces)


[error] 250-250: trailing spaces

(trailing-spaces)


[error] 266-266: trailing spaces

(trailing-spaces)


[error] 275-275: trailing spaces

(trailing-spaces)


[error] 292-292: trailing spaces

(trailing-spaces)


[error] 294-294: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: nanoframework.System.Runtime.Serialization (Build preparations Running prep checks)
🔇 Additional comments (5)
azure-pipelines.yml (5)

67-123: Review PreChecks Script and Conditional Logic
The inline PowerShell script in the BuildPrep stage (lines 67–123) is central to determining which components need rebuilding. The conditions checking if the build is manual or a PR and then setting the BUILD_LIBRARY and BUILD_HELPER variables appear logical.

  • Suggestion: Double-check that the filtering (e.g. checking for files in the repo root, tests, or shared folders) aligns perfectly with the intended trigger conditions for both helper and library builds.
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 77-77: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


[error] 104-104: trailing spaces

(trailing-spaces)


[error] 105-105: trailing spaces

(trailing-spaces)


[error] 106-106: trailing spaces

(trailing-spaces)


[error] 108-108: trailing spaces

(trailing-spaces)


[error] 121-121: trailing spaces

(trailing-spaces)


108-112: Validate Library Build Trigger Condition
The condition used here to set both BUILD_LIBRARY and BUILD_HELPER to true—when files in the repo root, tests, or shared folders are modified—is concise. Please confirm that these conditions capture all scenarios requiring a library rebuild.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 108-108: trailing spaces

(trailing-spaces)


125-131: Validate Helper Build Trigger Condition
The conditional check based on the presence of files containing nanoFramework.Serialization.Helper seems appropriate for triggering the helper build. Ensure this condition continues to cover all intended helper-related file changes.


133-139: Validate Library-Specific Trigger Condition
The check for files containing nanoFramework.System.Runtime.Serialization is clear and targets library-specific changes. Verify that no additional file patterns should be included for the library build trigger.


251-263: Review Sign Packages Task Command Formatting
The inline PowerShell command for signing packages uses backticks for multi-line continuation. Please verify that the command is correctly interpreted by the pipeline agent and that all arguments (including URLs and descriptions) are formatted as intended for clarity and maintainability.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
azure-pipelines.yml (2)

32-33: Remove Unused Commented Code
There is a commented-out pool configuration here. If this configuration is no longer required, please remove it to clean up the file and avoid confusion.


62-103: Enhance Robustness: Add Error Handling for REST Calls
The inline PowerShell script invokes REST calls (lines 83 and 91) without any error handling. To prevent potential pipeline failures due to transient network issues or API errors, consider wrapping these Invoke-RestMethod calls in try–catch blocks. For example:

- $commit = Invoke-RestMethod -Uri "https://api.github.com/repos/$env:BUILD_REPOSITORY_NAME/pulls/$env:System_PullRequest_PullRequestNumber/files" -Header @{"Authorization"="$auth"} -ContentType "application/json" -Method GET
+ try {
+   $commit = Invoke-RestMethod -Uri "https://api.github.com/repos/$env:BUILD_REPOSITORY_NAME/pulls/$env:System_PullRequest_PullRequestNumber/files" -Header @{"Authorization"="$auth"} -ContentType "application/json" -Method GET
+ } catch {
+   Write-Error "Failed to fetch pull request file changes: $_"
+   Exit 1
+ }
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 77-77: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 37edd47 and 60f36c4.

📒 Files selected for processing (1)
  • azure-pipelines.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
azure-pipelines.yml

[warning] 49-49: wrong indentation: expected 2 but found 0

(indentation)


[warning] 52-52: wrong indentation: expected 4 but found 2

(indentation)


[error] 75-75: trailing spaces

(trailing-spaces)


[error] 77-77: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


[error] 104-104: trailing spaces

(trailing-spaces)


[error] 105-105: trailing spaces

(trailing-spaces)


[error] 106-106: trailing spaces

(trailing-spaces)


[error] 108-108: trailing spaces

(trailing-spaces)


[error] 121-121: trailing spaces

(trailing-spaces)


[error] 146-146: trailing spaces

(trailing-spaces)


[warning] 148-148: wrong indentation: expected 4 but found 2

(indentation)


[error] 166-166: trailing spaces

(trailing-spaces)


[warning] 178-178: wrong indentation: expected 4 but found 2

(indentation)


[error] 183-183: trailing spaces

(trailing-spaces)


[error] 210-210: trailing spaces

(trailing-spaces)


[error] 226-226: trailing spaces

(trailing-spaces)


[error] 234-234: trailing spaces

(trailing-spaces)


[error] 240-240: trailing spaces

(trailing-spaces)


[error] 248-248: trailing spaces

(trailing-spaces)


[error] 264-264: trailing spaces

(trailing-spaces)


[error] 273-273: trailing spaces

(trailing-spaces)


[error] 290-290: trailing spaces

(trailing-spaces)


[error] 292-292: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: nanoframework.System.Runtime.Serialization (Build Library Building Library)
  • GitHub Check: nanoframework.System.Runtime.Serialization (Build Helper Building Helper)
  • GitHub Check: nanoframework.System.Runtime.Serialization (Build preparations Running prep checks)
🔇 Additional comments (4)
azure-pipelines.yml (4)

48-52: Fix Indentation for Stage Definitions
YAMLlint has flagged indentation issues in this section. Ensure that each stage definition (e.g., - stage: BuildPrep) is indented by two spaces under the stages: key and that nested items (such as jobs) follow the proper indentation.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 49-49: wrong indentation: expected 2 but found 0

(indentation)


[warning] 52-52: wrong indentation: expected 4 but found 2

(indentation)


142-171: Fix Indentation in BuildLibrary Stage
YAMLlint and previous reviews have flagged indentation issues in stage definitions. Please adjust the indentation in the BuildLibrary stage (lines 142–171) so that nested keys (like displayName, condition, and jobs) follow the proper YAML structure.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 146-146: trailing spaces

(trailing-spaces)


[warning] 148-148: wrong indentation: expected 4 but found 2

(indentation)


[error] 166-166: trailing spaces

(trailing-spaces)


172-297: Fix Indentation in BuildHelper Stage and Nested Steps
Similar to the BuildLibrary stage, the BuildHelper stage appears to have indentation inconsistencies. Ensure that the stage header and all nested job definitions and steps are indented correctly (e.g., two spaces for stage items and additional indentation for nested jobs and steps) to abide by YAML best practices and avoid linting warnings.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 178-178: wrong indentation: expected 4 but found 2

(indentation)


[error] 183-183: trailing spaces

(trailing-spaces)


[error] 210-210: trailing spaces

(trailing-spaces)


[error] 226-226: trailing spaces

(trailing-spaces)


[error] 234-234: trailing spaces

(trailing-spaces)


[error] 240-240: trailing spaces

(trailing-spaces)


[error] 248-248: trailing spaces

(trailing-spaces)


[error] 264-264: trailing spaces

(trailing-spaces)


[error] 273-273: trailing spaces

(trailing-spaces)


[error] 290-290: trailing spaces

(trailing-spaces)


[error] 292-292: trailing spaces

(trailing-spaces)


75-77: Remove Trailing Whitespaces
Multiple lines are flagged by YAMLlint for having trailing spaces. Cleaning up these extraneous spaces will improve file readability and prevent potential parsing issues. Please remove the trailing whitespace on the affected lines.

Also applies to: 85-85, 93-93, 104-108, 121-121, 146-146, 166-166, 178-178, 183-183, 210-210, 226-226, 234-234, 240-240, 248-248, 264-264, 273-273, 290-292

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 75-75: trailing spaces

(trailing-spaces)


[error] 77-77: trailing spaces

(trailing-spaces)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
azure-pipelines.yml (1)

32-33: Remove Unused Commented Code
The commented-out pool configuration (# pool: and # vmImage: 'windows-latest') appears to be leftover from a previous version. If it is no longer required, please remove it to reduce clutter in the YAML file and improve maintainability.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 60f36c4 and 87ae858.

📒 Files selected for processing (1)
  • azure-pipelines.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
azure-pipelines.yml

[warning] 49-49: wrong indentation: expected 2 but found 0

(indentation)


[warning] 52-52: wrong indentation: expected 4 but found 2

(indentation)


[error] 75-75: trailing spaces

(trailing-spaces)


[error] 77-77: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


[error] 104-104: trailing spaces

(trailing-spaces)


[error] 105-105: trailing spaces

(trailing-spaces)


[error] 106-106: trailing spaces

(trailing-spaces)


[error] 108-108: trailing spaces

(trailing-spaces)


[error] 121-121: trailing spaces

(trailing-spaces)


[error] 146-146: trailing spaces

(trailing-spaces)


[warning] 148-148: wrong indentation: expected 4 but found 2

(indentation)


[error] 164-164: trailing spaces

(trailing-spaces)


[warning] 176-176: wrong indentation: expected 4 but found 2

(indentation)


[error] 181-181: trailing spaces

(trailing-spaces)


[error] 207-207: trailing spaces

(trailing-spaces)


[error] 223-223: trailing spaces

(trailing-spaces)


[error] 231-231: trailing spaces

(trailing-spaces)


[error] 237-237: trailing spaces

(trailing-spaces)


[error] 245-245: trailing spaces

(trailing-spaces)


[error] 261-261: trailing spaces

(trailing-spaces)


[error] 270-270: trailing spaces

(trailing-spaces)


[error] 287-287: trailing spaces

(trailing-spaces)


[error] 289-289: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: nanoframework.System.Runtime.Serialization (Build Library Building Library)
  • GitHub Check: nanoframework.System.Runtime.Serialization (Build Helper Building Helper)
  • GitHub Check: nanoframework.System.Runtime.Serialization (Build preparations Running prep checks)
  • GitHub Check: nanoFramework / NuGets using latest version
🔇 Additional comments (4)
azure-pipelines.yml (4)

48-141: Fix YAML Indentation & Clean Up Trailing Whitespace in BuildPrep Stage
The BuildPrep stage (lines 48–141) includes several nested definitions (e.g. stage, jobs, and steps) where YAMLlint warnings indicate incorrect indentation (e.g. expected 2–4 spaces but found less). Please adjust the indentation to ensure that the stages and nested elements follow YAML best practices. Additionally, several lines within this block have trailing whitespace (as flagged by static analysis). Removing these extra spaces will improve file cleanliness and prevent potential parsing issues.
For example, you may consider updating the stages header as follows:

-stages:
- - stage: BuildPrep
+stages:
+  - stage: BuildPrep

This comment echoes previous feedback provided in past review comments.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 49-49: wrong indentation: expected 2 but found 0

(indentation)


[warning] 52-52: wrong indentation: expected 4 but found 2

(indentation)


[error] 75-75: trailing spaces

(trailing-spaces)


[error] 77-77: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


[error] 104-104: trailing spaces

(trailing-spaces)


[error] 105-105: trailing spaces

(trailing-spaces)


[error] 106-106: trailing spaces

(trailing-spaces)


[error] 108-108: trailing spaces

(trailing-spaces)


[error] 121-121: trailing spaces

(trailing-spaces)


142-169: Review BuildLibrary Stage Formatting
In the BuildLibrary stage (lines 142–169), similar indentation issues and trailing whitespace concerns exist. Ensure that the stage definition, its condition, and nested job elements are indented properly relative to the parent stages key. For example, each stage definition should be indented by two spaces under stages: and nested items (like jobs:) should have an additional two spaces.
A diff suggestion might be:

- stage: BuildLibrary
+  - stage: BuildLibrary

Please verify that all trailing spaces (e.g., on line 146) are removed.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 146-146: trailing spaces

(trailing-spaces)


[warning] 148-148: wrong indentation: expected 4 but found 2

(indentation)


[error] 164-164: trailing spaces

(trailing-spaces)


170-294: Ensure Consistency and Correctness in BuildHelper Stage
The BuildHelper stage (lines 170–294) is structured well overall; however, double-check that the indentation aligns with YAML expectations as in the previous stages. In addition, verify that the conditional check based on the output variable BUILD_HELPER functions as intended. Finally, please remove any trailing whitespace present in this section to adhere to style guidelines.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 176-176: wrong indentation: expected 4 but found 2

(indentation)


[error] 181-181: trailing spaces

(trailing-spaces)


[error] 207-207: trailing spaces

(trailing-spaces)


[error] 223-223: trailing spaces

(trailing-spaces)


[error] 231-231: trailing spaces

(trailing-spaces)


[error] 237-237: trailing spaces

(trailing-spaces)


[error] 245-245: trailing spaces

(trailing-spaces)


[error] 261-261: trailing spaces

(trailing-spaces)


[error] 270-270: trailing spaces

(trailing-spaces)


[error] 287-287: trailing spaces

(trailing-spaces)


[error] 289-289: trailing spaces

(trailing-spaces)


246-258: Verify Multi-line PowerShell Command in Signing Task
Within the BuildHelper stage, the task at lines 246–258 uses a multi-line PowerShell command with backticks (`) for continuing the command. Please ensure that the use of backticks is correct for the Azure Pipelines environment and that all parameters (especially those containing spaces) are properly quoted and escaped. It may be beneficial to test the sign task separately to confirm that the intended behavior is achieved.

@josesimoes josesimoes force-pushed the add-ci-cd-helper branch 2 times, most recently from 8470af5 to bd8b735 Compare February 27, 2025 13:20
- Move to steps pattern.
- Add step to find out what to build.
- Add step to build, pack and publish helper.
- Kept steps to build, pack and publish library.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
azure-pipelines.yml (2)

32-33: Clarify or Remove Commented Pool Directive

The commented-out pool definition here is not clearly serving a purpose. If this block is retained for future reference, consider adding an explanatory comment; otherwise, it might be best to remove it to keep the file clean.


48-141: Ensure Consistent YAML Formatting & Robustness in BuildPrep Stage

The new BuildPrep stage is well structured and introduces a useful pre-check step with an inline PowerShell script to determine which components need building. However, note the following:

  • YAML Formatting: YAMLlint has flagged indentation and trailing whitespace issues (e.g., expected an indent of 2 for list items under the stages: key). Please adjust the indentation to:
    -stages:
    -- stage: BuildPrep
    +stages:
    +  - stage: BuildPrep
  • Error Handling Suggestion: The inline PowerShell script makes REST API calls to GitHub. To improve robustness, consider adding error handling for API failures (for example, checking if the $commit variable is null or if the REST call returns an error).
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 49-49: wrong indentation: expected 2 but found 0

(indentation)


[warning] 52-52: wrong indentation: expected 4 but found 2

(indentation)


[error] 75-75: trailing spaces

(trailing-spaces)


[error] 77-77: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


[error] 104-104: trailing spaces

(trailing-spaces)


[error] 105-105: trailing spaces

(trailing-spaces)


[error] 106-106: trailing spaces

(trailing-spaces)


[error] 108-108: trailing spaces

(trailing-spaces)


[error] 121-121: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 87ae858 and c8e755e.

📒 Files selected for processing (1)
  • azure-pipelines.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
azure-pipelines.yml

[warning] 49-49: wrong indentation: expected 2 but found 0

(indentation)


[warning] 52-52: wrong indentation: expected 4 but found 2

(indentation)


[error] 75-75: trailing spaces

(trailing-spaces)


[error] 77-77: trailing spaces

(trailing-spaces)


[error] 85-85: trailing spaces

(trailing-spaces)


[error] 93-93: trailing spaces

(trailing-spaces)


[error] 104-104: trailing spaces

(trailing-spaces)


[error] 105-105: trailing spaces

(trailing-spaces)


[error] 106-106: trailing spaces

(trailing-spaces)


[error] 108-108: trailing spaces

(trailing-spaces)


[error] 121-121: trailing spaces

(trailing-spaces)


[error] 146-146: trailing spaces

(trailing-spaces)


[warning] 148-148: wrong indentation: expected 4 but found 2

(indentation)


[error] 164-164: trailing spaces

(trailing-spaces)


[warning] 176-176: wrong indentation: expected 4 but found 2

(indentation)


[error] 181-181: trailing spaces

(trailing-spaces)


[error] 199-199: trailing spaces

(trailing-spaces)


[error] 216-216: trailing spaces

(trailing-spaces)


[error] 224-224: trailing spaces

(trailing-spaces)


[error] 230-230: trailing spaces

(trailing-spaces)


[error] 238-238: trailing spaces

(trailing-spaces)


[error] 254-254: trailing spaces

(trailing-spaces)


[error] 263-263: trailing spaces

(trailing-spaces)


[error] 280-280: trailing spaces

(trailing-spaces)


[error] 282-282: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: nanoframework.System.Runtime.Serialization (Build Library Building Library)
  • GitHub Check: nanoframework.System.Runtime.Serialization (Build Helper Building Helper)
  • GitHub Check: nanoframework.System.Runtime.Serialization (Build preparations Running prep checks)
🔇 Additional comments (2)
azure-pipelines.yml (2)

142-170: Fix Indentation in BuildLibrary Stage

The BuildLibrary stage correctly conditions the build based on the pre-check outputs. However, YAMLlint indicates improper indentation—particularly, the jobs block and its nested job definition require an extra level of indentation. For example:

-  jobs:
-  - job: BuildLibrary
+  jobs:
+    - job: BuildLibrary

Also, please remove any trailing spaces as flagged by YAMLlint to avoid potential parsing issues.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 146-146: trailing spaces

(trailing-spaces)


[warning] 148-148: wrong indentation: expected 4 but found 2

(indentation)


[error] 164-164: trailing spaces

(trailing-spaces)


170-287: Review BuildHelper Stage Indentation & Inline Command Formatting

The BuildHelper stage’s structure (which includes package restoration, building, testing, signing, and publishing) is functionally solid. Nonetheless, similar YAML formatting issues exist here:

  • Indentation: The stage and its child jobs should be indented consistently under the stages: key. For example, the stage definition should be:
    - stage: BuildHelper
    +  - stage: BuildHelper
    and the job definitions should receive an extra indent level.
  • Trailing Whitespaces: Please remove trailing spaces across the stage (as indicated by YAMLlint errors on several lines) to ensure file cleanliness.
  • Inline Command Consistency: Verify that the multi-line PowerShell command used for signing packages (lines 239–251) uses backticks correctly and has no extraneous whitespace that might affect command parsing.

These adjustments, combined with the fixes from the BuildPrep and BuildLibrary stages, will ensure a consistent, clean, and robust YAML configuration.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 176-176: wrong indentation: expected 4 but found 2

(indentation)


[error] 181-181: trailing spaces

(trailing-spaces)


[error] 199-199: trailing spaces

(trailing-spaces)


[error] 216-216: trailing spaces

(trailing-spaces)


[error] 224-224: trailing spaces

(trailing-spaces)


[error] 230-230: trailing spaces

(trailing-spaces)


[error] 238-238: trailing spaces

(trailing-spaces)


[error] 254-254: trailing spaces

(trailing-spaces)


[error] 263-263: trailing spaces

(trailing-spaces)


[error] 280-280: trailing spaces

(trailing-spaces)


[error] 282-282: trailing spaces

(trailing-spaces)

@sonarqubecloud
Copy link

@josesimoes josesimoes merged commit 192d257 into main Feb 27, 2025
9 checks passed
@josesimoes josesimoes deleted the add-ci-cd-helper branch February 27, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants