-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from ForgeRock/develop
Ping SDK 1.0.0 Release
- Loading branch information
Showing
177 changed files
with
17,294 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# JIRA Ticket | ||
|
||
[JIRA](https://bugster.forgerock.org/jira/browse/SDKS-xxx) "Jira ticket title..." | ||
|
||
# Description | ||
|
||
Briefly describe the change and any information that would help speedup the review and testing process. | ||
|
||
# Checklist: | ||
|
||
- [ ] I ran all unit tests and they pass | ||
- [ ] I added test case coverage for my changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Build and Test | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
SLACK_WEBHOOK: | ||
description: 'Slack Notifier Webhook' | ||
required: true | ||
jobs: | ||
build-and-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-14, macos-14-large] | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 20 | ||
|
||
steps: | ||
# Clone the repo | ||
- name: Clone the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
fetch-depth: 0 | ||
|
||
# Get the architecture of the chip | ||
- name: Check chip architecture | ||
run: echo "CHIP_TYPE=$(uname -m)" >> $GITHUB_ENV | ||
|
||
# Set target Xcode version. For more details and options see: | ||
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-14-Readme.md | ||
- name: Select Xcode | ||
run: sudo xcode-select -switch /Applications/Xcode_15.4.app && /usr/bin/xcodebuild -version | ||
|
||
# Run all tests | ||
- name: Run tests | ||
run: xcodebuild test -scheme PingTestHost -workspace SampleApps/Ping.xcworkspace -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 15 Pro Max,OS=17.5' -derivedDataPath DerivedData -enableCodeCoverage YES -resultBundlePath TestResults | xcpretty && exit ${PIPESTATUS[0]} | ||
|
||
# Publish test results | ||
- name: Publish test results | ||
uses: kishikawakatsumi/xcresulttool@v1 | ||
with: | ||
title: "Test Results ${{ matrix.os }} - ${{ env.CHIP_TYPE }}" | ||
path: TestResults.xcresult | ||
show-passed-tests: false | ||
if: success() || failure() | ||
|
||
# Send slack notification with result status | ||
- uses: 8398a7/action-slack@v3 | ||
with: | ||
mention: 'stoyan.petrov' | ||
if_mention: 'failure,cancelled' | ||
fields: repo,author,eventName,message,job,pullRequest,took | ||
status: ${{ job.status }} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | ||
if: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: CI | ||
|
||
# Trigger on push or pull request | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
# Build and run unit tests | ||
build-and-test: | ||
name: Build and test | ||
uses: ./.github/workflows/build-and-test.yaml | ||
secrets: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
|
||
# Run Mend CLI Scan | ||
mend-cli-scan: | ||
name: Mend CLI Scan | ||
uses: ./.github/workflows/mend-cli-scan.yaml | ||
secrets: | ||
MEND_EMAIL: ${{ secrets.MEND_EMAIL }} | ||
MEND_USER_KEY: ${{ secrets.MEND_USER_KEY }} | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
name: Run Mend CLS Scan | ||
on: | ||
workflow_call: | ||
secrets: | ||
MEND_EMAIL: | ||
description: Mend email | ||
required: true | ||
MEND_USER_KEY: | ||
description: Mend user key | ||
required: true | ||
SLACK_WEBHOOK: | ||
description: Slack Notifier Incoming Webhook | ||
required: true | ||
|
||
jobs: | ||
mend-cli-scan: | ||
runs-on: macos-14 | ||
|
||
steps: | ||
# Clone the repo | ||
- name: Clone the repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
fetch-depth: 0 | ||
|
||
# Set target Xcode version. For more details and options see: | ||
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md | ||
- name: Select Xcode | ||
run: sudo xcode-select -switch /Applications/Xcode_15.4.app && /usr/bin/xcodebuild -version | ||
|
||
# Setup Mend CLI | ||
- name: Download and cache the Mend CLI executable | ||
id: cache-mend | ||
uses: actions/cache@v3 | ||
env: | ||
mend-cache-name: cache-mend-executable | ||
with: | ||
path: /usr/local/bin/mend | ||
key: ${{ runner.os }}-${{ env.mend-cache-name }}-${{ hashFiles('/usr/local/bin/mend') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.mend-cache-name }}- | ||
# Download Mend CLI if it's not cached... | ||
- if: ${{ steps.cache-mend.outputs.cache-hit != 'true' }} | ||
name: Download Mend CLI executable (cache miss...) | ||
continue-on-error: true | ||
run: | | ||
echo "Download Mend CLI executable (cache miss...)" | ||
curl https://downloads.mend.io/cli/darwin_amd64/mend -o /usr/local/bin/mend && chmod +x /usr/local/bin/mend | ||
# Execute the Mend CLI scan | ||
- name: Mend CLI Scan | ||
env: | ||
MEND_EMAIL: ${{secrets.MEND_EMAIL}} | ||
MEND_USER_KEY: ${{secrets.MEND_USER_KEY}} | ||
MEND_URL: ${{ vars.MEND_SERVER_URL }} | ||
run: | | ||
mend dep --no-color -s ${{ vars.MEND_PRODUCT_NAME }}//${{ vars.MEND_PROJECT_NAME }} -u > mend-scan-result.txt | ||
echo "MEND_SCAN_URL=$(cat mend-scan-result.txt | grep -Eo '(http|https)://[a-zA-Z0-9./?!=_%:-\#]*')" >> $GITHUB_ENV | ||
echo "MEND_SCAN_SUMMARY=$(cat mend-scan-result.txt | grep -Eoiw '(Detected [0-9]* vulnerabilities.*)')" >> $GITHUB_ENV | ||
echo "MEND_CRITICAL_COUNT=$(cat mend-scan-result.txt | grep -Eoiw '(Detected [0-9]* vulnerabilities.*)' | grep -oi '[0-9]* Critical' | grep -o [0-9]*)" >> $GITHUB_ENV | ||
echo "MEND_HIGH_COUNT=$(cat mend-scan-result.txt | grep -Eoiw '(Detected [0-9]* vulnerabilities.*)' | grep -oi '[0-9]* High' | grep -o [0-9]*)" >> $GITHUB_ENV | ||
# Check for failures and set the outcome of the workflow | ||
- name: Parse the result and set job status | ||
if: always() | ||
run: | | ||
if [ '${{ env.MEND_CRITICAL_COUNT }}' -gt '0' ] || [ '${{ env.MEND_HIGH_COUNT }}' -gt '0' ]; then | ||
exit 1 | ||
else | ||
exit 0 | ||
fi | ||
# Publish the result | ||
- name: Mend Scan Result | ||
uses: LouisBrunner/[email protected] | ||
if: always() | ||
with: | ||
name: "Mend Scan Result" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
conclusion: ${{ job.status }} | ||
output_text_description_file: mend-scan-result.txt | ||
output: | | ||
{"title":"Mend Scan Result", "summary":"${{ job.status }}"} | ||
# Send slack notification with result status | ||
- name: Send slack notification | ||
uses: 8398a7/action-slack@v3 | ||
with: | ||
status: custom | ||
fields: all | ||
custom_payload: | | ||
{ | ||
attachments: [{ | ||
title: 'ForgeRock iOS SDK Mend Scan', | ||
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning', | ||
text: `\nStatus: ${{ job.status }}\nWorkflow: ${process.env.AS_WORKFLOW} -> ${process.env.AS_JOB}\nSummary: ${{ env.MEND_SCAN_SUMMARY }}\nScan URL: ${{ env.MEND_SCAN_URL }}`, | ||
}] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | ||
if: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Xcode | ||
# | ||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | ||
|
||
## Third-party dependency | ||
FRGoogleSignIn/FRGoogleSignIn/framework/* | ||
|
||
## Build generated | ||
build/ | ||
DerivedData/ | ||
docs/* | ||
SDKs/* | ||
|
||
## Various settings | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata/ | ||
|
||
## Other | ||
*.moved-aside | ||
*.xccheckout | ||
*.xcscmblueprint | ||
*.xcworkspacedata | ||
xcuserdata/ | ||
|
||
|
||
## Obj-C/Swift specific | ||
*.hmap | ||
*.ipa | ||
*.dSYM.zip | ||
*.dSYM | ||
|
||
## Playgrounds | ||
timeline.xctimeline | ||
playground.xcworkspace | ||
|
||
# Swift Package Manager | ||
# | ||
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. | ||
# Packages/ | ||
# Package.pins | ||
# Package.resolved | ||
.build/ | ||
|
||
# CocoaPods | ||
# | ||
# We recommend against adding the Pods directory to your .gitignore. However | ||
# you should judge for yourself, the pros and cons are mentioned at: | ||
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control | ||
# | ||
# Pods/ | ||
|
||
# Carthage | ||
# | ||
# Add this line if you want to avoid checking in source code from Carthage dependencies. | ||
# Carthage/Checkouts | ||
|
||
Carthage/Build | ||
|
||
# fastlane | ||
# | ||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the | ||
# screenshots whenever they are needed. | ||
# For more information about the recommended setup visit: | ||
# https://docs.fastlane.tools/best-practices/source-control/#source-control | ||
|
||
fastlane/report.xml | ||
fastlane/Preview.html | ||
fastlane/screenshots/**/*.png | ||
fastlane/test_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## [1.0.0] | ||
- General Availability release of the Ping SDK for iOS | ||
|
||
#### Added | ||
- Added Logger initial version | ||
- Added Storage initial version | ||
- Added Oidc initial version | ||
- Added Orchestrate initial version | ||
- Added Davinci initial version |
Oops, something went wrong.