-
Notifications
You must be signed in to change notification settings - Fork 22
Promotional Deployment CLI FAQ
A: The Promotional Deployment CLI can be used anytime you want to test an Akamai change through your development pipeline. The CLI enables you to leverage best practices around continuous integration and delivery by automating the process of the promotion of a change between different environments. Leverage the ‘new-pipeline’ functionality to setup/replicate your pipeline and the ‘promote’ capability to automate the promotion process. The command line driven nature of the CLI enables you to integrate this into your existing build automation tool set.
A: As many as you like and set them up as creatively. Every user environment is unique and how users use the pipelines is completely up to them. In the past we’ve seen scenarios around having one pipeline for eternity, having a pipeline within a pipeline, creating a new pipeline every month, having 6 pipeline all independent of each other, etc
Q: I promoted a change from Env1 to Env2, and realized something is wrong. How do I go through my pipeline in this scenario?¶ ↑
A: The PD CLI allows you promote from a lower environment to the next one as many times as you want. If you did an Env1->Env2 and realized something is wrong and you need to retest another change, simply make it in Env1 again and do another Env1->Env2 promotion
Q: Can you talk more about how I parametrize attributes in my environment so I can add more environment specific variables that are applicable to my pipeline? ¶ ↑
A: Lets use an example to demonstrate this. Assume you have 2 attributes that are different across your environments- hostnames (which are env specific by default) and Caching Option (which you want to parametrize). In order to use Caching Option as a variable across your different environments, you will need to do the following:
Parametrize Caching Option in your templates snippet file (in this case main.json) Before:
{ “name”: “caching” “options”: { "behavior": "NO_STORE" } },
After:
{ "name": "caching" "options": { "behavior": "${env.cachestore}" } },
Add it as an attribute inside your environments/VariableDefinitions.json file and set it to null
"definitions": { "cpCode": { "type": "cpCode", "default": 585931 }, "originHostname": { "type": "hostname", "default": null }, "cachestore": { "type": "cachestore", "default": "null" } }
Add it to your individual environment specific Variables.json files and set the individual values there In this case, for the dev environment:
{ "cpCode": null, "originHostname": "www.example.com", "cachestore" "Cache" }
In this case, for the qa environment:
{ "cpCode": null, "originHostname": "www.example.com", "cachestore" "NO_STORE" }