Jfrog pipelines throws an error duing sync after step type is updated - jfrog-pipelines

I created a pipeline source (by following the Jfrog pipeline developer docs for steps) which had a step of type jenkins
- name: firstStep
type: Jenkins
I synced my pipeline source and the sync was successful
Later I updated the step type to be a bash step
- name: firstStep
type: bash
After this change, the pipeline sync fails with the error below:
type cannot be updated from Jenkins to Bash in step firstStep
What am I missing here?

After a step is created and synced successfully, the type of that step cannot be changed.
This is not supported. Please refer the document: JFrog Pipeline Steps for more information
If you still want the step type to be Bash then may be you can rename the step name, it will be added as a new step and the old step with name firstStep will be deleted.

Related

FileTransform Task in release pipeline doesn't update the value - AzureDevOps

I'm trying to update the value of appsettings.Development.json file while releasing application using Azure DevOps pipeline.
appSettings.Development.json
{
"Networks": {
"EnableNetwork": {
"SomeNetwork": {
"SomeValue": "Old Value"
}
}
}
}
I have configured File Transform: task as follows
And set the variable with scope "Release"
File Transfer Task runs successfully
However, it doesn't change the value after deployment. Tried different changes as shown in SO answers like How to change Appsettings and Config info in Release Pipeline. But not sure where is the issue!
The steps you use File Transform task should be correct. The value of appsettings.Development.json can be updated successfully.
You can check the log of File Transform task to confirm this point.
For example:
it doesn't change the value after deployment.
From your screenshot, the cause of this issue could be that you are using Microsoft-hosted agent to deploy the IIS WebSite. It will deploy the website to hosted agent instead of your local machine.
According to your screenshot of the release pipeline definition, the Stage 3 should be run on Deployment Group. In this case, it will deploy the package to local machine.
You need to check the release pipeline definition to make sure the stage is running on Deployment Group. Then you will see the changes after deployment.

Azure DevOps - AzureBlob File Copy task fails while copying files to blob storage

I am creating a release pipeline on Azure DevOps for deploying ReactJs App. I have two tasks in my release pipeline: Download Build Artifact task and AzureBlob File Copy task. The AzureBlob File Copy task throws the following error:
Upload to container: '$web' in storage account: 'XyzContainer' with
blob prefix: '' failed with error: 'AzCopy.exe exited with non-zero
exit code while uploading files to blob storage.
Please see the following screenshot:
Following are the settings for the AzureBlob File Copy task:
Thank you.
I made the following two changes to AzureBlob File Copy task settings and it worked!
Change #1: Downgrade the task version from 4 to 2.
Change #2: In the container name field, add quotation marks with the container name. For example: from web --> "$web"
Version 3 works as well.
There's still a bug with version 4. and with version3, you don't need to add quotation marks to the container name

Notification when cant download artifact

We have a scheduled release in Octopus that deploys the last known good release to Prod back to Prod.
However this has started failing because the artifact has fallen out of our retention policy - this we can fix by altering the retention policy.
The real issue is that when it failed no notifications were sent to the team because artifact collection happens before even the first step.
I have tested this with a dummy release that just has a single basic step and then a Slack Notification step for when it fails. However, we never get to the first step - let alone the slack step.
How can i hook on to this failure so that we know about these issues in future.
You have to follow below steps to achieve the same
Step 1) Add Email Template step # First : to inform that Build is triggered
There is a setting in that called : Start Trigger set it to Run in parallel with the previous step so email will be triggered while your artifacts are downloading
Step 2) Add Email Template step # Last : to inform that build failed
Just change the setting Run Condition set it to : Failure: only run when a previous step failed
so when your deployment get fail, It will notify the same. You can add the cause of failure in email body using inbuilt variables also.

VSTS Pipeline Deployment of ARM Error: Could not find any file matching the template file pattern

I am trying to deploy an Azure ARM script in VSTS Pipeline.
I "Published" the Artifacts in the Build Step and Downloaded the Artifacts in the Release Step. The Log seems to indicate that it found the ARM script (After much trial and error. The prescribed manner found here does not seem to work at all).
I however get Error: Could not find any file matching the template file pattern
Incidentally, I get this error even if can't find the file (which makes sense..but not when it actually does find the file). The ARM script deploys correctly when I deploy manually in Azure Portal.
I am using the Azure Resource Group Deployment step in the release pipeline.
I'm not sure what other information might help troubleshoot this, but request and hopefully I can get it to you.
Thanks
2018-12-14T18:32:06.6009951Z ##[section]Starting: Azure Deployment:Create Or Update Resource Group action on ChrisGroup
2018-12-14T18:32:06.6015952Z
==============================================================================
2018-12-14T18:32:06.6016124Z Task : Azure Resource Group
Deployment
2018-12-14T18:32:06.6016287Z Description : Deploy an Azure resource manager (ARM) template to a resource group. You can also start, stop, delete, deallocate all Virtual Machines (VM) in a resource group
2018-12-14T18:32:06.6016444Z Version : 2.141.4
2018-12-14T18:32:06.6016526Z Author : Microsoft Corporation
2018-12-14T18:32:06.6016655Z Help : [More Information] (https://aka.ms/argtaskreadme)
2018-12-14T18:32:06.6016801Z
==============================================================================
2018-12-14T18:32:06.9610677Z Checking if the following resource group exists: ChrisGroup.
2018-12-14T18:32:07.2734470Z Resource group exists: true.
2018-12-14T18:32:07.2736899Z Creating deployment parameters.
2018-12-14T18:32:07.2809876Z The detected encoding for file 'D:\a\r1\a\IAC\ARM.json' is 'utf-8'
2018-12-14T18:32:07.3021166Z ##[error]Error: Could not find any file matching the template file pattern
2018-12-14T18:32:07.3030720Z ##[section]Finishing: Azure Deployment:Create Or Update Resource Group action on ChrisGroup
As per request:
In the Template Parameters field I put
-dailyreports_name '$(IACWeb)' -dailyreportsapi_name '$(IACAPI)'
and OMG... It's supposed to be a path to a variables file. UGH
Once I put into the Override Template Parameters, it works.
Microsoft should probable reword the label to "Template Parameters File"
You need to put the parameters being passed in into the "Override template parameters". The "Template parameters" field is actually a reference to a file location.
##[error]Error: Could not find any file matching the template file pattern
Check few things here :
check all parameter names (case sensitive) in the parameter file and template file.
if you are using yml file for azure devops pipeline,
check all overrideParameters are correctly mentioned
overrideParameters: '-environment "${{parameters.environment}}"' #for example
check csmParametersFile , csmFile path in the yml
For me, the issue turned out to be that I had to select specific build number while creating the release. If don't use specific build and just leave latest version option by default, then this error comes.
When migrating from Classic to YAML deployments:
Seeing:
##[error]Error: Could not find any file matching the template file pattern,
may be because you're referencing Pipeline Artifacts through the inputs csmFile and csmParametersFile, without actually having access to them in your pipelines stage. You may need to download the artifacts first, as seen in the second stage in this answer.
A quick check to see if this is the case would be to by-pass your artifacts, and point the mentioned inputs directly to your azuredeploy.json and azuredeploy.parameters.json files where they are located in your repo.

Concourse resource is not used error message

I have a concourse pipeline that bumps a semver, publishes a release to a GitHub-release resource and publishes a message using a slack-notification resource. All is fine until I try to start using on_failure: and on_success: steps.
I moved the slack put to on_success without issue. But when I try to move the GitHub-release put to on_success set-pipeline returns the error:
resource 'github-release' is not used
I tried putting it in both on_failure and on_success but I still get the message.
Is there a way to only publish this release when the build is good?
The on_success and on_failure only run a single step of a pipeline. If you want to run multiple steps, you have to use one of the block steps, such as do or aggregate to accomplish this.
For example:
on_success:
do:
- put: slack-notification
- put: github-release