-
Notifications
You must be signed in to change notification settings - Fork 6
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
lastModified field related to time artifact pulled from Proxy. #27
Comments
@verticalambition been a while since i have looked at this code base, I'll need to familiarise myself with it again and see how this could be done. If you are feeling brave you could have a look yourself, definitely start in here: Also worth checking source for other plugins that are doing what you are looking for and seeing what it is that is missing. |
Cool. Thanks for the quick reply. I did clone it down and take a quick
look. I may feel brave and give it a go and like you said, maybe compare to
some other plug-ins and see if they do something different.
Thank you.
…On Wed, Apr 3, 2024, 3:38 PM davejab ***@***.***> wrote:
@verticalambition <https://github.com/verticalambition> been a while
since i have looked at this code base, I'll need to familiarise myself with
it again and see how this could be done. If you are feeling brave you could
have a look yourself, definitely start in here:
https://github.com/davejab/nexus-repository-terraform/blob/main/nexus-repository-terraform/src/main/java/org/sonatype/nexus/plugins/terraform/orient/internal/TerraformProxyFacetImpl.java
Also worth checking source for other plugins that are doing what you are
looking for and seeing what it is that is missing.
—
Reply to this email directly, view it on GitHub
<#27 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANNWYAJLVF6NWJVF564OFR3Y3RZD3AVCNFSM6AAAAABFV53Z2CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZVGY2DEOJYGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Have experimented a little with this, I can achieve it by creating a component linked asset with Lines 160 to 175 in f92b9df
This does have some unintended side affects, which I have yet to fix |
Awesome, you go. Kind of a noob question for you but going to ask it anyway. I had cloned the project and tried to mess with it myself. I swear I'm a SW Eng with 7 years of experience but its been about 5 since I've coded a project with Java. I tried opening it with VSCode and Eclipse and I could not for the life of me get the project to not complain and smear my editor with red. Dumb stuff I think related to my compiler settings or whatnot. I'll be honest I only spent about 3 hours on it before work called me to a different task. May have something to do with us using a flavor of Java 17 and was trying to point it to a JDK 8 I downloaded since this project requires it. Do you by chance have any advice on what editor you use or configuration so this project is happy in an editor? I wanted it good so I could access the Sonatype libraries and see parameters. Regardless, thanks for giving it a go. I appreciate the effort. |
I have had the most success using IntelliJ for Java projects |
What are you trying to do?
Trying to copy select artifacts from Nexus, using Terraform Format repo, based on last modified time of the artifact, which could be equivalent to when the artifact was pulled from proxy.
What feature or behavior is this required for?
We have a situation where we have a Nexus repo in an offline environment. We want to be able to pull down artifacts that have been modified (pulled) within the last 48 hours in our primary environment and transfer them through offline process to our other system.
For general repositories in Nexus, when we query through the API:
{nexusUrl}/service/rest/v1/components?repository={repoName}"
we get a response (truncated but for example)
When we query the Terraform formatted repository the same way, we receive a response like
It doesn't appear to log a modified time along with other metrics like downloadUrl, etc. We would like to have a field of
lastModified
that is related to when the image was pulled from the proxy repo.If this seems like a reasonable idea, wondering where in the code we would work on trying to implement this functionality or if anyone has ideas, etc.
Have the lastModified be the time in which the artifact was pulled from the proxy and able to be access through API/curl
Thank you.
cc @DarthHater @bhamail
The text was updated successfully, but these errors were encountered: