- Set up and add secrets to Infisical.
- You have a working Jenkins installation with the credentials plugin installed.
- You have the Infisical CLI installed on your Jenkins executor nodes or container images.
Add Infisical Service Token to Jenkins
After setting up your project in Infisical and installing the Infisical CLI to the environment where your Jenkins builds will run, you will need to add the Infisical Service Token to Jenkins. To generate a Infisical service token, follow the guide here. Once you have generated the token, navigate to Manage Jenkins > Manage Credentials in your Jenkins instance.
Each of your projects will have a different
INFISICAL_TOKEN
.
As a result, it may make sense to spread these out into separate credential domains depending on your use case.

infisical-service-token
for the sake of this guide.
The description is optional and can be any text you prefer.


Use Infisical in a Freestyle Project
To fetch secrets with Infisical in a Freestyle Project job, you’ll need to expose the credential you created above as an environment variable to the Infisical CLI. To do so, first click New Item from the dashboard navigation sidebar:


INFISICAL_TOKEN
in the Variable field then click the Specific credentials option from the Credentials section and select the credential you created earlier.
In this case, we saved it as Infisical service token
so we’ll choose that from the dropdown menu.



Running into issues? Join Infisical’s community Slack for quick support.
Use Infisical in a Jenkins Pipeline
To fetch secrets using Infisical in a Pipeline job, you’ll need to expose the Jenkins credential you created above as an environment variable. To do so, click New Item from the dashboard navigation sidebar:

INFISICAL_TOKEN
environment variable, which is configured in the pipeline, into the shell for executing commands.
There may be instances where this doesn’t work as expected in the context of running Docker commands.
However, the list of working examples should provide some insight into how this can be handled properly.