Unable to deploy artifact from Appveyor to Github - github

I am getting this message:
"GitHub" deployment has been skipped as environment variable has not matched ("appveyor_repo_tag" is "false", should be "true")
But, as can be seen in my Appveyor.yml:
https://github.com/GrokImageCompression/grok/blob/master/appveyor.yml
appveyor_repo_tag is actually set to true

remove skip_tags: true
add tag: $(APPVEYOR_REPO_TAG_NAME) in GitHub deployment setting (to prevent AppVeyor from creating a new tag, and endless build loop)
optionally add force_update: true (to update release details, not only files)

Related

Azure DevOps: How to eliminate the warning "Tags set for the trigger didn't match the pipeline" in Azure DevOps?

I have two Azure DevOps pipelines set up so that the completion of Pipeline One triggers Pipeline Two. It works fine, but it generates an unnecessary error message.
All recent Pipeline Two builds are listed on this page (not really a link, don't bother clicking on it) : https://dev.azure.com/mycompany/myproject/_build?definitionId=29
Any trigger issues are listed on this page (not really a link, don't bother clicking on it) : https://dev.azure.com/mycompany/myproject/_build?definitionId=29&view=triggerIssues
It appears that every run of Pipeline One -> Pipeline Two adds this warning to the Trigger Issues page: "Tags set for the trigger didn't match the pipeline". It's only a warning, not an error, and Pipeline Two executes successfully. But how can I eliminate this warning message?
The pipeline resource is specified in Pipeline Two as follows:
resources:
pipelines:
- pipeline: pipeline-one
source: mycompany.pipeline-one
# project: myproject # optional - only required if first pipeline is in a different project
trigger:
enabled: true
branches:
include:
- master
- develop
- release_*
No tags are specified, because tags are not used.
I have reviewed the following documentation without finding an answer. I may have missed something in the docs.
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/pipeline-triggers?view=azure-devops
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/resources?view=azure-devops&tabs=schema#define-a-pipelines-resource
https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/resources-pipelines-pipeline?view=azure-pipelines

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.

Use older version of github-release-resource in Concourse using dynamic tag from a file

GitHub-release resource always emits the latest version. I want to get a specific tag with the version specified in a file.
Below did not fetch the version - github-release - pinned version tag: path/to/the/file/with/version not found
- get: github-release
version:
tag: path/to/the/file/with/version
params:
include_source_zip: true
I was able to get the older version by hardcoding the version
- get: github-release
version: { tag : 'v1.0.0' }
params:
include_source_zip: true
and fly check-resource -r pipeline/github-release-resource --from tag:v1.0.0
This is a concourse configuration.
Basically, as stated here, you can't really change this on runtime unless you reset the pipeline:
Pinning through the pipeline config is useful for a more permanent pinned state. If a resource is pinned through the pipeline config, it cannot be modified through the web UI and can only be changed through modifiying and resetting the pipeline config.
Also, the command fly check-resource ... is useful in order to verify the version actually exists.

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