Set Up Your JFrog Services in No Time!

JFrog Mission Control Configuration Scripts

JFrog Mission Control provides an easy way for JFrog administrators to set up, manage and monitor their Artifactory & Xray services using Configuration Scripts. Additional support, including Jenkins, will be available soon.

Configuration scripts are written in Groovy and can be applied to one or more service at a time to perform a variety of actions. You can also integrate your scripts in your VCS repositories, such as Git and Bitbucket, enabling you to automatically synchronize any modifications you make on your VCS repository directly to Mission Control.

Let’s get started

As a Mission Control administrator, you can create a new script by clicking on the scripts library that can be found under Admin | Scripts.

artifactory(<Instance-Name>){
  localRepository("docker-local") {
    packageType "docker"
    description "My local Docker registry"
  }
}

Tip: Use “Ctrl-Space” or “Shift-Space” for script templates auto-completion.

Running Your Scripts

Use the following 4 steps to execute your scripts:

  1. Select Script – select the script that you want to run
  2. User Input & Script Editing – make any edits needed to the script
  3. Dry Run – complete a dry run of the script to ensure there are no errors
  4. Execute Script – execute the script

1. Select Script

Open the Execute Script page, from the top ribbon in the Mission Control UI, and select the script you want to run.

2. User Input & Script Editing

You can edit your script and define runtime variables as part of your script before executing it. The following example shows how you can add an Artifactory_instance environment variable.

//Varaiable for Artifacotory
 
Artifactory_instance = userInput (
    type : "ARTIFACTORY",
    description : "Artifactory instance name",
)
 
artifactory(Artifactory_instance.name){
   localRepository("docker-local") {
     packageType "docker"
     description "My local Docker registry"
   }
}

Edit Script

After saving your script changes, add the user inputs.

User Inputs

3. Dry Run

The dry run does not execute the script, but let’s you know what changes will be implemented on the selected services and repositories when you do. Click the the summary line to see the changes.

Dry Run

Accept the changes and continue to run your script.

4. Execute Script

Once your script run has completed, the duration and changes are displayed.

Execute

See your newly created Docker repository that was created in Artifactory, under the Admin > Repositories > Local.

Local Repositories

Ready To Use Scripts

You can create useful scripts to improve your daily work and configuration. Visit the JFrog Public script repository on GitHub for examples, for examples such such as replication script and mesh topology script.

Additional information is available in our JFrog Mission Control documentation.

What’s next?

Our upcoming releases will include additional script user permissions, to enable non-admin users write and run their own scripts. Reach out to us with any feedback for any additional support you would like to see.

Haven’t started using Mission Control yet? this is a good time to start. Download Mission Control.