Azure build and release artifacts naming?

ennth

I have a repo on my DevOps Azure website by the name of "my_platform_services". This repo isn't a Java Maven or Gradle project or anything like that; it's mostly bash scripts.

I basically wanted to consume/use this repo into my Release pipeline, where I want to add a one Stage and a few tasks to run one of the bash scripts inside my_platform_services repo in the ovf/build directory!

I know I can add the Command line task in the Stage and put the code to run my script, which is:

./deploy.sh -i name -v 1.0.0

But I keep getting a No such file or directory error enter image description here

I don't know how to access the working directory of that artifact/repo so I can run my script on that agent. I'm confused by my companies naming of the variables. Some of the build pipelines have variables like $BUILD_ARTIFACTSTAGINGDIRECTORY, some of the scripts in the Release pipelines, which I was trying to emulated have $(System.DefaultWorkingDirectory), some are $(Build.ArtifactStagingDirectory).

I don't get why some are the same but capitalized or why some have parenthesis, and I tried looking at the Azure/Microsoft documentation but all the "pre-defined" pipeline variables they list aren't the same. I even looked at the respective pipelines (both release & build) variables to see if I would find any there, but there were just variables like constants and such for passwords or other variables (None that looked like this).

If I set a repo as an artifact for the Release pipeline, does it automatically get consumed, or do I still need to add a Task in the Stage (in the release pipeline) for "Download the Artifacts" from that specific repo?

So can anyone explain to me where these variables are defined and what the heck their paths are? I built some rudimentary build pipelines that were very simple and a release pipeline that consumed the build pipeline and deployed to Azure, but it used they "default" deploy to azure stage, so I didn't have to manually configure any directories or files. I'll take any help!!

Krzysztof Madej

If you already added your repository as an artifact in Release pipeline. I mean you did this:

enter image description here

enter image description here

You should easily find a this step in your job:

enter image description here

So you don't have to add any download step. They are there. You can also find in docs that:

System.DefaultWorkingDirectory

The directory to which artifacts are downloaded during deployment of a release. The directory is cleared before every deployment if it requires artifacts to be downloaded to the agent. Same as Agent.ReleaseDirectory and System.ArtifactsDirectory.

But they are not directly in this folder. Defining artifact you added them an alias. And they are under this folder. I have two artifacts and for ls $(System.DefaultWorkingDirectory) I got:

2020-05-05T05:34:40.8873412Z     Directory: D:\a\r1\a
2020-05-05T05:34:40.8873732Z 
2020-05-05T05:34:40.8873966Z 
2020-05-05T05:34:40.8876175Z Mode                LastWriteTime         Length Name                                                                  
2020-05-05T05:34:40.8877413Z ----                -------------         ------ ----                                                                  
2020-05-05T05:34:40.8879803Z d-----         5/5/2020   5:34 AM                repos                                                                 
2020-05-05T05:34:40.8891912Z d-----         5/5/2020   5:34 AM                _DevOps Manual-CI                                                     
2020-05-05T05:34:40.8955258Z 

Please check what is your alias for your artifact and try command:

./yourAlias/deploy.sh -i name -v 1.0.0

If deploy.sh is in the main root of the repo.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Azure DevOps: Error importing Maven artifact from Azure Artifacts into Release

VSTS: Publish build artifacts to Azure File Storage

How build artifacts are managed in Azure DevOps pipeline?

See Build Artifacts in Azure DevOps with YAML Pipeline

Azure pipeline build artifacts for previous builds

Unable to reference artifacts' build numbers in Release name format

VSTS - Azure DevOps: AppSettings transformations during the release, or multiple artifacts

Create Azure DevOps release without artifacts via Rest API

Azure yaml build and release pipeline

Naming resulting ZIP archive in Azure Pipelines build?

azure devops: copy and publish build artifacts - rename artifact by buildnumber

How to download the latest build artifacts from Azure DevOps programmatically?

Azure Artifacts to download only specific files required for deployment on build server

Azure Devops - Publish Pipelines Artifacts: Build Id is not valid

Connect to Azure Artifacts Feed from docker image running on build agent

Can't see my build artifacts after Azure Pipeline finished

Azure CD pipeline can't find build artifacts

how can we change the name of files of build artifacts in azure devops

Creating Azure Pipeline Build and Release using a script

Azure Pipeline dotnet not creating release build

Visual Studio Online Build and Release Azure Powershell

maven release:prepare in azure build pipeline

Call a release build from REST api in Azure

Build in release mode when publishing Azure Functions?

Azure DevOps Trigger build on release/{version} branch

Azure DevOps Release pipeline using build tags

How can I deploy artifacts from a Maven build to the SourceForge File Release System?

Migrating Published Artifacts in Azure Artifacts

Azure release pipeline get build number of build pipeline