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

ci(artifact_proxy): add dev deployment w/engine-patch #275

Merged
merged 7 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Artifact Proxy
name: Deploy Artifact Proxy Dev

on:
workflow_dispatch:
Expand All @@ -10,7 +10,7 @@ on:
- "packages/artifact_proxy/**"

env:
PROJECT_ID: code-push-prod
PROJECT_ID: code-push-dev
SERVICE: artifact-proxy
REGION: us-central1

Expand All @@ -36,7 +36,7 @@ jobs:
uses: google-github-actions/[email protected]
with:
project_id: ${{ env.PROJECT_ID }}
service_account_key: ${{ secrets.CLOUD_RUN_SA_PROD }}
service_account_key: ${{ secrets.CLOUD_RUN_SA_DEV }}
export_default_credentials: true

- name: Authorize Docker Push
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/deploy_artifact_proxy_prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy Artifact Proxy Prod

on:
workflow_dispatch:

env:
PROJECT_ID: code-push-prod
SERVICE: artifact-proxy
REGION: us-central1

jobs:
deploy:
runs-on: ubuntu-latest

defaults:
run:
working-directory: packages/artifact_proxy

name: ☁️ Artifact Proxy

steps:
- name: 📚 Git Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- uses: dart-lang/setup-dart@v1

- name: Setup Cloud SDK
uses: google-github-actions/[email protected]
with:
project_id: ${{ env.PROJECT_ID }}
service_account_key: ${{ secrets.CLOUD_RUN_SA_PROD }}
export_default_credentials: true

- name: Authorize Docker Push
run: gcloud auth configure-docker

- name: Build and Push Container
run: |-
docker build -t gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:${{ github.sha }} .
docker push gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:${{ github.sha }}

- name: Deploy to Cloud Run
id: deploy
uses: google-github-actions/[email protected]
with:
service: ${{ env.SERVICE }}
image: gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:${{ github.sha }}
region: ${{ env.REGION }}

- name: Show Output
run: echo ${{ steps.deploy.outputs.url }}

- name: Ping
run: curl "${{ steps.deploy.outputs.url }}"
7 changes: 6 additions & 1 deletion packages/artifact_proxy/lib/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const config = ProxyConfig(
class _EngineMapping3_7 extends EngineMapping {
const _EngineMapping3_7({
required super.flutterEngineRevision,
super.shorebirdStorageBucket = 'download.shorebird.dev',
}) : super(
shorebirdStorageBucket: 'download.shorebird.dev',
shorebirdArtifactOverrides: const {
// artifacts.zip
r'flutter_infra_release/flutter/$engine/android-arm-64-release/artifacts.zip',
Expand Down Expand Up @@ -42,6 +42,11 @@ class _EngineMapping3_7 extends EngineMapping {

/// Flutter 3.7.10
const flutter_3_7_10 = {
// Attempt to fix https://github.com/shorebirdtech/shorebird/issues/235
'f68335f3f6afdb1595420b1c3b5a16c8da75a1cf': _EngineMapping3_7(
shorebirdStorageBucket: 'download-dev.shorebird.dev',
flutterEngineRevision: 'ec975089acb540fc60752606a3d3ba809dd1528b',
),
'978a56f2d97f9ce24a2b6bc22c9bbceaaba0343c': _EngineMapping3_7(
flutterEngineRevision: 'ec975089acb540fc60752606a3d3ba809dd1528b',
),
Expand Down