Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ the repository.

### `in`: Fetch an artifact from a repository.

Download the artifact from the repository.
Places the following files in the destination:

- (artifact): The artifact fetched from the repository.

- version: The artifact's version.


### `out`: Deploy artifact to a repository.
Expand Down
1 change: 1 addition & 0 deletions assets/in
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ args="$args -Drepository.url=$url"
[ -n "$password" ] && args="$args -Drepository.password=$password";

$resource_dir/mvnw dependency:copy $args
echo "$version" > "$destination/version"

jq -n \
--arg version "$version" \
Expand Down
18 changes: 18 additions & 0 deletions test/get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,22 @@ it_can_get_artifact() {
'
}

it_provides_a_version_file_when_getting_artifact() {

local src=$(mktemp -d $TMPDIR/check-src.XXXXXX)

local repository=$src/remote-repository
mkdir -p $repository

local url=file://$repository
local artifact=ci.concourse.maven:maven-resource:jar:standalone

local version=$(deploy_artifact $url $artifact '1.0.0' $src)

get_artifact $url $artifact $version $src

if [ $(cat version) != $version ]; then exit 1; fi
}

run it_can_get_artifact
run it_provides_a_version_file_when_getting_artifact