You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have removed any sensitive information from my code snippets and submission.
Amplify Hosting feature
Build settings, Frontend builds
Is your feature request related to a problem? Please describe:
I am having a use-case of developing several NextJS applications (SSG) and deploying them to AWS Amplify. I am using AWS amplify hosting, where directly linking each GitHub repository to amplify apps. And configuring YAML file for frontend deployment. All applications are deployed and working fine.
Problem statement: Now I need to setup a quality gate in the deployment process, Where I have to check certain parameters (Package version of few NPM modules) before deployment.
I am trying to implement this with command hooks. Officially its mentioned pre and post push hooks will get triggered by default in amplify hosting.
I have added amplify/hooks folder.
When I tried to trigger a build, these hook scripts are not getting executed. Is it applicable only for backend execution?
Is there any other better way to handle this use-case with AWS amplify CICD for SSG deployments?
Describe how you'd like this feature to work
Currently I am trying with cURL to pass the data to an API.
[ERROR]: !!! CustomerError: The commands provided in the buildspec are malformed. Please ensure that you have properly escaped reserved YAML characters. If you have a ':' character in your command, encapsulate the command within quotes.
But while executing the same buildspec without assigning the curl response to a variable its executing properly.
Is there any easy way to post required info to external APIs via hooks in frontend deployment.
The text was updated successfully, but these errors were encountered:
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!
Before opening, please confirm:
Amplify Hosting feature
Build settings, Frontend builds
Is your feature request related to a problem? Please describe:
I am having a use-case of developing several NextJS applications (SSG) and deploying them to AWS Amplify. I am using AWS amplify hosting, where directly linking each GitHub repository to amplify apps. And configuring YAML file for frontend deployment. All applications are deployed and working fine.
Problem statement: Now I need to setup a quality gate in the deployment process, Where I have to check certain parameters (Package version of few NPM modules) before deployment.
I am trying to implement this with command hooks. Officially its mentioned pre and post push hooks will get triggered by default in amplify hosting.
I have added amplify/hooks folder.
When I tried to trigger a build, these hook scripts are not getting executed. Is it applicable only for backend execution?
Is there any other better way to handle this use-case with AWS amplify CICD for SSG deployments?
Describe how you'd like this feature to work
Currently I am trying with cURL to pass the data to an API.
version: 1
frontend:
phases:
preBuild:
commands:
- NEXT_VERSION=$(node -p -e "require('./package.json').dependencies.next")
- REACT_VERSION=$(node -p -e "require('./package.json').dependencies.react")
- echo $NEXT_VERSION
- echo $REACT_VERSION
- RES=$(curl -s -X POST -H "Content-type: application/json" -d {"next":"1.00","react":"1.1.0"} [endpoint])
- echo $RES
- npm ci
build:
commands:
- rm -rf .next
- npm run build
artifacts:
baseDirectory: .next/
files:
- '/*'
cache:
paths:
- node_modules//*
But receiving an error as
[ERROR]: !!! CustomerError: The commands provided in the buildspec are malformed. Please ensure that you have properly escaped reserved YAML characters. If you have a ':' character in your command, encapsulate the command within quotes.
But while executing the same buildspec without assigning the curl response to a variable its executing properly.
Is there any easy way to post required info to external APIs via hooks in frontend deployment.
The text was updated successfully, but these errors were encountered: