-
Hi, I have a cdktf project written in TypeScript. The way things work is that infrastructure code is written in TS and then with the
Then, Atlantis should run The issue is that: "The output of cdktf synth has to be committed to the pull request". This means that even my pre-workflow hook that looks like this:
will only run after someone already ran Kinda thinking of using pre-commit hooks for this, but it's not ideal because there are cases where I would want people not belonging to the team to make PRs in the repo and they might not have the stack required for cdktf installed locally. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
I was trying to solve this myself and I was able to get cdk synth in a pre workflow to generate the fjles but I could not get atlantis to pick up the changes unless I committed them. I didnt have the time to debug it. Have you tried it with the pre workflow? Did you get the same results? If so, please troubleshoot further so we can get a fix in place and then we can make committing the json hcl optional. |
Beta Was this translation helpful? Give feedback.
-
How did you get the pre_workflow hook to run? In my case, without pushing the cdk.tf.json files Atlantis doesn't run anything. Once they are pushed, then the pre_workflow_hooks is triggered. I can debug further as long as I can get the hook to run without having pushed the json files 😄 |
Beta Was this translation helpful? Give feedback.
-
I got the synth to run by allowing planning on .ts files, but got the following error:
Looks like either the synth didn't go correctly or it is not seeing the result of it. Will try to investigate further. |
Beta Was this translation helpful? Give feedback.
-
Currently there is no way to modify the directories in a pre workflow run UNLESS a file in those directories has already been modified in the PR. This is because atlantis reads the VCS's API to retrieve the list of files modified instead of using a native local I've documented this limitation in #2693 for now. |
Beta Was this translation helpful? Give feedback.
Currently there is no way to modify the directories in a pre workflow run UNLESS a file in those directories has already been modified in the PR. This is because atlantis reads the VCS's API to retrieve the list of files modified instead of using a native local
git
command.I've documented this limitation in #2693 for now.