-
Notifications
You must be signed in to change notification settings - Fork 8
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
Backport NR-234826 #335
Open
cdillard-NewRelic
wants to merge
9
commits into
staging
Choose a base branch
from
7.4.7-backport-NR-234826
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Backport NR-234826 #335
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a8b4d3f
Backport NR-234826
cdillard-NewRelic e1fe7db
add branchBuild.yml
cdillard-NewRelic 893f543
Add rest of NR-234826 for build test 2
cdillard-NewRelic 0b1a8a4
try main code
cdillard-NewRelic 1efe786
NR-359272: fix NRMAURLSessionTaskOverride to not check responseCode.
cdillard-NewRelic 285b4fd
Add example command to NRTestApp for async data task
cdillard-NewRelic 86cca04
NR-359272: add one safety to path that recordTask takes through notic…
cdillard-NewRelic 8c3d711
NR-359272: Fix setState signature and add NRMAHandledRequest associat…
cdillard-NewRelic d76ffac
fix up failed request test
cdillard-NewRelic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,87 @@ | ||
name: BespokeBuild | ||
on: | ||
workflow_dispatch: | ||
# The input version number (ex: 7.4.0) and branch are required for the bespoke branch build. Branch is an automatically added selector for all github actions. | ||
inputs: | ||
version: | ||
required: true | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deployS3: | ||
name: DeployS3 | ||
# runs-on: will be set to macos-latest when running on actual GHA. | ||
# *** runs-on: ubuntu-latest is used when running via act on mac os. *** | ||
runs-on: macos-latest | ||
outputs: | ||
version: ${{ steps.setOutput.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: '15.4' | ||
|
||
- name: Install the Apple certificate and provisioning profile | ||
env: | ||
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} | ||
P12_PASSWORD: ${{ secrets.P12_PASSWORD }} | ||
# BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }} | ||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | ||
run: | | ||
# create variables | ||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 | ||
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision | ||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | ||
|
||
# import certificate and provisioning profile from secrets | ||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH | ||
# echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH | ||
|
||
# create temporary keychain | ||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | ||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | ||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | ||
|
||
# import certificate to keychain | ||
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | ||
security list-keychain -d user -s $KEYCHAIN_PATH | ||
|
||
# # apply provisioning profile | ||
# mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | ||
# cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles | ||
|
||
- name: Update gem | ||
run: bundle update | ||
|
||
- name: Install gems | ||
run: bundle install | ||
|
||
- name: Build NewRelic.xcframework (using fastlane) | ||
run: bundle exec fastlane buildAndZip | ||
|
||
- name: Get name | ||
run: echo "version=$(cat fastlane/build_version)" >> $GITHUB_ENV | ||
|
||
- id: setOutput | ||
name: Print name | ||
run: echo "version=${{ env.version }}" >> $GITHUB_OUTPUT | ||
|
||
- name: Deploy to staging S3 | ||
run: "aws s3 cp NewRelic_XCFramework_Agent_${{ env.version }}.zip s3://nr-downloads-main/ios-v5/" | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | ||
|
||
- name: Upload build reports | ||
if: failure() && steps.build-step.outcome != 'success' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build-reports | ||
path: /Users/runner/Library/Logs/fastlane/xcbuild/ |
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to check that the response we get is of type NSHTTPURLResponse? That is kind of what the response code check does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed the other places we call NRMA__recordTask we don’t even care about the responseCode. I’m not sure why the NRMAURLSessionTaskOverride was checking the response code and checking that task.response was of type NSHTTPURLResponse.