Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

Issues configuring for CI/CD pipelines #174

Open
nwayve opened this issue Jul 26, 2018 · 3 comments
Open

Issues configuring for CI/CD pipelines #174

nwayve opened this issue Jul 26, 2018 · 3 comments

Comments

@nwayve
Copy link

nwayve commented Jul 26, 2018

This seems like a great tool for a personal side project, but when trying to integrate this into a CI/CD pipeline, I'm running into some problems.

No STS

It's already been mentioned in issue 126 about the lack of STS capabilities which requires a user to be created in a child org account with program access. So instead of having the CI/CD service role assume into the role with permissions to manage the MobileHub project, I have to store keys on the CI server that has to be updated when we rotate our keys on a regular basis =\

Can't Automate

Another issue is that the awsmobile-cli doesn't have a natural lib component to it to program against. Normally in these cases I'd just write scripts to perform the CLI actions but the awsmoblie configure aws command prompts for credentials instead of allowing them to be passed in with parameters (or by convention look for set environment variables). In order to achieve this I have to look into the library's bin folder to import files as the CLI does it, which is exceptionally bad practice (I stopped there).

Hard-coded user-profile references

After running the awsmobile init and configure aws commands, the project gets an /awsmobilejs/.awsmobile/info folder added. The aws-info.json file with an AWSConfigFilePath that points to a file in my user profile path C:\\Users\\me\\.awsmobilejs\\project-aws-config\\my-project-k3vTq.json. My question here would be, what files/folders should I .gitignore and have the CI server recreate, and with what commands?

So far, it's a great CLI utility for personal projects or POC projects, and I'm excited for the capabilities of AWS MobileHub, but as-is, I'm reluctant to use this for a production project.

@aletheia
Copy link

Hardcoded user profile references is really an issue that refrains from using it in multiple environments. I've managed it using awsmobile init in every environment, then versioning config files with env variables, but it's a porkaround and not the solution

@UnleashedMind
Copy link
Contributor

UnleashedMind commented Jul 27, 2018

Thanks for the feedbacks, I will mark this as feature request, we'll keep improving our products.

@moreta
Copy link

moreta commented Aug 13, 2018

awsmobile configure aws allow parameter like this

awsmobile configure aws 1_your_aws_access_key_id 2_your_aws_secret_access_key 3_your_region

but there are not allowed parameter for awsmobile configure project.
Eventually i use default value src, dist, npm run-script build, npm run-script serve

I setup my CI's pre_build phase like this

  pre_build:
    commands:
      - awsmobile configure aws 1_your_aws_access_key_id 2_your_aws_secret_access_key 3_your_region
      - awsmobile init 1_youraws_project_id -y

This works, but we need multiple environments support..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants