GitLab is a web-based DevOps lifecycle tool that provides a Git-repository manager including wiki, issue-tracking and continuous integration and deployment pipeline features.
- Open your GitLab project and make sure you have a yaml file named .gitlab-ci.yml
As an example update it to contain the following steps:
akeyless: image: name: akeyless/ci_base before_script: - export DEMO_SECRET=akeyless://demo-secret - export MY_SECRET=akeyless://mySecret - akeyless auth --access-id p-xxxxxxxxxxxx --access-type jwt --jwt $CI_JOB_JWT - source ~/.akeyless/akeyless_env.sh script: - echo "Secret=[$DEMO_SECRET]" - echo "Fetching Secrets is Easy [$MY_SECRET]"
- Make sure to replace the path to the relevant secrets as well as the access-id value with your matching OIDC access-id (as appears in Akeyless console)
The image is akeyless/ci_ base which is a public docker image based on ruby:2.4 that contains Akeyless CLI as well as other essential components
- After editing the file should look like this:
- After running the job the result should look like this:
- Success! - the secrets are accessible to use within the job logic (in this example they are just being printed).
Updated 2 months ago