amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Amplify Publish Silently For Headless Deployments

Open abdullah353 opened this issue 8 years ago • 7 comments

Allow non-interactive communication using AWS CLI. I want to run the amplify publish command using the AWS CodeBuild And in buildspec.yaml I have defined amplify publish which generates the following results

[Container] 2018/10/17 11:32:17 Running command amplify publish
(node:50) ExperimentalWarning: The fs.promises API is experimental
| Category | Resource name | Operation | Provider plugin |
| -------- | --------------- | --------- | ----------------- |
| Auth | cognito15ca543b | No Change | awscloudformation |
| Hosting | S3AndCloudFront | No Change | awscloudformation |
tput: No value for $TERM and no -T specified
?
 
A
r
e

y
o
u

s
u
r
e

y
o
u

w
a
n
t

t
o

c
o
n
t
i
n
u
e
?
 
(
Y
/
n
)


[Container] 2018/10/17 11:32:19 Phase complete: BUILD Success: true
[Container] 2018/10/17 11:32:19 Phase context status code: Message: 
[Container] 2018/10/17 11:32:19 Entering phase POST_BUILD

Describe the solution you'd like Allow us to run the publish command by accepting all scenarios. E.g

amplify publish -qy

Where q Represent for Non-interactive or Quiet mode. y Means set all answers to Yes by default.

abdullah353 avatar Oct 17 '18 11:10 abdullah353

@mabdullah353 We're currently actively working at this point towards making the commands headless.

kaustavghosh06 avatar Oct 17 '18 18:10 kaustavghosh06

I use printf 'yes\n' | amplify publish but amplify/.config file refer full directory paths, so I trying using https://aws-amplify.github.io/docs/cli/multienv?sdk=js to publish changes using codebuild but with no success :/

framled avatar Dec 03 '18 17:12 framled

@msam6444 @framled We released headless command support for amplify init/push/publish with the multenv release -> https://aws-amplify.github.io/docs/cli/multienv?sdk=js For examples, please take a look at https://github.com/aws-amplify/amplify-cli/tree/multienv/packages/amplify-cli/sample-headless-scripts

Please feel free to re-open the issue if you've further questions.

kaustavghosh06 avatar Dec 26 '18 21:12 kaustavghosh06

That is really cool. Do you support other commands? i.e. amplify add auth or amplify add analytics.

eelzinaty avatar Apr 23 '19 15:04 eelzinaty

Will there be proper documentation on this? Other than just the sample scripts (they're super helpful but would like a bit more documentation explaining what options are available and what they're for etc.)

dkwl93 avatar Aug 20 '19 03:08 dkwl93

My use case is:

? Do you want to generate code for your newly created GraphQL API Yes
? Choose the code generation language target flow
? Enter the file name pattern of graphql queries, mutations and subscriptions src/graphql/**/*.js
? Do you want to generate/update all possible GraphQL operations - queries, mutations and subscriptions No
? Enter the file name for the generated code src/API.js

so YES to code gen but NO to generate all possible query/mutation etc.

dkwl93 avatar Aug 20 '19 03:08 dkwl93

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

github-actions[bot] avatar May 27 '21 03:05 github-actions[bot]