Unable to see the Unpack solution (powerapp) file in Azure repo,We have run the pipeline

152 Views Asked by At

Unable to see the Unpack solution file (powerapp) in Azure repo.We have run the pipeline.

Pipeline Screenshot

1

There are 1 best solutions below

0
Bowman Zhu-MSFT On

1, Your understanding of the pipeline running process is wrong.

Since you design a pipeline with job run on an agent, so pipeline will run the pipeline based on the agent.

enter image description here

By default, DevOps pipeline will run based on Microsoft hosted agent.

In this situation, pipeline will request a random VM machine which match the agent type and version design(Every time you run the pipeline, the VM will be different.).

Or you can set up a self hosted agent and run your pipeline based on it.

In this situation, pipeline will always run based on the machine that the agent set up on.

2, Why you can't see anything changed on your repository?

That is because the pipeline will not do operations directly on the repository that the pipeline based on.

Before you start those steps:

enter image description here

Pipeline has an default additional step, that step is check-out.

For check-out, you can simply understand it as a copy. By default, the pipeline will "copy" the repo that the pipeline is currently based on to the workspace (relevant folder) of the machine where the pipeline is located. All operations you do are based on this copy, and the repository itself will not be affected in any way.

If you want to see the contains of this folder:

enter image description here

You can add a new task to show the contents. The below is a sample.

For example, SolutionName on my side is 'soluName':

enter image description here

Create files in directory 'soluName':

enter image description here

Show contents in directory 'soluName' of '$(Build.SourcesDirectory':

enter image description here

(By the way, $(Build.SourcesDirectory on your side seems lack a dot.)

3, If you indeed need push back to original repository, there is a method. just follow the below steps.

Step1, allow script to access OAuth token

enter image description here

Step2, give contribute permission to build service account.

enter image description here

enter image description here

Step3, use these commands to push back changes:

enter image description here

git config --global user.email "[email protected]"
git config --global user.name "<Your Name Here>"

git add .

git commit -m 1

git show-ref

git push origin HEAD:main

After all, I can successfully push back the changes to the repository:

enter image description here

Let me know whether all of the above can answer your question.