Hello, everyone!
Today, when I push my code to gitlab, I found the code of cicd job is inconsistent with my local. It’s so weird.
I check my code of gitlab and gitlab-runner, they all match my local.
But, my CI/CD job failed! The reason for the failure was my code that didn’t exist locally causing the failure.
Then, I tried to delete my code of gitlab and gitlab-runner and re-pushed my code, but it still failed.
I’m sorry I didn’t put a picture of the scene, I’ll add it if needed.
Have you encountered this situation? please help me!
I finally found out that there was a problem with my docker. When I used COPY . .
to copy my code into docker to build the image, it used the old code.I don’t understand it.
Okay, It’s not CI/CD fault. But if anyone knows why this is happening, please tell me!
Thanks again!
Sry, my fault.Because I use the base image include the old code.