[WIP][CIAM Cred Mgmt] PR3 — Release pipeline setup (SPM) - #3009
[WIP][CIAM Cred Mgmt] PR3 — Release pipeline setup (SPM)#3009Sergei Demchenko (antrix1989) wants to merge 13 commits into
Conversation
…ativeCredManagment.md
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 @@ | |||
| # ============================================================================= | |||
There was a problem hiding this comment.
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.
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>
…ithub.com/AzureAD/microsoft-authentication-library-for-objc into sedemche/ciam-cred-mgmt-release-pipeline
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>
| ], | ||
| path: "MSALNativeCredManagment/src", | ||
| swiftSettings: [ | ||
| .unsafeFlags( |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
Summary
Adds a release pipeline for the MSALNativeCredManagment SDK.
Triggers
sedemche/ciam-cred-managment-releasecredmgmt/*(e.g.,credmgmt/1.0.0)Stages
Distribution
Files Changed
azure_pipelines/cred_management/cred-management-release.yml(new)AB#3654794