Closed koushikelux closed 1 year ago
Hello @guythetechie - Any update on this ?
Hi I am trying to think what may cause this. Is it possible that none of the extracted artifacts differ from what you already have in your repository? Did you try deleting the artifacts folder in your repository and rerunning the extractor? Or you never managed to run the extractor successfully even once?
@koushikelux any update?
Hi @waelkdouh - It is not creating any 'artifacts' folder in repo actually. This is the first time I am executing the extractor, should I also need to create the 'artifacts' folder in repo manually ? I understood that It will create automatically 'artifact' folder in repo once I execute this Run_Extractor tool. Since this is the first run, so I expect all the files in artifacts folder are new. Please let me know.
You don't need to manually create the artifacts folder in the repo. The idea is that once the pull request code executed, the folder along the artifacts should be created as part of the pull request, which you would then merge back into your desired branch (e.g. main branch)
Going back to your question,are you on the latest version of the code? I don't see anything wrong that you're doing so I'm not sure what could be the culprit here.
Can you post a picture of the folder along with its content that is being created in the first stage of the extractor pipeline?
@koushikelux check your .gitignore for an entry for artifacts/
.
If that is in the .gitignore then you will need to remove it so the git -C {folder_name} status --porcelain
will find your changes.
@anotherRedbeard - Thanks for your response. yes, I have taken care of this and remove it from .gitignore. After that I can able to proceed further. Though there was some permission issue during creating the branch but I managed it. This issue is resolved now.
@waelkdouh - Thank you very much for your assistance and help.
I just ran into this issue too. I was just following the video guide on the homepage, but using an already existing repository with the .gitignore
file in it.
May I suggest to change the default value you guys are mentioning in the guides from artifacts
to something else that is not defined in the most .gitignore
files? In the youtube video, you could create an annotation when you are mentioning this.
Also, if you go forward with my suggestion, replace the screenshot from this guide: https://azure.github.io/apiops/apiops/3-apimTools/apiops-2-1-tools-extractor.html
Also the run-publisher.yaml
contains default "artifacts"
param.
Release version
APIOps Toolkit for Azure APIM v2.1.0
Describe the bug
Hi,
During execution of Run_Extractor, I am getting below log and it seems there is some issue with create_pull_request.sh at below line. I am using AzureRepo with AzureDevOps. Can you please tell me should I need to do any other extra configuration. I can see the artifacts are created in pipeline artifact but issue when trying to execute create_pull_request.sh file.
=============================== echo "Validating that changes exist to be published..." if [[ ! $(git -C "${temporary_folder_path}" status --porcelain | head -1) ]]; then echo "No changes exist to be published." exit 0 fi
============Logs Snippet -----------------
2022-12-01T16:27:36.3941202Z ##[debug]exec tool: /usr/bin/bash 2022-12-01T16:27:36.3941951Z ##[debug]arguments: 2022-12-01T16:27:36.3942724Z ##[debug] /home/vsts/work/1/s/tools/utils/create_pull_request.sh 2022-12-01T16:27:36.3943933Z ##[debug] --organization-url 2022-12-01T16:27:36.3944819Z ##[debug] https://dev.azure.com/****/ 2022-12-01T16:27:36.3948479Z ##[debug] --project-name 2022-12-01T16:27:36.3949123Z ##[debug] concent-apis 2022-12-01T16:27:36.3949685Z ##[debug] --repository-name 2022-12-01T16:27:36.3950163Z ##[debug] apiops 2022-12-01T16:27:36.3950734Z ##[debug] --pull-request-title 2022-12-01T16:27:36.3951286Z ##[debug] Merging artifacts from portal (Build 33934) 2022-12-01T16:27:36.3951874Z ##[debug] --branch-name 2022-12-01T16:27:36.3952340Z ##[debug] main 2022-12-01T16:27:36.3952885Z ##[debug] --source-folder-path 2022-12-01T16:27:36.3953499Z ##[debug] /home/vsts/work/1/artifacts-from-portal 2022-12-01T16:27:36.3954104Z ##[debug] --temporary-branch-name 2022-12-01T16:27:36.3954709Z ##[debug] artifacts-from-portal-build-33934 2022-12-01T16:27:36.3955301Z ##[debug] --temporary-folder-path 2022-12-01T16:27:36.3955918Z ##[debug] /home/vsts/work/_temp/artifacts-from-portal 2022-12-01T16:27:36.3956521Z ##[debug] --overwrite-subfolder 2022-12-01T16:27:36.3957004Z ##[debug] artifacts 2022-12-01T16:27:36.3958451Z [command]/usr/bin/bash /home/vsts/work/1/s/tools/utils/create_pull_request.sh --organization-url https://dev.azure.com// --project-name concent-apis --repository-name apiops --pull-request-title Merging artifacts from portal (Build 33934) --branch-name main --source-folder-path /home/vsts/work/1/artifacts-from-portal --temporary-branch-name artifacts-from-portal-build-33934 --temporary-folder-path /home/vsts/work/_temp/artifacts-from-portal --overwrite-subfolder artifacts 2022-12-01T16:27:36.3994340Z Installing Azure DevOps extension... 2022-12-01T16:27:36.6911123Z WARNING: Extension 'azure-devops' is already installed. 2022-12-01T16:27:37.2651277Z Creating folder /home/vsts/work/_temp/artifacts-from-portal... 2022-12-01T16:27:37.2665059Z Cloning branch main... 2022-12-01T16:27:38.5126845Z Cloning into '/home/vsts/work/_temp/artifacts-from-portal'... 2022-12-01T16:27:38.7332472Z Creating temporary branch artifacts-from-portal-build-33934 from main... 2022-12-01T16:27:38.7385313Z Switched to a new branch 'artifacts-from-portal-build-33934' 2022-12-01T16:27:38.7391058Z Overwrite folder set to artifacts; deleting its contents... 2022-12-01T16:27:38.7404091Z Copying source folder /home/vsts/work/1/artifacts-from-portal contents to temporary folder /home/vsts/work/_temp/artifacts-from-portal... 2022-12-01T16:27:38.7727378Z Validating that changes exist to be published... 2022-12-01T16:27:38.7786227Z No changes exist to be published. 2022-12-01T16:27:38.7797742Z ##[debug]Exit code 0 received from tool '/usr/bin/bash' 2022-12-01T16:27:38.7802388Z ##[debug]STDIO streams have closed for tool '/usr/bin/bash' 2022-12-01T16:27:38.7812905Z ##[debug]task result: Succeeded 2022-12-01T16:27:38.7822856Z ##[debug]Processed: ##vso[task.complete result=Succeeded;]Script exited with return code: 0 2022-12-01T16:27:38.7824351Z ##[debug]which 'az' 2022-12-01T16:27:38.7825116Z ##[debug]found: '/usr/bin/az' 2022-12-01T16:27:38.7826123Z ##[debug]/usr/bin/az arg: account clear 2022-12-01T16:27:38.7826843Z ##[debug]/usr/bin/az arg: account clear 2022-12-01T16:27:38.7827501Z ##[debug]exec tool: /usr/bin/az 2022-12-01T16:27:38.7828122Z ##[debug]exec tool: /usr/bin/az 2022-12-01T16:27:38.7828775Z ##[debug]arguments: 2022-12-01T16:27:38.7829381Z ##[debug]arguments: 2022-12-01T16:27:38.7829967Z ##[debug] account 2022-12-01T16:27:38.7830545Z ##[debug] account 2022-12-01T16:27:38.7831129Z ##[debug] clear 2022-12-01T16:27:38.7831706Z ##[debug] clear 2022-12-01T16:27:38.7832145Z [command]/usr/bin/az account clear 2022-12-01T16:27:39.2991536Z ##[section]Finishing: Create pull request with artifacts
Expected behavior
A pull request should be created after Run_Extractor pipeline.
Actual behavior
Pull request should be created .
Reproduction Steps
Follow the below guideline
https://azure.github.io/apiops/apiops/4-extractApimArtifacts/apiops-azdo-3-1.html