Questions
Browse questions with relevant CI/CD tags
1,038 questions
Has recommended answerDeploying separate repos to production with azure-pipelines.yml
I suspect the upload files step is what's baffling you? I suspect that you're connecting to an FTP server using FileZilla. There is a task in Azure Pipelines as well to connect to and upload files to ...
Find Active Pipelines in Azure DevOps Server [closed]
If you have access to the database, you query a few tables that store the build definitions and their schedules. There are at least 3 clusters of tables, one for Release management (UI), one for Build ...
Schedule a Terraform destroy and apply of the same resource using Github Actions in Azure
I would suggest to move the Bastion resource into its own Terraform configuration and state file. This prevents state file conflicts and unintended side effects for the rest of your infra. This keeps ...
Conditional Run-Time Approval at Azure DevOps
In YAML You should be able to use the ManualValidation task instead: - task: ManualValidation@1 inputs: notifyUsers: # string. Required. Notify users. #approvers: # string. Approvers. #...
GitHub PR doesn’t wait for Terraform Cloud speculative plan to complete before allowing merge
You'll need to add a Branch Ruleset in which you configure required checks: Enable the require checks to pass rule and enter the required data: You can enter the name of a check that has previously ...
Can an installation job and a test job be in different stages in an Azure Devops Pipeline?
Each job creates a new build agent on Azure DevOps pipelines. In your case, you install nodejs on one agent and then run build/test on another. Here, it is better to use one job definition.
Can the GitHub Actions bot be bypassed from signing commits by the GitHub Terraform provider?
You can't add GitHub actions to the bypass list at the moment. You can either use a user's PAT token or use a GitHub App and then use the app identity in the bypass list of type "integration"...
Sign commits made by GitHub Actions workflow?
It is possible - you need to import you GPG keys and configure commits to use it. The easiest will be to use one of the existing actions, for example: - name: Configure GPG uses: crazy-max/ghaction-...
AzureDevOps pipeline Docker v2.240.2 not allowing me to push
If that is possible, add docker image ls before push to see what exactly your build agent built. As a workaround, you can try buildAndPush command on the build step: - task: [email protected] ...
Run workflow globally for all repos in an organization
GitHub Enterprise can do that via rulesets: you can create a branch ruleset that requires a workflow to pass before any PR can be merged. That workflow can live anywhere in your organization No ...
How to skip GitHub Actions workflow triggered by push to main if the original PR was created by github-actions[bot]?
There is no way to filter it out on the trigger level. The only way you can make it work currently is to let the workflow run and skip the entire job by checking: jobs: your_job: if: github....
Why does the Azure Pipelines Build Agent not use the latest version?
Agent updates roll out across multiple "deployment rings" for Azure DevOps. There is a certain order to these rollouts and sometimes, when an issue is detected during the rollout, an image ...
workflow_run not triggering my second pipeline after successful completion
The + character seems to be causing a bug. This version works correctly: name: CI and SonarQube Analysis on: workflow_run: workflows: - CI and SonarQube Analysis types: - ...
GitHub Actions get sha during after merge commit during push action for deploy
The github context has this available: ${{ github.sha }} in expressions $GITHUB_SHA in the environment So, for your example, you could pass it in like jobs: deploy-to-uat: uses: ./.github/...
How to use a checked out workflow
You're using a reusable workflow (called) from repo A, but trying to use it like it's a composite/local action (i.e., with uses: ./path). Reusable workflows need to be called in job level, not in step ...
Azure Devops Pipeline - Prevent manual run on non-master branch
Okay, I'm going to give you a lot of options here. Any one of them should fit the bill and can even be combined if you're ultra paranoid (which isn't always a bad thing, mind you!). Of course, since ...
Azure DevOps Pipeline Condition with parameters didn't work
This is one of the most difficult pieces of Azure Pipeline YAML syntax to get right, what syntax is available in what stage of the template expansion. I can't find the exact docs which tell whether ...
Github action mirror repository receiving 403
When you use the checkout action, the auth token is persisted in the git config. Try setting your personal token there instead of in the run step: steps: - name: Checkout repository ...
Can the batch parameter be used inside the resources section in Azure Pipelines?
The documentation for pipeline resource triggers can be found here: https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/resources-pipelines?view=azure-pipelines https://learn....
How to fix the issue: ##[error]Error: No package found with specified pattern: /home/vsts/work/1/s/**/*.zip
Why do you use an unexisting parameter of AzureWebApp@1 task? Whatever you set to the packageForLinux, the build always try to find by $(System.DefaultWorkingDirectory)/**/*.zip pattern. If you ...
Workflow outputs not being saved or read
You have to set outputs at the job level: set-batch-indicator: runs-on: self-hosted environment: ${{ inputs.environment }} needs: [build, test] outputs: ConfigSourceBatch: ${{ steps.batch-...
Reliability issues with GitHub actions, with cron based schedule
From the docs: The schedule event can be delayed during periods of high loads of GitHub Actions workflow runs. High load times include the start of every hour. If the load is sufficiently high enough,...
How to do a conditional ref for checkout?
According to GitHub Actions Operators: GitHub offers ternary operator like behaviour that you can use in expressions. By using a ternary operator in this way, you can dynamically set the value of an ...
Azure Classic Pipeline Error: Input required: ConnectedServiceName
You can not edit this yaml because it should be used for migration to yaml pipelines only. It is read-only here. You should add a service connection to your Azure resources (Manage service connections,...
How to prevent showing secrets in GitHub Actions output [closed]
Pass the data containing the secret through the environment: - name: Setup terraform variables shell: bash run: | cat <<'EOF'>terraform.tfvars $...
On the Azure devops git repos ui how to get recent pipeline builds runs to show up in the UI for a repository?
By default, this option should be enabled and should see the status. Check which branch you see on the code page. If you select the Branches page, you should see the state of each branch where some ...
How to use a variable in a GitHub action step 'name'?
There's a handy table in the documentation showing which context is available where. For jobs.<job_id>.steps.name, the contexts are github, needs, strategy, matrix, job, runner, env, vars, ...
Have a dict type variable in Azure yml pipelines
That is a complex task to suggest something without pipeline sources. However, you may consider using parameters from this example (or use as an array): https://learn.microsoft.com/en-us/azure/devops/...
Create a CD script using ADO server
You may use UniversalPackages@0 Publish and download Universal Packages with Azure Pipelines - task: UniversalPackages@0 displayName: 'Universal publish' inputs: command: publish ...
Pass powershell output between tasks in Azure Devops
You may use logging commands: SetVariable: Initialize or modify the value of a variable. Then read as environment variable. From the example: Set the variables: - pwsh: | Write-Host "##vso[...
The project with id does not exist, or you do not have permission to access it
you need to pass your $(System.AccessToken) through environment variables: System.AccessToken - task: PowerShell@2 env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) inputs: targetType: '...
Escape string for use in PowerShell task passed as batch script parameter
Using inline scripts in Azure DevOps tasks means you are generating the body of the script to be executed, so everything in it must be properly escaped. The workaround is not setting the password ...
Where does the TFS pipeline prints the output?
You can find this info on Azure DevOps Docs: View and manage your pipelines View pipeline details
Syntax highlighting does not work on piped (|) shell commands in GitLab CI script block in VS Code
There is a VS Code extension called YAML Embedded Languages which looks like it does what you're asking for. You'll have to leave a language hint as a comment: deploy_gtn_application: stage: build ...
How to programmatically update lots of existing Azure DevOps Pipelines (yml) to use newly migrated GitHub Repos?
In case you used the GitHub Enterprise Importer, there is a rewire command to automatically update all build definitions. gh extension install gh/gh-gei gh extension install gh/gh-ado2gh gh ado2gh ...
deploy-pages@v4 Cannot Find Uploaded Artifact (No artifacts named "github-pages" were found)
The relevant bit from the download-artifact docs: By default, the permissions are scoped so they can only download Artifacts within the current workflow run. In other words, you have to make the ...
What's the proper way to modify inputs before calling an external workflow?
You have to declare the output on a job level, and add an ID to the step producing the output. Your examples are all invalid as they're missing the steps: object, but I assume that's due to copy-...
Get changed files in Azure DevOps PR based pipeline
To use git diff, you need to download a changes history and GitHub Actions also have the same setting: Fetch all history for all tags and branches Also, you may use REST API to get changes in PR: ...
Sphinx fails on GitHub Actions: some incomprehensible problem with Ghostscript
The actions/checkout by default does a shallow checkout and doesn't restore submodules or download LFS objects. This can cause the repo on the Runner to be different than on your local machine. In ...
Download a Zip File from Azure DevOps Git Repo Using Azure DevOps SDK
you may try GetItemZipAsync method var fileStream = File.Create("C:\\Temp\\my.zip"); var zipstream = GitClient.GetItemZipAsync(TeamProjectName, GitRepoName, path: "/Readme.md")....
Use variables in Approval and Check Azure Devps Pipeline
You have a few syntax issues in your pipeline. Setting the variable Instead of using a , separator: echo "##vso[task.setvariable variable=RefId,isOutput=true]$ref_id" Use a ; separator: ...
Use Variable from matrix job in another matrix job
The matrix strategy is used to generates copies of a job, each with different configuration (i.e. variables). Each job will run in parallel and independently from each other, i.e. there should be no ...
Azure pipeline giving error An element could not be located at line WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), appiumOptions);
Did you check this doc: WinAppDriver in CI with Azure Pipelines? WinAppDriver supports self-hosted agents only. (HostedVS2019 and HostedVS2017 are not available) and you need to enable interactive ...
Reading env variable from template.yaml
There's no need to use logging commands in this particular case. Just declare a regular variable like this, which will be recursively expanded: variables: - name: docker_version value: $($(Build....
I'm having a hard time passing secrets in gcp secret manager to cloud build docker build stage. Am i passing these correctly?
You can do much simpler. Keep in mind that you can use SECRET_ENV in Cloud Build only in "script" context (entrypoint bash) See my working exemple steps: - name: 'gcr.io/cloud-builders/...
Exclude reusable workflows from GitHub Actions sidebar
This is how GitHub Actions currently working, you can't hide the reusable workflows from the UI. There is a popular feature request about it: https://github.com/orgs/community/discussions/12025 And ...
Split Unit test to different job than publishing in Azure DevOps Yaml with ASP.NET Core
Sure. You can publish artifacts and then download them in subsequent jobs. You already do it as the last step of your pipeline. Just use - checkout: none to skip grabbing the source code and - ...
How to reuse GitHub workflows for GitLab pipelines or vice versa?
Both use a different expression language, offer different features etc. So. your main workflow files will need to be unique per platform. But like you suggested, both platforms can run docker ...
Run Python script on Azure DevOps with Classic UI
Have you considered using Microsoft-hosted agents? Python and pip are already included. You can then select one of the pre-installed versions of Python using the UsePythonVersion@0 task.
Azure Pipeline remove job from ui if job is conditionally skipped/removed
You can use an if statement to prevent a specific stage, job or step from being generated in QA or Prod environments: - ${{ if eq(environment, 'test') }}: # ... Example pipeline: parameters: - ...
Simply submit a proposal, get it approved, and publish it.
See how the process works