Bamboo artifact definition syntax examples

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

 

問題

My artifact copy pattern is not selecting the right files.


回答

An artifact is defined in Bamboo by the use of an Ant Copy Pattern and a location relative to the top of the build directory.

Many approaches can be used to select files to be included as an artifact so there are bound to be many ways to do this. 

At this time, we only provide functionality for the inclusive identification of files, not exclusion.


There are three parts to defining an artifact:

The Name will be how you can refer to the artifact in later stages.  

The Location. This is a way of applying the selection pattern to a location deeper in the build directory.  See the examples below. 

The Copy pattern. This is the regular expression that will determine what gets selected. 

EXAMPLES

The easiest way to define an artifact is to find a "location" as close as possible to the actual artifact elements and then use a simple pattern to select those files.  

Given a file structure below which is inside a PROJ-PLAN-JOB directory:


You can use the following artifact definitions to extract particular sets or combinations of files that will make up that artifact:


名前場所Copy pattern
All the files that are Jars (no txt files) under ArtifactTestPROJ-PLAN-JOB/ArtifactTest**/*.jar
Everything under ArtifactTest, including subdirectories and their filesPROJ-PLAN-JOB/ArtifactTest**/*
All Files in the firstDir, but not subdirectoriesPROJ-PLAN-JOB/ArtifactTest/firstDirfirstDir/*
All Files and subdirectories within firstDirPROJ-PLAN-JOB/ArtifactTest/firstDirfirstDir/**
All Files in the filesDirPROJ-PLAN-JOB/ArtifactTest/firstDir/secondDir/filesDirfirstDir/secondDir/FilesDir/*
Only jars in the filesDirPROJ-PLAN-JOB/ArtifactTest/firstDir/secondDir/filesDirfirstDir/secondDir/FilesDir/*.jar


A good article that contains more examples can be found here:


Last modified on Mar 16, 2022

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.