add gitlab

This commit is contained in:
Vassiliy Yegorov
2022-08-24 12:36:38 +07:00
parent 9c63fb579b
commit eb2c93c28c
2 changed files with 58 additions and 0 deletions

10
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,10 @@
read_secrets:
image: vault:latest
script:
- echo $CI_COMMIT_REF_NAME
- echo $CI_COMMIT_REF_PROTECTED
- export VAULT_ADDR=http://vault.bildme.ru
- export VAULT_TOKEN="$(vault write -field=token auth/jwt/login role=gitlabci-role jwt=$CI_JOB_JWT)"
- export PASSWORD="$(vault kv get -field=password secret/gitlab/db1)"
- echo $PASSWORD
when: manual