Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface requires Jenkins layer #1

Closed
hloeung opened this issue Feb 26, 2019 · 4 comments
Closed

Interface requires Jenkins layer #1

hloeung opened this issue Feb 26, 2019 · 4 comments

Comments

@hloeung
Copy link

hloeung commented Feb 26, 2019

Hi,

I'm trying to rewrite the jenkins-slave charm using the reactive framework.

When trying to use just the jenkins-slave interface, it fails as it needs charms.layer.jenkins for 'credentials' and 'api', see https://github.com/freeekanayaka/interface-jenkins-slave/blob/master/requires.py#L16.

When trying to use the jenkins layer, it tries to install and configure up Jenkins.

Any chance we could fix this so the interface doesn't rely on the Jenkins layer and can be reused in other charms to talk to a Jenkins master without trying to configure up Jenkins itself?

@hloeung
Copy link
Author

hloeung commented Feb 26, 2019

@hloeung
Copy link
Author

hloeung commented Feb 26, 2019

Maybe I'm misunderstanding how layers and interfaces works. Perhaps that's the bit that supposed to be implemented in provides.py?

@freeekanayaka
Copy link
Collaborator

@hloeung yes, I think there's some misunderstanding, you shouldn't be using layer:jenkins in the slave, but rather just interface:jenkins-slave, implementing the requires.py part. It's been a very long time since I did anything with reactive and charms, so please take that with a grain of salt and check the reactive documentation.

@hloeung
Copy link
Author

hloeung commented Feb 27, 2019

@freeekanayaka gotcha. I don't have much experience with implementing interfaces so for now am just using @hooks()

Thanks.

@hloeung hloeung closed this as completed Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants