# Hive *An Artifact Manager for Perforce* A Proof of Concept (PoC) project to explore Artifact managment using the Helix Versioning Engine. Internal Perforce staff can see a running demo [here](http://achilles.perforce.co.uk:4567/). ## Overview Hive extends a regular Perforce depots to store artifacts used for build and deployment. Currently supporting the following types: * Maven * Ruby Gems (experimental) * Generic (any revision in Perforce) Each Artifact repository is backed by a Perforce Depot. There are three types of repositories: `Local`, `Proxy` and `Group`. ### Local repositories A `Local` repository is designed to store artifacts created within your organisation. You can add new artifacts to a `Local` using the *Depoly* option. ### Proxy repositories A `Proxy` repository will cache remote Artifact from a 3rd party server (e.g. Maven Central). ### Group repositories A `Group` repository is made up of a combination of repositories: `Local`, `Proxy` and even other `Group` repositories. When a build searches for an artifact it will try each repository within the group in the specified order. ## User Guide ### Landing page Top level access to the three core functions 'browse', 'search' and 'deploy'. If an administrator is logged in there will be an extra option 'admin' for configuring and adding new artifact repositories (depots). ![Front page](docs/images/front.png) ### Browse Provides a list of all the artifact repositories in 'grid' or 'list' view. Clicking on the artifact repository will open a new page to browse down to the file/directory structure. Grid view (honey comb icons for each artifact type) ![Depot grid](docs/images/depot-grid.png) List view (supports column sorting) ![Depot list](docs/images/depot-list.png) ### Repository infomation When browsing an artifact repository, users can click on the artifact's logo to access the information page. The page displays connection information for their build tool (e.g. Maven or Gradle). ![Depot info](docs/images/depot-info.png) ### Search Search requires `p4 search` and allows users to search for artifacts by name or content within the artifact. For example, you can search for a class name inside a JAR or the name of the JAR file. By name... ![Search name](docs/images/search-name.png) By content (class)... ![Search class](docs/images/search-class.png) ### Artifact summary Artifact summaries are displayed within the browser inside the directory containing the files that form the artifact. Users can get to the artifact using the search results or manually browsing. ![](docs/images/artifact.png) ### Deploy Artifacts can be uploaded into an artifact repository, using the deploy steps: 1. Add files and artifact details ![](docs/images/maven-1.png) 2. Review pending changes and provide a description ![](docs/images/maven-2.png) 3. Submit and review deployment ![](docs/images/maven-3.png) ### Configuration Administrators with `super` can create new artifact repositories (Perforce depots) or update an artifact repositories settings. ![](docs/images/config-list.png) There are three types `Local`, `Proxy` and `Group`. Local is a basic store for company generated artifacts. Proxy for caching 3rd party artifacts and Group for defining search order when looking for artifacts in Local or Proxy repositories. Configuration for a Proxy (Maven Central) ![](docs/images/config-proxy.png) Configuration for a Group ![](docs/images/config-group.png) ## Configuration All server configuration setting are defined [here](https://swarm.workshop.perforce.com/projects/perforce_software-hive/files/main/src/main/resources/config.properties). The configuration can be applied at build or run time using `-Dconfig.file=your_config`. ## Building Hive uses Gradle to build. You will need Java 8 (JDK) and Gradle 2.2.1 gradle clean jar