Can someone help me deal with bitbucket and build:affected #23210
Replies: 3 comments
-
The git ref is not available, probably due to the cloning strategy that's being used in Bitbucket. You may need to change the strategy, or some steps to ensure that the branch/tag you are using as |
Beta Was this translation helpful? Give feedback.
-
@jaysoo Are there any good docs on this or examples I can follow? |
Beta Was this translation helpful? Give feedback.
-
@jaysoo I have got This is a method I used before I started utilizing NX. The problem I seem to have is it only compares the tagged commit against master, but the commit is part of master. So it look like it only comparing this current commit with the previous one. But let's say we have the following commits: It seems to not detect changes happening in commit 2-4, unless they last commit has changes in the same projects, then it will trigger a build. I have a shallow understanding of Git, enough to work with Repos and branches etc and I am new at NX. I am not sure I want to be working with release branch to get a good diff between master and release branch. Because that means slower release of features, unless I create a release branch for each filter. I hope you can point me in the right direction. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I started using build:Affected in my bitbucket pipeline to cut down on build and deployment time to AWS, but I am getting this error in bitbucket:
I am pretty new to NX and I am not sure why this is happening.
I assume something with NX not having any git history in the container running the deployment.
So is it actually possible to achieve build and deploy affected?
My deploy command looks like:
One thing that is causing the issue I think is that I deploy based on a tag to trigger the deployment to staging and production:
Because I saw that the Master deployment (going to Development) was working as expected.
Just the tag deployment is failing:
I just found this in my npm package file, setup by my coworker who is no longer working for us
I am not sure why he is using master~1 because that doesn't work for tags, but works for a master deployment.
When I Look at the master deployment via bitbucket, I see this in the first step:
which is a tagged commit, but this will use the master step for the pipeline:
and that works fine but when I use the tag deployment bit it fails with the error I mentioned at the beginning.
I am then running in detached head state....which makes sense because a tag is pointing to a commmit.
Does it mean I have to use a release branch with a tag?
Beta Was this translation helpful? Give feedback.
All reactions