Comments (6)
This is certainly possible. And pretty simple to do. For optionality's sake we might also consider different modes of auth within GitClient.
This article provides some examples (hints) on how to go about it:
And this article is helpful as it explains the options and idiosyncrasies of git auth (as relates to GitHub and GitLab):
I'm open to PRs if you want to give this a try. It may be a while before I have cycles to implement myself.
from cf-butler.
Have a look at this feature branch. Let me know if it satisfies your needs. Note the updates in the configuration. You no longer specify CF_POLICIES_PROVIDER
. All git-backed policies have configuration managed by property prefixed names like: cf.policies.git
, CF_POLICIES_GIT
.
from cf-butler.
Completed as of 7eac0ac
from cf-butler.
I had started implementing it to see if I could get the code written, but you beat me to it :)
I'll test it out with my team now and update you on our findings.
Thanks for your quick reply and efforts on implementing this feature! @pacphi
from cf-butler.
Hi @pacphi ,
I tested out the changes and it seems to fail with the following error when I try to deploy to PAS:
Could not resolve placeholder 'vcap.services.cf-butler-secrets.credentials.CF_POLICIES_GIT_URI' in value "${vcap.services.cf-butler-secrets.credentials.CF_POLICIES_GIT_URI}"
I checked the application-yml
file and I didn't see anything wrong with the references in your commit PR. I double-checked my secrets.json and validated that the syntax is correct using jq
. Here's my example secrets.json:
{
"TOKEN_PROVIDER": "userpass",
"CF_API-HOST": "api.sys.domain",
"CF_USERNAME": "cfusername",
"CF_PASSWORD": "cfpassword",
"CF_ORGANIZATION-BLACK-LIST": [
"system"
],
"CF_ACCOUNT-REGEX": "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$",
"CRON_COLLECTION": "* */4 * * * *",
"CRON_EXECUTION": "* */5 * * * *",
"CF_POLICIES_GIT_URI": "https://mygituri.com/repo/repo-policies.git",
"CF_POLICIES_GIT_USERNAME": "myusername",
"CF_POLICIES_GIT_PASSWORD": "mypassword",
"CF_POLICIES_GIT_FILE-PATHS": [
"policy1-AP.json"
],
"EXPOSED_ACTUATOR_ENDPOINTS": "beans,env,info,health,metrics,scheduledtasks,loggers,mappings,prometheus"
}
Am I missing something?
from cf-butler.
The above issue is fixed as of 2c7b58f. But we have another issue, that I'm tracking with #185.
from cf-butler.
Related Issues (20)
- **BUG** For large foundations running into problem on execution of AppDetailTask HOT 5
- Can't push app on newer buildpack HOT 5
- Deploying to PCF with RDS mysql HOT 2
- Cannot read CF_TOKEN_PROVIDER property at startup HOT 1
- Update documentation to reflect Tanzu rebranding HOT 1
- Gradlew Build Fails on bootBuildImage step HOT 2
- Add cf-for-k8s support HOT 4
- Service instance count for snapshot/summary gives different result when running at different times. HOT 2
- R2DBC Typo/Error in ButlerCfEnvProcessor Config and Unable to Connect w/ PCF MYSQL DB HOT 1
- Expand use beyond organization level HOT 5
- Cannot access Opsmanager with user/pwd when external identity provider via SAML or LDAP integration HOT 6
- Endpoint /products/stemcell/associations isn't working HOT 9
- ResourceNotificationPolicy implementation needs a rethink
- Is StopApplicationPolicy functioning correctly? HOT 3
- Ops manager endpoints running into cert issues HOT 4
- In the Snapshot Detail AI report , the buildpack version doesn't reflect the real buildpack version used by the application HOT 24
- r2db error HOT 1
- Use of mutation testing in cf-butler - Help needed
- Migrate to exclusive use of V3 API HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cf-butler.