You are viewing version 2.26 of the documentation, which is no longer maintained. For up-to-date documentation, see the latest version.

Enable the Evaluate Artifacts Stage

Enable the Evaluate Artifacts Stage plugin to add it to Armory Enterprise. The stage gives pipeline creators the ability to create base64 artifacts from text saved within a pipeline. The contents of the new artifact include the results of any SpEL expressions that are evaluated.

Proprietary

Overview

Some artifact types and their associated stages, such as Kubernetes, support using SpEL to read parameters from the Spinnaker context and inject them into an artifacts manifest at deploy time. Other stages, such as the Terraform Integration stage, do not support this out of the box. The Evaluate Artifacts Stage plugin adds supports for evaluating SpEL against any artifact within your Spinnaker pipeline.

For information about how to use the stage, see Use the Evaluate Artifacts Stage.

Before you begin

  • If you are new to enabling plugins, read the Plugin Users Guide to familiarize yourself with how plugins to Armory Enterprise work.
  • The Evaluate Artifacts Stage requires Armory 2.24.x or later (OSS Spinnaker 1.24.x or later)

Setup

Add the following snippet to your Spinnaker manifest, such as spinnakerservice.yml:

 spec:
   spinnakerConfig:
     profiles:
       spinnaker:  
         spinnaker:  # This second `spinnaker` is required
           extensibility:
             plugins:
               Armory.EvaluateArtifactsPlugin:
                 enabled: true
                 version: <PLUGIN_VERSION> # Replace with the version you want to use. For example, use 0.1.0.
             repositories:
               evaluateArtifacts:
                 url: https://raw.githubusercontent.com/armory-plugins/evaluate-artifacts-releases/master/repositories.json
       gate:
         spinnaker:
           extensibility:
             deck-proxy:
               enabled: true
               plugins:
                 Armory.EvaluateArtifactsPlugin:
                   enabled: true
                   version: <PLUGIN_VERSION> # Replace with the version you want to use. For example, use 0.1.0.

Keep the following in mind when using this configuration snippet:

  • Make sure to include the nested spinnaker parameter. Both are required because of how Armory Enterprise consumes plugin configurations.
  • Replace <PLUGIN_VERSION> on lines 10 and 22 with the version of the plugin that you want to use. Plugin versions can be found here.

Then, deploy your updated Armory Enterprise configuration using one of the following methods:

  • If you are using a single manifest file: kubectl -n <namespace> apply -f <path-to-manifest-file>

  • If you are using Kustomize patches like the ones in the Armory kustomize repo, you need to apply the kustomization. Depending on how you have Kustomize installed (either directly or as part of kubectl), use one of the following commands:

    Kustomize is installed separately from kubectl:

    # The namespace is declared in kustomization.yml
    # Run this from the same directory as your kustomization.yml file
    kustomize build | kubectl  apply -f -
    

    Kustomize is bundled with kubectl:

    kubctl -n <namespace> apply -k <path-to-kustomize-directory>
    

The following method adds the plugin repository as part of the service profile for Orca, the orchestrator service. The benefit of this method is that it minimizes the downtime for your Armory instance. It is possible to add and manage plugin repositories in a separate file. For more information, see Add a plugin repository using Halyard.

Perform the following steps to enable the plugin for the Evaluate Artifact stage:

  1. Add the plugin to your ~/.hal/default/profiles/orca-local.yml file:

    spinnaker:
      extensibility:
        plugins:
          Armory.EvaluateArtifactsPlugin:
            enabled: true
            version: <PLUGIN_VERSION> # Replace with the version you want to use. For example, use 0.1.0.
        repositories:
          evaluateArtifacts:
            url: https://raw.githubusercontent.com/armory-plugins/evaluate-artifacts-releases/master/repositories.json
    

    Make sure to replace PLUGIN_VERSION with the version of the plugin you want to use. Plugin versions can be found here.

  2. Enable the UI for the stage in your ~/.hal/default/profiles/gate-local.yml file:

    spinnaker:
      extensibility:
       deck-proxy:
         enabled: true
         plugins:
           Armory.EvaluateArtifactsPlugin:
             enabled: true
             version: <PLUGIN_VERSION> # Replace with the version you want to use. For example, use 0.1.0.
       repositories:
         evaluateArtifacts:
           url: https://raw.githubusercontent.com/armory-plugins/evaluate-artifacts-releases/master/repositories.json
    

    Make sure to replace PLUGIN_VERSION with the version of the plugin you want to use. Plugin versions can be found here.

  3. Run hal deploy apply to apply the changes to your Armory Enterprise instance.

Versions

  • 0.1.0 - Improved the user experience. Execution errors for the stage now display in the UI.
  • 0.0.10 - Initial Release

What’s next


Last modified July 21, 2021: (e6d73e8)