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: Fail build if tracked files are modified #3451

Closed
1 of 5 tasks
nmussy opened this issue Jul 26, 2019 · 2 comments · Fixed by #3508
Closed
1 of 5 tasks

CI: Fail build if tracked files are modified #3451

nmussy opened this issue Jul 26, 2019 · 2 comments · Fixed by #3508
Assignees
Labels
@aws-cdk/core Related to core CDK functionality feature-request A feature should be added or improved. package/tools Related to AWS CDK Tools or CLI

Comments

@nmussy
Copy link
Contributor

nmussy commented Jul 26, 2019

Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository's issues are intended for feature requests and bug reports.

  • I'm submitting a ...

    • 🪲 bug report
    • 🚀 feature request
    • 📚 construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior?
    If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce
    Builds do not fail at the end of the ./build.sh script when tracked files have been modified or deleted, or files have been added in tracked directories.

  • What is the expected behavior (or behavior of feature suggested)?
    Fail the build if git status --porcelain is not empty

  • What is the motivation / use case for changing the behavior or adding this feature?
    When building 6c0bf4a, all packages/*/package-lock.json have the following diff:

- "@aws-cdk/cfnspec": "^1.1.0",
+ "@aws-cdk/cfnspec": "^1.2.0",

Something similar happened with 1.1.0 if I remember correctly.

In any case, the build shouldn't create, update or delete any tracked files.

  • Please tell us about your environment:

    • CDK CLI Version: 1.2.0
    • Module Version: 1.2.0
    • OS: all
    • Language: all
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)

If this is implemented, we should probably add **/.idea to the .gitignore file, to allow WebStorm users to build without stashing their IDE config folder

@nmussy nmussy added the needs-triage This issue or PR still needs to be triaged. label Jul 26, 2019
@NGL321 NGL321 added @aws-cdk/core Related to core CDK functionality package/tools Related to AWS CDK Tools or CLI feature-request A feature should be added or improved. and removed needs-triage This issue or PR still needs to be triaged. labels Jul 26, 2019
@nmussy
Copy link
Contributor Author

nmussy commented Jul 29, 2019

I just realized that this would require something like a --ci flag, otherwise it would make the script unusable during development

@RomainMuller
Copy link
Contributor

That's indeed a very good idea!!

RomainMuller added a commit that referenced this issue Aug 1, 2019
Verify that the build process does not cause changes in git tracked
files.

Fixes #3451
@eladb eladb assigned eladb and shivlaks and unassigned RomainMuller and eladb Aug 12, 2019
@mergify mergify bot closed this as completed in #3508 Aug 12, 2019
mergify bot pushed a commit that referenced this issue Aug 12, 2019
* chore(ci): prohibit the build causes source changes

Verify that the build process does not cause changes in git tracked
files.

Fixes #3451

* correctly detect untracked files, too

* Update .travis.yml

* make it propper!

* add missing lockfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/core Related to core CDK functionality feature-request A feature should be added or improved. package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants