Skip to main content
Version: 1.1

Copy domains between multiple ADMs

To promote or copy artifacts between stages in a pipeline or DevOps scenario, add multiple adm repositories to your build.gradle file.

Define the repositories in order from development to production (Dev > QA > Prod) to generate the correct copy tasks. For example, with three environments (development, quality assurance, and production), define the ADM repositories in build.gradle as follows:

build.gradle
build.gradle
alfa {
namespace 'JanesNamespace'
repositories {
adm {
environment 'Dev'
//...
}
adm {
environment 'QA'
//...
}
adm {
environment 'Prod'
//...
}
}
}
note

The different environments do not necessarily need to reside on separate ADM servers; this depends on your environment isolation requirements.

This configuration generates the following tasks within their respective task groups: promoteFromDevToQA, promoteFromDevToProd, and promoteFromQAToProd.

Executing the promoteFromDevToQA task copies the domain from the Dev to the QA environment:

promoteFromDevToQA output
> Task:pullFromDev
Domain https://adm.dev.myorg/adm/api/namespaces/JanesNamespace/names/JanesDev/domain stored to build\alfa\axiomatics-adm-dev\domain.yaml

> Task:promoteFromDevToProd
Source file is build\alfa\axiomatics-adm-dev\domain.yaml
Domain successfully pushed to https://adm.myorg/adm/api/namespaces/JanesNamespace/names/production/domain. Server returned new id 03e830ad-8422-44ff-8775-a02c24b92800

BUILD SUCCESSFUL in 6s