Skip to content

[WIP][CIAM Cred Mgmt] PR3 — Release pipeline setup (SPM) - #3009

Draft
Sergei Demchenko (antrix1989) wants to merge 13 commits into
sedemche/ciam-cred-managment-releasefrom
sedemche/ciam-cred-mgmt-release-pipeline
Draft

[WIP][CIAM Cred Mgmt] PR3 — Release pipeline setup (SPM)#3009
Sergei Demchenko (antrix1989) wants to merge 13 commits into
sedemche/ciam-cred-managment-releasefrom
sedemche/ciam-cred-mgmt-release-pipeline

Conversation

@antrix1989

@antrix1989 Sergei Demchenko (antrix1989) commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a release pipeline for the MSALNativeCredManagment SDK.

Triggers

  • PR trigger: Validates on PRs to sedemche/ciam-cred-managment-release
  • Tag trigger: Full release build on tags matching credmgmt/* (e.g., credmgmt/1.0.0)

Stages

  1. Validate — 3 parallel jobs: Build & test iOS, Build & test macOS, SPM resolve + debug/release builds
  2. Release (tag-only) — Archives all platforms → creates XCFramework → publishes artifact

Distribution

  • SPM only (no CocoaPods)
  • XCFramework artifact attached to pipeline for binary consumers

Files Changed

  • azure_pipelines/cred_management/cred-management-release.yml (new)

AB#3654794

Pipeline provides:
- PR validation: builds iOS + macOS, runs unit tests, validates SPM resolution
- Release stage (tag-triggered): archives all platforms, creates XCFramework
- Versioning: semver via tag (credmgmt/<version>)
- Distribution: SPM only, with binary XCFramework artifact

AB#3654794

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@@ -0,0 +1,255 @@
# =============================================================================

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This pull request does not update CHANGELOG.md.

Please consider if this change would be noticeable to a partner or user and either update CHANGELOG.md or resolve this conversation.

@antrix1989
Sergei Demchenko (antrix1989) changed the base branch from sedemche/ciam-cred-managment-release to sedemche/ciam-cred-managment-pr1-scaffold June 9, 2026 03:52
Pipeline steps now check if lib/native/MSALNativeCredManagment exists
before attempting to cd into it. If the path is missing (e.g., on the
scaffold branch before PR2 merges), steps emit a warning and exit 0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The pipeline now has the real SDK source code from the scaffold branch.
Removed the if-not-exists guards since lib/native/MSALNativeCredManagment
is present and the pipeline should build the actual code.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Package.swift: change package reference from
  'microsoft-authentication-library-for-objc' to 'MSAL' to match the
  root package name (SPM uses the declared name, not the directory).
- Pipeline: switch macOS from build-for-testing/test-without-building
  to build/test to avoid xctestrun arch mismatch on CI runners.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SPM (Swift 6.0 / Xcode 16) uses the checkout directory name as the
package identity for path dependencies. On CI this is 's' (from
/Users/runner/work/1/s), not 'MSAL'. Using the string shorthand
'"MSAL"' lets SPM auto-resolve the product by name without needing
an explicit package identifier.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Change Package.swift from path-based (.package(path:...)) to
  URL-based (.package(url:from:)) dependency for MSAL.
  Path-based deps use directory name as package identity on CI,
  causing 'unknown package' errors.
- Add explicit -resolvePackageDependencies steps for iOS and macOS.
- Add -clonedSourcePackagesDirPath for consistent package caching.
- Remove xcpretty from macOS build to surface real errors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CI runners don't have the 'Mac Development' signing certificate.
Disable code signing for macOS build and test steps.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove tag-only condition so XCFramework builds on branch runs too
- Add package dependency resolution step to Release job
- Add code signing disable flags to all archive steps (CI has no cert)
- Add -clonedSourcePackagesDirPath to archive steps for consistency
- Use 'dev-BuildNumber' version for non-tag builds
- Remove xcpretty from archive steps (interferes with error visibility)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Base automatically changed from sedemche/ciam-cred-managment-pr1-scaffold to sedemche/ciam-cred-managment-release June 9, 2026 19:36
@antrix1989
Sergei Demchenko (antrix1989) marked this pull request as draft July 14, 2026 02:04
],
path: "MSALNativeCredManagment/src",
swiftSettings: [
.unsafeFlags(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

unsafeFlags prevents this library product from being consumed as an SPM dependency. Replace these flags with a supported target configuration so the documented installation path works.

-destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' \
-derivedDataPath $(Build.BinariesDirectory)/ios \
-clonedSourcePackagesDirPath $(Build.BinariesDirectory)/spm-packages \
| xcpretty

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Without set -o pipefail, an xcodebuild failure is masked when xcpretty exits successfully. Preserve the xcodebuild exit status so failed iOS builds fail validation.

-resultBundlePath $(Build.ArtifactStagingDirectory)/TestResults-iOS.xcresult \
| xcpretty --report junit --output $(Build.ArtifactStagingDirectory)/test-results-ios.xml
displayName: 'Run Unit Tests — iOS'
continueOnError: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Test failures are explicitly allowed here, so the Release stage can publish an XCFramework after failed tests. Remove continueOnError from both platform test steps if tests gate release.

public enum MSALNativeCredManagmentSDK
{
/// The current version of the MSALNativeCredManagment SDK.
public static let version = "0.1.0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This remains hardcoded to 0.1.0 while the release pipeline names artifacts from credmgmt/<version>. Tagged binaries will report the wrong SDK version unless the release version is injected into the build.

@antrix1989 Sergei Demchenko (antrix1989) changed the title [CIAM Cred Mgmt] PR3 — Release pipeline setup (SPM) [WIP][CIAM Cred Mgmt] PR3 — Release pipeline setup (SPM) Aug 12, 2026
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.

2 participants