Create a sceret for access token in Secret Manager
We will now create an admin access token and use that token to store as secret in Secret Manager in GCP, which will be used by Cloud Build.
-
In your JFrog Platform instance go to Administration ► Identity and Access ► Access Tokens.
-
Click on Generate Token, enter the User name and click on Generate. Copy and save the generated token somewhere.
- Now go to your GCP console and search for Secret Manager. IF it snot enabled then enable it. Click on Create Secret , enter the name as jfrog-access-token , enter the secret value saved in above atep and click on Generate.
- Now going back on Secret manager main page, click on the Actions of the secret just create above and select Copy Resource Id and save it soemwhere as this will be used later in CloudBuild.yaml.
- We also need to give Cloud Build access to this secret, for that navigate to IAM in GCP and add the Secret Manager Secret Accessor role in the Cloud Build Service Account.