This repository has been archived by the owner on Sep 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Public export of Nexus Repository - Helm Plugin:
- 3a0595cf279ec692b2e9999b2cf70ee029ed8eca by Jeffry Hesse <jeffryxtron@gmail.com> GitOrigin-RevId: 3a0595cf279ec692b2e9999b2cf70ee029ed8eca
- Loading branch information
1 parent
8911909
commit 5517c8e
Showing
38 changed files
with
2,156 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/main/java/org/sonatype/repository/helm/internal/HelmAssetAttributePopulator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Sonatype Nexus (TM) Open Source Version | ||
* Copyright (c) 2018-present Sonatype, Inc. | ||
* All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions. | ||
* | ||
* This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0, | ||
* which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html. | ||
* | ||
* Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks | ||
* of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the | ||
* Eclipse Foundation. All other trademarks are the property of their respective owners. | ||
*/ | ||
package org.sonatype.repository.helm.internal; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.Date; | ||
|
||
import javax.inject.Named; | ||
import javax.inject.Singleton; | ||
|
||
import org.sonatype.goodies.common.ComponentSupport; | ||
import org.sonatype.nexus.common.collect.NestedAttributesMap; | ||
import org.sonatype.repository.helm.internal.metadata.HelmAttributes; | ||
|
||
import static org.sonatype.repository.helm.internal.database.HelmProperties.*; | ||
|
||
/** | ||
* @since 0.0.2 | ||
*/ | ||
@Named | ||
@Singleton | ||
public class HelmAssetAttributePopulator | ||
extends ComponentSupport | ||
{ | ||
public void populate(final NestedAttributesMap attributes, final HelmAttributes helmAttributes) { | ||
attributes.set(NAME, helmAttributes.getName()); | ||
attributes.set(DESCRIPTION, helmAttributes.getDescription()); | ||
attributes.set(VERSION, helmAttributes.getVersion()); | ||
attributes.set(ICON, helmAttributes.getIcon()); | ||
attributes.set(SOURCES, helmAttributes.getSources()); | ||
attributes.set(MAINTAINERS, helmAttributes.getMaintainers()); | ||
attributes.set(APP_VERSION, helmAttributes.getAppVersion()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/org/sonatype/repository/helm/internal/createindex/CreateIndexFacet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Sonatype Nexus (TM) Open Source Version | ||
* Copyright (c) 2018-present Sonatype, Inc. | ||
* All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions. | ||
* | ||
* This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0, | ||
* which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html. | ||
* | ||
* Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks | ||
* of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the | ||
* Eclipse Foundation. All other trademarks are the property of their respective owners. | ||
*/ | ||
package org.sonatype.repository.helm.internal.createindex; | ||
|
||
import org.sonatype.nexus.repository.Facet; | ||
import org.sonatype.nexus.repository.Facet.Exposed; | ||
|
||
/** | ||
* Facet interface for rebuilding Helm index.yaml files | ||
* | ||
* @since 0.0.2 | ||
*/ | ||
@Exposed | ||
public interface CreateIndexFacet | ||
extends Facet | ||
{ | ||
/** | ||
* Mark the helm index yaml as invalidated such that it will be rebuilt after waiting for a configured amount of time | ||
* to prevent unnecessary successive rebuilds of the metadata. | ||
*/ | ||
void invalidateIndex(); | ||
} |
Oops, something went wrong.