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

Version of Dependent Package in APACK #1

Closed
mbtools opened this issue Feb 11, 2020 · 5 comments
Closed

Version of Dependent Package in APACK #1

mbtools opened this issue Feb 11, 2020 · 5 comments

Comments

@mbtools
Copy link

mbtools commented Feb 11, 2020

Hi Alexander,

I think your abap-shield implementation is very cool (geeky even). In general, it's working well but I have several private repositories and don't think there's a way to make shields work with that, or is there?

So instead, I created a public repo with an APACK that contains just the version info of all my private repos. My feature request is therefore to enhance this solution to retrieve the version of a dependent package from the APACK manifest.

Here's my APACK:
https://github.com/mbtools/mbt-versions/blob/master/.apack-manifest.xml

I could imagine using the following syntax:

https://shield.abap.space/version-shield-json/$TYPE/$OWNER/$REPO/.apack-manifest.xml/$ARTIFACT_ID

I put examples of this into my readme (obviously not working):
https://github.com/mbtools/mbt-versions/blob/master/README.md

Best wishes,
Marc

@sbcgua
Copy link
Owner

sbcgua commented Feb 12, 2020

Hi Marc, Greetings to Toronto (if I understood well) :)

Yeah, private repos are not that clear conceptually. Why display the badge if no-one sees it? And if display, how to store access credentials? Certainly not in badge URL. Then it means some kind of storage at server side which would complicate the solution a lot to make it secure. Potentially I can imagine a private instance of shield generator that would add a predefined http header with auth info. Should be relatively easy to implement: auth key can be defined in an env var and copied to AWS during deployment. Could be interesting feature, but please open a separate issue for this. PR's also welcome :)

Sub packages from apack. Interesting idea. But I would like to ensure a more universal approach to align with potential future features. Maybe adding a type of query right after APACK filename. E.g. .../.apack-manifest.xml/dependencies/$GROUP_ID/$ARTIFACT_ID.

So that

  • if the file path is .apack-manifest.xml and no params => use apack version
  • if the next param is dependencies => expect more params with group and id (both are requested because id maybe not unique by design) and search for $GROUP_ID/$ARTIFACT_ID in deps

I can have a look on it during the weekend. Also PR's are welcome if you prefer coding this yourself - let me know.

@mbtools
Copy link
Author

mbtools commented Feb 14, 2020 via email

@sbcgua
Copy link
Owner

sbcgua commented Feb 22, 2020

beta is done. Please try, but currently prepend dev. at the beginning. This code is not in the main function yet.

https://dev.shield.abap.space/version-shield-json/github/mbtools/mbt-versions/.apack-manifest.xml/dependencies/github.com/mbtools/mbt-bc-cts-req

@sbcgua sbcgua mentioned this issue Feb 22, 2020
@mbtools
Copy link
Author

mbtools commented Feb 25, 2020

Hi Alexander,

I tested it. First page load had two of the images broken. The one you tested with, worked fine. However, after a refresh, all shield badges are working great!

https://github.com/mbtools/mbt-versions

👍
Marc

sbcgua added a commit that referenced this issue Mar 1, 2020
Apack deep, to #1 
parsing of apack dependencies
@sbcgua
Copy link
Owner

sbcgua commented Mar 1, 2020

OK, so it is productive. You can switch to shield.abap.space without dev prefix :) I will deactive dev soon.

P.S. Ctrl+F5 - yeah, browsers cache stuff, so quite typically need full refresh for the shields

@mbtools mbtools closed this as completed Mar 1, 2020
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