Skip to content
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

Migrate asana-extract-task-id GHA action to a fastlane plugin #3145

Merged
merged 3 commits into from
Aug 26, 2024

Conversation

ayoy
Copy link
Collaborator

@ayoy ayoy commented Aug 25, 2024

Task/Issue URL: https://app.asana.com/0/1203301625297703/1208137627434482/f

Description:
This change introduces ddg_apple_automation fastlane plugin and its first action,
for extracting task ID from Asana task URL. Fastlane setup step was added to all
workflows, GHA action calls were replaced by fastlane action calls,
outputs were renamed to match action output name and old GHA action was removed.

Steps to test this PR:

  1. Consult the implementation of the fastlane action and related unit tests. Note the usage of GitHubActionsHelper to set a GHA output when the action is run in CI.
  2. Set up fastlane locally:
$ bundle install
$ fastlane install_plugins
  1. Run the action locally and confirm that it extracts task ID, e.g:
$ bundle exec fastlane run asana_extract_task_id task_url:https://app.asana.com/0/1201621708115095/1208137627434473/f
  1. Verify that this workflow completed successfully and uploaded a DMG to a task for which the ID was extracted using fastlane action.
  2. Sanity-check changes to other workflows, especially to verify that extracted task ID is used in other steps of affected workflows under a new name (asana_task_id).

Definition of Done:


Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@@ -102,9 +105,6 @@ jobs:
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer

- name: Prepare fastlane
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If a fastlane step existed in a workflow, I've now moved it to the next step after code checkout – in case we add more fastlane-dependent steps later.

@@ -222,13 +225,6 @@ jobs:
name: DuckDuckGo-${{ env.release-type }}-dSYM-${{ env.app-version }}
path: ${{ github.workspace }}/release/${{ steps.set-outputs.outputs.dsym-name }}

- name: Extract Asana Task ID
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This had no effect, as it turned out. The output wasn't used in any further step, nor is it defined as one of the outputs of the entire job.

This job is optionally followed by create-dmg job which calls that action on its own.

Comment on lines +277 to +279
Gemfile
Gemfile.lock
fastlane
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These files are needed in every sparse checkout for fastlane to work, obviously.

@@ -2,3 +2,6 @@ source 'https://rubygems.org'

gem 'fastlane', '2.222.0'
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we set the same version of Ruby for everyone?

I wonder if not setting this will cause Gemfile.lock to change due to Ruby version installed on the machine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point! I'll make a task for it.

Copy link
Contributor

@alessandroboron alessandroboron left a comment

Choose a reason for hiding this comment

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

This works as expected! Also the sanity check seems to be good, all the workflow changed use asana_task_id! 💪

I’ll merge it.

@alessandroboron alessandroboron merged commit 081dfea into main Aug 26, 2024
22 of 23 checks passed
@alessandroboron alessandroboron deleted the dominik/fastlane-plugin branch August 26, 2024 04:37
samsymons added a commit that referenced this pull request Aug 26, 2024
…iption

* main:
  Migrate asana-extract-task-id GHA action to a fastlane plugin (#3145)
  Fix address bar queries when doing math expressions (#3130)
ayoy added a commit that referenced this pull request Aug 26, 2024
Task/Issue URL: https://app.asana.com/0/1203301625297703/1208137627434482/f

**Description**:
This change introduces ddg_apple_automation fastlane plugin and its first action, for extracting task ID from Asana task URL. Fastlane setup step was added to all workflows, GHA action calls were replaced by fastlane action calls,
outputs were renamed to match action output name and old GHA action was removed.
samsymons added a commit that referenced this pull request Aug 28, 2024
# By Dax the Duck (3) and others
# Via Dominik Kapusta (2) and GitHub (2)
* main:
  Unified feedback form for Privacy Pro (#3058)
  Fix state restoration after app termination (#3127)
  Bump Submodules/privacy-reference-tests from `afb4f61` to `6133e7d` (#3148)
  Bump version to 1.104.0 (250)
  Set marketing version to 1.104.0
  Update embedded files
  Freemium PIR - Add Desktop RMF Attribute (#3146)
  Migrate asana-extract-task-id GHA action to a fastlane plugin (#3145)
  Add missing secrets to publish_dmg_release.yml
  Migrate asana-extract-task-id GHA action to a fastlane plugin (#3145)
  Fix address bar queries when doing math expressions (#3130)

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
samsymons added a commit that referenced this pull request Aug 28, 2024
…iption

* main:
  Add error pixels for Subscription keychain access errors (#3147)
  onboarding dax dialogs (#3149)
  Logging refactoring phase #2 (#3154)
  Move WireGuard dependency to VPN extensions (#3144)
  Unified feedback form for Privacy Pro (#3058)
  Fix state restoration after app termination (#3127)
  Bump Submodules/privacy-reference-tests from `afb4f61` to `6133e7d` (#3148)
  Bump version to 1.104.0 (250)
  Set marketing version to 1.104.0
  Update embedded files
  Freemium PIR - Add Desktop RMF Attribute (#3146)
  Migrate asana-extract-task-id GHA action to a fastlane plugin (#3145)
  Add missing secrets to publish_dmg_release.yml
samsymons added a commit that referenced this pull request Aug 29, 2024
# By Dax the Duck (9) and others
# Via GitHub (6) and Dominik Kapusta (2)
* main: (44 commits)
  Allow using a production subscription with staging VPN environment (#3109)
  Add error pixels for Subscription keychain access errors (#3147)
  onboarding dax dialogs (#3149)
  Logging refactoring phase #2 (#3154)
  Move WireGuard dependency to VPN extensions (#3144)
  Unified feedback form for Privacy Pro (#3058)
  Fix state restoration after app termination (#3127)
  Bump Submodules/privacy-reference-tests from `afb4f61` to `6133e7d` (#3148)
  Bump version to 1.104.0 (250)
  Set marketing version to 1.104.0
  Update embedded files
  Freemium PIR - Add Desktop RMF Attribute (#3146)
  Migrate asana-extract-task-id GHA action to a fastlane plugin (#3145)
  Add missing secrets to publish_dmg_release.yml
  Migrate asana-extract-task-id GHA action to a fastlane plugin (#3145)
  Fix address bar queries when doing math expressions (#3130)
  Bump version to 1.103.0 (249)
  Bump version to 1.103.0 (248)
  Resolving automatic update edge cases (#3142)
  PIR Time-Based Pixel: 24 Opt-Out Request Success Rate (#2942)
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	LocalPackages/DataBrokerProtection/Package.swift
#	LocalPackages/NetworkProtectionMac/Package.swift
#	LocalPackages/SubscriptionUI/Package.swift
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.

2 participants