zuul-jobs/roles/upload-artifactory
Albin Vass ca2936a855 upload-artifactory: no_log upload task
If the upload request fails artifactory can respond with the apiKey as part of
the body. Add a no_log to avoid leaking apiKeys.

Change-Id: I2e03c3e06754e650ca2987c6a0a7ae2b8ed86268
2020-12-21 18:33:35 +01:00
..
defaults Add upload-artifactory role 2020-05-12 20:02:12 +02:00
tasks upload-artifactory: no_log upload task 2020-12-21 18:33:35 +01:00
README.rst upload-artifactory: documentation fix 2020-05-28 17:28:34 +02:00

Upload artifacts specified from the executor to artifactory.

Note

This role uses the src function of the uri module introduced in Ansible 2.7 therefore any ansible version lower than that is not supported.

Role Variables

Complex argument that contains the information about credentials, fqdn and name. This argument is expected to come from a secret.

User for authenticating.

Password for authenticating. Has a lower precedense than api_key.

API key for authenticating. Has a higher precedense than password.

Fully qualified domain name to the instance.

Dictionary of types of items to upload. Currently only supports artifacts.

Variable that contains a manifest of the artifacts that should be uploaded to a specific instance of artifactory. This is expected to be set during the build as a cached fact.

artifacts:
  - name: tarball
    src: artifact.tar.gz
    dest: /destination/to/put/artifact/artifact.tar.gz
    instance: artifact-server1
    headers:
      Content-Type: application/gzip

The attributes available on an artifact are the following.

Name of the artifact. This will be displayed in the build page.

Path relative to {{ zuul.executor.work_root }}/artifacts/.

Destination where the artifact should be put in.

Artifactory instance to place the artiface in, this is to choose which entry in upload_artifactory_instances to upload the artifact to.

Any headers that should be passed to ansibles uri module when uploading.

Any metadata that should be returned to Zuul together with the artifact link.