Skip to content

Repository files navigation

Maven Resource

CI BuildsDocker Pulls

Deploys and retrieve artifacts from a Maven Repository Manager.

Source Configuration

  • url: Required. The location of the repository.

  • snapshot_url: Optional. The location of the snapshot repository.

  • artifact: Required. The artifact coordinates in the form of groupId:artifactId:type[:classifier]

  • username: Optional. Username for accessing an authenticated repository.

  • password: Optional. Password for accessing an authenticated repository.

  • disable_redeploy: Optional. If set to true, will not re-deploy a release if the artifact version has been previously deployed. NOTE: has no effect for -SNAPSHOT versions or snapshot_url.

  • skip_cert_check: Optional. If set to true, will ignore all certificate errors when accessing an SSL repository. NOTE: this will supersede the repository_cert configuration if also specified.

  • repository_cert: Optional. CA/server certificate to use when accessing an SSL repository. Example:

    repository_cert: |
    -----BEGIN CERTIFICATE-----
    MIIEowIBAAKCAQEAtCS10/f7W7lkQaSgD/mVeaSOvSF9ql4hf/zfMwfVGgHWjj+W
    <Lots more text>
    DWiJL+OFeg9kawcUL6hQ8JeXPhlImG6RTUffma9+iGQyyBMCGd1l
    -----END CERTIFICATE-----
    

Behavior

check: Check for new versions of the artifact.

Checks for new versions of the artifact by retrieving the maven-metadata.xml from the repository.

in: Fetch an artifact from a repository.

Download the artifact from the repository.

out: Deploy artifact to a repository.

Deploy the artifact to the Maven Repository Manager.

Parameters

  • file: Required. The path to the artifact to deploy.

  • pom_file: Recommended. The path to the pom.xml to deploy with the artifact.

  • version_file: Required. The path to the version file

Examples

Resource configuration for an authenticated repository using a custom cert:

resource_types:
- name: maven-resourcetype: registry-imagesource:
repository: nulldriver/maven-resourcetag: latestresources:
- name: artifacttype: maven-resourcesource:
url: https://myrepo.example.com/repository/maven-releases/snapshot_url: https://myrepo.example.com/repository/maven-snapshots/artifact: com.example:example-webapp:jarusername: myuserpassword: mypassrepository_cert: | -----BEGIN CERTIFICATE----- MIIEowIBAAKCAQEAtCS10/f7W7lkQaSgD/mVeaSOvSF9ql4hf/zfMwfVGgHWjj+W <Lots more text> DWiJL+OFeg9kawcUL6hQ8JeXPhlImG6RTUffma9+iGQyyBMCGd1l -----END CERTIFICATE-----

Build and deploy an artifact to a Maven Repository Manager:

jobs:
- name: buildplan:
- get: source-codetrigger: true
- task: build-artifactfile: source-code/ci/build.yml
- put: artifactparams:
file: task-output/example-webapp-*.jarpom_file: source-code/pom.xml

Retrieve an artifact and push to Cloud Foundry using cf-resource

jobs:
- name: deployplan:
- get: source-code
- get: artifacttrigger: true
- put: cfparams:
manifest: source-code/manifest.ymlpath: artifact/example-webapp-*.jar

About

Maven Repository Manager Concourse Resource

Topics

Resources

Stars

22 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages