Migration Guidelines for Binary Artefacts Repository (BAR) from Nexus Raw Artefact Repositories
This page describes some examples use cases that have been identified on the SKAO project and gives guidelines for an easier migration.
General Guidance
Do: Use the BAR API instead of Nexus search API to find the correct artefact to download following this example: Check artefact metadata and download it by name and version tag.
Do: Flatten the target path/repo into the artefact name and use the version field to keep track of changes.
Do: Push the files that are connected to that artefact version as artefact assets using the linked example: Uploading an artefact with multiple assets (files).
Do not: Use hardcoded paths to download/upload artifacts.
Do not: Use sha256 as part of the name as this is created automatically and added as a metadata property for the artefact.
Do not: Parse the HTML output of the BAR UI to find and download artefacts.
STS-608 - SDP TelModel
Downloading Artefacts
Use the BAR API instead of Nexus search API to find the correct artefact to download following this example: List artefact versions, get sha key for specific version, and download artefact by sha key.
Uploading Artefacts
Request an API key for machine usage and use it as part of auth flow.
Ideally use a descriptive name for the artefact. There’s no need to use sha256 as part of the name as this is created automatically and added as a metadata property for the artefact.
The target repo can be flattened into the name. i.e.
sts-608/gitlab/<repo>/largefiles
becomestelmodel-<repo>-largefiles
as the artifact name, and the version can be anything.Push the files using the linked example: Uploading an artefact with multiple assets (files).
Please note that artefacts need a version field now. This can be any alphanumerical.
p4-switch-internal
Downloading Artefacts
Instead of using a hardcoded path, use the BAR API to download an artefact by its name and version using example: Check artefact metadata and download it by name and version tag
In case you want to download a specific asset (file) from the artefact instead of all the assets as a zip file, you can use the BAR API to download a specific asset directly using example: List all assets of an artefact version and download a specific asset
Uploading artefacts
Request an API key for machine usage and use it as part of auth flow.
The SDE folder, should instead be the artifact name and each file can have different versions as required. i.e.:
Alternative 1: artifact name:
sde
; version:bf-reference-bsp-9.13.0
.Alternative 2: artifact name:
sde-bf-reference-bsp
; version9.13.0
.
Push the files using the instructions at Uploading an artefact with multiple assets (files), or manually using the UI.
raw-telmodel
Downloading Artefacts
Instead of using a hardcoded path, use the BAR API to download an artefact by its name and version using example: Check artefact metadata and download it by name and version tag
In case you want to download a specific asset (file) from the artefact instead of all the assets as a zip file, you can use the BAR API to download a specific asset directly using example: List all assets of an artefact version and download a specific asset
Uploading artefacts
Request an API key for machine usage and use it as part of auth flow.
The target repo can be flattened into the name. i.e.
gitlab.com/ska-telescope/gitlab/<project>/<repo>/
becomestelmodel-<project>-<repo>
as the artifact name, and the version can be anything to keep tract with the differenttmdata
contents versions.Push the files under
tmdata/<hash>
using the linked example: Uploading an artefact with multiple assets (files)
ansible-internal
Downloading Artefacts
Instead of using a hardcoded path, use the BAR API to download an artefact by its name and version using example: Check artefact metadata and download it by name and version tag
In case you want to download a specific asset (file) from the artefact instead of all the assets as a zip file, you can use the BAR API to download a specific asset directly using example: List all assets of an artefact version and download a specific asset
Uploading artefacts
No use case identified for this repository.
k8s-ci-creds-internal
Downloading Artefacts
1. Ideally migrate to an automated process as described at Check artefact metadata and download it by name and version tag to avoid the need to download the artefacts manually. If this is not possible, use the BAR UI.
Uploading artefacts
Request an API key for machine usage and use it as part of auth flow.
The target asset can be flattened into the name. i.e.
k8s-ci-ska-tmc-low-integration-41-sa-ci-ska-tmc-low-integration-41a2cebd-conf
becomesk8s-ci-ska-tmc-low-integration
as the artifact name, and the version can be anything to keep track of changes.Push the files
conf
,on-demand-conf
andlow-ith-conf
using the linked example: Uploading an artefact with multiple assets (files)
raw-internal
There are too many different use cases for this repository for us to go through all of them. As such, we are going to provide some general guidance on how to migrate artefacts from this repository.
Downloading Artefacts
Use the BAR API instead of Nexus search API to find the correct artefact to download following this example: Check artefact metadata and download it by name and version tag.
Uploading artefacts
Request an API key for machine usage and use it as part of auth flow.
The target repo/asset can be flattened into the name. i.e.
ska-mid-cbf-talondx/fpga-test
becomesska-mid-cbf-talondx-fpga-test
as the artifact name, and the version can be anything to keep track of changes.Push the different files presently under
ska-mid-cbf-talondx/fpga-test
using the linked example: Uploading an artefact with multiple assets (files)