Artifactory for v8.4 - tooltwist/documentation GitHub Wiki

Introduction

At Twist Resources we use two artifactory servers.

  1. A cloud-based server - (http://repo-tooltwist.com). This server is publicly accessible so requires full authenticated access, and contains a separate 'local' repository for each of our projects/clients.

  2. A server in the office, that caches the repositories from the remote server to reduce network traffic and provide fast builds, at (http://officerepo.local:8081). This repository in behind our filewall so allows anonymous access. A single virtual repository named office-all-in-one allows any user in our office to access the jars in any of our projects.

Note that we publish to the remote server, but normally resolve artifacts during our builds from the local server.

See here for the Gradle configuration for this set up.

Adding a new repository

Whenever we have a new project or client that need it's own repository, several steps are required to provide appropriate access.

Step A - add to the public server

For these instructions we'll add a project named bumblebee.

  1. Go to http://repo.tooltwist.com and log in as an administrative user.

  2. Go to Admin Tab -> Repositories

  3. Add a new local repository named bumblebee-release-local:
    Repository Layout: maven-2-default
    Checksum Policy: Verify against client checksums
    Handle Releases: YES
    Handle Snapshots: NO

  4. Add a new local repository named bumblebee-snapshot-local:
    Repository Layout: maven-2-default
    Checksum Policy: Verify against client checksums
    Maven Snapshot Version Behavior: Unique
    Max Unique Snapshots: 3
    Handle Releases: NO
    Handle Snapshots: YES

  5. Go to Admin Tab -> Permissions and add a new Permissions Target:
    Name: bumblebee-repositories
    Any Local Repository: No
    Any Remote Repository: Yes
    Repositories: Copy the new repositories created above to the column on the right.

Set access permissions on the Users tab:
circleci: Deploy, Annotate, Read
office-artifactory: Read

Step B - add to office server

  1. Log on to http://officerepo.local:8081/artifactory/.

  2. Go to Admin Tab -> Repositories

  3. Add a new remote repository named bumblebee-release-remote.
    URL: http://repo.tooltwist.com/artifactory/bumblebee-release-local
    Handle Releases: YES
    Handle Snapshots: NO

On the Advanced Settings tab:
Username: office-artifactory
Password: fi...op

Press the Test button to check the connection.

  1. Add a new remote repository named bumblebee-snapshot-remote.
    URL: http://repo.tooltwist.com/artifactory/bumblebee-snapshot-local
    Handle Releases: NO
    Handle Snapshots: YES

On the Advanced Settings tab:
Username: office-artifactory
Password: fi...op
important
Retrieval Cache Period: 0
Missed Retrieval Cache Period: 0
(scroll down)
Eagerly Fetch Jars: YES
Eagerly fetch sources: YES
List remote folder items: YES
Synchronize Artifactory properties: YES

Press the Test button to check the connection.

  1. Hover your mouse over the virtual repository named office-all-in-one and select Edit. Under Available Repositories select the two new repositories you've created and move them over to Selected Repositories.

Step C - Grant Access to the Repository

For most users repository access does not need to be set up.

If you are:

  • the person who publishes release versions.
  • you are testing the Gradle config used by CircleCI, or
  • you need to build without access to the office repo...

you can configure access to the public repository as shown in Creating Artifactory Users for v8.4.

--