Skip to content

Usage of "amplify pull" in MS AppCenter CI/CD #11038

@subhakundu

Description

@subhakundu

Note: If your question is regarding the AWS Amplify Console service, please log it in the
AWS Amplify Console repository

Which Category is your question related to?
CI/CD: Running "amplify pull" in MS AppCenter pipeline

Amplify CLI Version
10.0.0

You can use amplify -v to check the amplify cli version on your system

What AWS Services are you utilizing?
Lambda functions, Authentication, DynamoDB, Amplify. Cognito

Provide additional details e.g. code snippets. Be sure to remove any sensitive data.
I have an AWS amplify React Native App. For setting up, I am required to run

amplify pull
It asks certain question. As my backend and frontend repository are separated, particularly for option "Do you plan on modifying this backend?", I select "n" while working on React Native app. Now, I am setting up CI/CD with MS Visual Studio App Center. For each development, I need to set up an automated way to give these values. I have tried setting up custom "appcenter-pre-build.sh"

#!/usr/bin/env bash

npm install -g @aws-amplify/cli
#Git Link: https://github.com/aws-amplify/amplify-cli/issues/2140

AMPLIFY="{\
\"appId\":\"<app id>\"\
\"envName\":\"<env name>\"\
\"defaultEditor\":\"vscode\"\
\"noUpdateBackend\":\"true\"\
\"configLevel\":\"general\",\
\"useProfile\":true,\
\"profileName\":\"default\"\
}"

amplify pull  --amplify ${AMPLIFY} --yes

For simplification, I tried the command from terminal as well
amplify pull --appId <appid> --envName <env name> --yes --noUpdateBackend true

My specific questions are

  1. I do not want to update backend. How can I set up this option for AppCenter CI/CD? I found this code, but it will not work as it is not mapped to any CLI arguments.
  2. How can I bypass the browser authentication for getting the client id?

The closest resource I found is this. It will be great if someone can help me out here. I am checking out this as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionGeneral question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions