Skip to content

references #1

@Jean-Baptiste-Lasselle

Description

@Jean-Baptiste-Lasselle

refs :

  • java :
    • from the source code, to the maven artifact, and the runtime : https://dzone.com/articles/maven-git-commit-id-plugin
    • from the source code, to the Dockerfile, with labels:
    • From the Dockerfile, to the Kubernetes Cluster : the same JSON, stringified again, set as deployment label in the helm and also for API deployers, to set as API deployment metadata, so as to ... (canary, blue / green ...), with the CRD... API deployement metaData into crd what can we do with that...
    • git commit id maven : what about package informations
  • nodejs/typescript :

ANNEX A

# --- extract files in jar :
jar xvf /path/to/file.jar

unzip /path/to/file.jar

# --- list files in jar :
jar tvf /path/to/file.jar

unzip -l /path/to/file.jar

Ok so I :

  • list files in jar, to check the git.properties is there, throw an error if not,
  • and then extract git.properties file , to inject the full JSON in git.properties, as a label value into the docker image

Now the version informations given at runtime by Gravitee must (first) be based on that git.properties file (if necessary, there will be falback method to get those version informations)

ANNEX B : git user password in git.properties

Ok beware to produce approriate configuration to make sure no secrets exposed

https://damnhandy.com/2016/03/26/the-maven-plugins-that-will-expose-your-git-passwords-and-how-docker-helps-prove-it/

yet issue is foxed in git commit id plugin : git-commit-id/git-commit-id-maven-plugin#241

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions