Skip to content

Commit a2efaf8

Browse files
kgoryninKonstantin Gorynin
andauthored
TRUST-557 configure cicd (#8)
* [Phase 0] Removed all related bamboo specs files * [Phase 0] make file updated to contain basic ci scripts * [Phase 1] Prepare pubspec.yaml and Fastfile for CI-driven versioning * [Phase 2] fastfile & makefile fixed, flutter-build implemented * [Phase 2] Testing.yml implemented * [Phase 3] Deployment workflow implemented * [Phase 4] Mirroring implemented * Update CI workflows to use 'team-flutter' instead of 'team-mobile' * Configure CI workflows to use 'team: flutter' for tagging and deployment * Update CI workflows to include GPR_KEY environment variable and adjust permissions * Remove sentry-project references from CI workflows and update default vault-role * Remove team parameter from deploy job in CI workflow * Refactor CI workflows to streamline Flutter version resolution and verification * fixed padding issue * Update CI workflows to use grep for Flutter version extraction and add error handling * Add setup-flutter action and streamline Flutter version handling in CI workflows * Revert "Add setup-flutter action and streamline Flutter version handling in CI workflows" This reverts commit 884c8d27c3ed14fc83674161fdd2a5326c06da7f. * Refactor CI workflows to consolidate Flutter build, lint, and test processes with improved input handling * Refactor CI workflows to separate lint and test processes into dedicated files * Enhance Flutter build workflow to support appbundle and simulator modes, update descriptions, and improve artifact handling * container agmail test * Update container image for Flutter workflows to use the correct registry path * Refactor CI workflows to streamline Flutter build, lint, and test processes by replacing specific commands with a make command and adjusting runner configurations. * Update CI workflows to use macOS builder images for lint and test jobs * Enhance CI workflows by adding project initialization step and conditional test execution; remove obsolete widget test file. * (Revert later) Update Android builder key to use macOS in CI workflow * Update iOS build configuration to use a new keychain name for signing * Refactor import statements for consistency and clarity; update linter rules in analysis_options.yaml * (Revert later) Container test for an android * Refactor build steps to use 'make init' for dependency management and code generation * (revert later) test simulator build * Revert "(revert later) test simulator build" This reverts commit 77fdf578218d7f0058a3f2e71ad70e998a8723c4. * test different build modes * macos testing * container removed * Update CI workflows to use secrets for GPR_KEY and adjust runner configurations * Refactor CI workflows to consolidate runner jobs and update build parameters for iOS testing * dev test of ios * (Revert later) - readonly set to true * Update iOS build configuration to use adhoc signing type * Revert "(Revert later) - readonly set to true" This reverts commit 09da8c77f47d008c00c46e7d44ee63b79274fa29. * Set simulator until cert issue will be resolved * Revert "Set simulator until cert issue will be resolved" This reverts commit 77b4768cfedabea71ae561567dc93ef18ea60a24. * Update Xcode project settings for code signing and provisioning profiles * Revert "Update Xcode project settings for code signing and provisioning profiles" This reverts commit b4367f15276e1727b39fab0ef49b7abbd0527083. * git ignore updated to pass .env * Configure CI/CD for iOS builds with Fastlane and environment variables * Update Fastlane configuration with correct TEAM_ID and project path * Add Pod install step and streamline environment variable loading for iOS builds * Update iOS build artifact name and path in testing workflow * Refactor CI/CD workflows to standardize version and channel parameters for Android and iOS builds * Update iOS build paths and Fastlane configuration for simulator and IPA artifacts * Fix path for zipping simulator app in Fastlane build lane * Update Flutter build configuration to include --no-pub flag and fix zip path in Fastlane * Update iOS build configuration to use adhoc mode and change artifact path to .ipa --------- Co-authored-by: Konstantin Gorynin <k.goryinin@adguard.com>
1 parent c8349c3 commit a2efaf8

55 files changed

Lines changed: 790 additions & 1606 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy-apps.yml

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
name: Build & Deploy
2+
run-name: 'Deploy ${{ inputs.tag || github.ref_name }}'
3+
4+
on:
5+
push:
6+
tags: ['v[0-9]*.[0-9]*.[0-9]*']
7+
8+
workflow_dispatch:
9+
inputs:
10+
tag:
11+
description: 'Semver tag to deploy, for example v1.3.0-beta.1 or v1.3.0'
12+
required: true
13+
type: string
14+
slack-channel:
15+
description: 'Slack channel for build notification'
16+
type: string
17+
default: '#build-trusttunnel'
18+
19+
workflow_call:
20+
inputs:
21+
tag:
22+
type: string
23+
required: true
24+
description: 'Semver tag to deploy'
25+
slack-channel:
26+
type: string
27+
default: '#build-trusttunnel'
28+
description: 'Slack channel for build notification'
29+
30+
permissions:
31+
contents: read
32+
id-token: write
33+
actions: read
34+
35+
concurrency:
36+
group: deploy-${{ inputs.tag || github.ref_name }}
37+
cancel-in-progress: true
38+
39+
jobs:
40+
meta:
41+
uses: AdGuardSoftwareLimited/actions/.github/workflows/version-metadata.yml@master
42+
with:
43+
team: flutter
44+
tag: ${{ inputs.tag || github.ref_name }}
45+
46+
build-number:
47+
needs: [meta]
48+
runs-on: [team-flutter]
49+
outputs:
50+
build-number: ${{ steps.counter.outputs.BUILD_NUMBER }}
51+
steps:
52+
- uses: AdGuardSoftwareLimited/actions/actions/kv-multi@master
53+
id: counter
54+
with:
55+
increment: |
56+
BUILD_NUMBER=trusttunnel-flutter/v${{ needs.meta.outputs.version }}
57+
58+
changelog-qa:
59+
needs: [meta]
60+
uses: AdGuardSoftwareLimited/actions/.github/workflows/collect-changelog.yml@master
61+
with:
62+
team: flutter
63+
from-ref: ${{ needs.meta.outputs.previous-tag }}
64+
repo: trusttunnel-flutter-client
65+
format: md
66+
private: 'true'
67+
artifact-name: qa-changelog
68+
69+
changelog-public:
70+
needs: [meta]
71+
uses: AdGuardSoftwareLimited/actions/.github/workflows/collect-changelog.yml@master
72+
with:
73+
team: flutter
74+
from-ref: ${{ needs.meta.outputs.previous-tag }}
75+
repo: trusttunnel-flutter-client
76+
github-repo: TrustTunnel/TrustTunnelClient
77+
format: txt
78+
private: 'false'
79+
artifact-name: changelog
80+
81+
build-android:
82+
needs: [meta, build-number]
83+
uses: ./.github/workflows/flutter-build.yml
84+
secrets: inherit
85+
with:
86+
platform: android
87+
version: ${{ needs.meta.outputs.version }}
88+
build-number: ${{ needs.build-number.outputs.build-number }}
89+
version-title: ${{ needs.meta.outputs.version-title }}
90+
channel: ${{ needs.meta.outputs.release-channel }}
91+
build-mode: appbundle
92+
artifact-name: trusttunnel-android-aab
93+
artifact-path: build/app/outputs/bundle/release/app-release.aab
94+
release: ${{ needs.meta.outputs.release }}
95+
96+
build-ios:
97+
needs: [meta, build-number]
98+
uses: ./.github/workflows/flutter-build.yml
99+
secrets: inherit
100+
with:
101+
platform: ios
102+
version: ${{ needs.meta.outputs.version }}
103+
build-number: ${{ needs.build-number.outputs.build-number }}
104+
version-title: ${{ needs.meta.outputs.version-title }}
105+
channel: ${{ needs.meta.outputs.release-channel }}
106+
signing-type: appstore
107+
ios-app-identifiers: com.adguard.TrustTunnel,com.adguard.TrustTunnel.Extension
108+
artifact-name: trusttunnel-ios-ipa
109+
artifact-path: |
110+
ios/build/TrustTunnel.ipa
111+
ios/build/AppStoreInfo.plist
112+
release: ${{ needs.meta.outputs.release }}
113+
114+
build-simulator:
115+
needs: [meta, build-number]
116+
uses: ./.github/workflows/flutter-build.yml
117+
secrets: inherit
118+
with:
119+
platform: ios
120+
version: ${{ needs.meta.outputs.version }}
121+
build-number: ${{ needs.build-number.outputs.build-number }}
122+
version-title: ${{ needs.meta.outputs.version-title }}
123+
channel: ${{ needs.meta.outputs.release-channel }}
124+
build-mode: simulator
125+
ios-app-identifiers: com.adguard.TrustTunnel,com.adguard.TrustTunnel.Extension
126+
artifact-name: TrustTunnel.app.zip
127+
artifact-path: ios/build//TrustTunnel.app.zip
128+
129+
deploy-testflight:
130+
needs: [meta, build-ios, changelog-public]
131+
uses: AdGuardSoftwareLimited/actions/.github/workflows/deploy-to-testflight.yml@master
132+
with:
133+
team: flutter
134+
asset-artifact-name: trusttunnel-ios-ipa
135+
changelog-artifact-name: changelog.txt
136+
groups: ${{ needs.meta.outputs.release-channel == 'nightly' && 'Nightly testers' || 'Review testers' }}
137+
distribute-external: true
138+
submit-beta-review: false
139+
environment: ${{ needs.meta.outputs.release-channel }}-testflight
140+
141+
deploy-google-play:
142+
needs: [meta, build-number, build-android, changelog-public]
143+
uses: AdGuardSoftwareLimited/actions/.github/workflows/deploy-to-google-play.yml@master
144+
with:
145+
team: flutter
146+
package-name: com.adguard.trusttunnel
147+
track: ${{ needs.meta.outputs.release-channel == 'release' && 'production' || needs.meta.outputs.release-channel }}
148+
release-name: ${{ needs.meta.outputs.version-title }}
149+
artifact-pattern: trusttunnel-android-aab
150+
version-codes: ${{ needs.build-number.outputs.build-number }}
151+
changelog-text: ${{ needs.changelog-public.outputs.changelog-text }}
152+
environment: ${{ needs.meta.outputs.release-channel }}-google-play
153+
154+
deploy-appetize:
155+
needs: [meta, build-simulator]
156+
uses: AdGuardSoftwareLimited/actions/.github/workflows/deploy-to-appetize.yml@master
157+
with:
158+
team: flutter
159+
artifact-name: TrustTunnel.app.zip
160+
platform: ios
161+
note: 'Channel: ${{ needs.meta.outputs.release-channel }} | Version: ${{ needs.meta.outputs.version-title }} | Tag: ${{ inputs.tag || github.ref_name }}'
162+
environment: ${{ needs.meta.outputs.release-channel }}-appetize
163+
164+
notify-slack:
165+
needs: [meta, build-android, build-ios, build-simulator]
166+
if: github.event_name == 'push' || inputs.slack-channel != ''
167+
uses: AdGuardSoftwareLimited/actions/.github/workflows/slack-build-notify.yml@master
168+
with:
169+
team: flutter
170+
channel: ${{ inputs.slack-channel || '#build-trusttunnel' }}
171+
product: TrustTunnel
172+
version-title: ${{ needs.meta.outputs.version-title }}
173+
metadata: >-
174+
{
175+
"Channel": "${{ needs.meta.outputs.release-channel }}",
176+
"Version": "${{ needs.meta.outputs.version }}",
177+
"Tag": "${{ inputs.tag || github.ref_name }}"
178+
}

0 commit comments

Comments
 (0)