Updated file is not showing into artifact after successful completion of build pipeline in Azure Devops

249 views Asked by At

There are two updated files and they are successfully merged into the branch of repository but when i am trying to run the build pipeline , artifact is creating without any issue but the change is reflecting only to one file out of two updated files, there is no change seems to be appear into another one, in generated artifact.

I am not getting any leads to fix this issue, and I am expecting change in both of the files in generated Artifact.

Edit:-

Here is my the content of .gitignore file and I am changing the file which is present in the folder in the eighth line of the image . But I have also added a file in the folder which is on the seventh line, that file changes are visible but not the file which is in the folder of eighth line.

1

There are 1 answers

9
Bright Ran-MSFT On

Try to check with the following things to fix the issue:

  1. Ensure the build is running for the right branch and commit that contain all the latest updated files. You can check the information on this Summary tab of the build.

    enter image description here

  2. After successfully building the code, ensure you have used the Copy files task to copy all the required artifact files into the directory $(Build.ArtifactStagingDirectory).

  3. Then use the Publish Pipeline Artifacts task to publish the artifact files from the directory $(Build.ArtifactStagingDirectory).


EDIT:

In above step #1, you can click on the commit ID to open it in Azure Repos. Then check whether the updated files and updated contents are listed.

If the build is running for multiple commits, on the Summary tab, you can click "View xx changes" to all commits of current build. You can click and open the listed commits one by one to view the updated files and updated contents contained in them. And ensure the updates in newer commits do not override that in older commits.

enter image description here

In addition, ensure the checkout task in the build job has checked out the latest commit version which is listed on the Changes page. Normally, this latest version contains the latest updates (Added, Deleted, Modified) of each source file.


EDIT2:

On the Summary tab of the build, click on the commit that the build is running for. This commit should be the latest one among all changes that the build is running for. And the checkout task also should check it out to build by default.

Then follow the steps showing in the image below.

enter image description here

If the problematic file does not contain the updates as you expect on this commit. I am afraid that someone had modified the file to override the expected updates before this commit. You can open the commit history of this file to view who and when modified this file before.