forked from spinnaker/halyard
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(localfiles): Support relative local files to hal config home (#13)
* fix(config): parse 'oauthScopes' stanzas that were incorrectly written (spinnaker#1376) * refactor(config): remove a pointless try/catch block * refactor(tests): remove an unused import * fix(config): parse 'oauthScopes' stanzas that were incorrectly written The old version of Lombok used in Halyard <=1.21 didn't copy @JsonProperty annotations to the generated methods. This means Jackson was seeing the field as 'oAuthScopes' and the getter/setter as a separate 'oauthScopes' property. The same data would be written to both properties, and during parsing whichever came last in the file would be persisted into the object. With new versions of Lombok (>=1.18.8), the @JsonProperty annotation is copied to the bean methods, so the 'oauthScopes' property disappears and Jackson can no longer parse those old files. This commit adds some methods to support parsing the files generated by previous versions of Halyard, but will no longer write out the incorrect duplicate data. * chore(copyright): add a missing copyright header * chore(dependencies): Autobump korkVersion (spinnaker#1375) * fix(core): Fix reading of external files as binary instead of text (spinnaker#1380) * feat(secret): decrypt secrets before sending to deck (spinnaker#1379) * feat(secret): decrypt secrets before sending to deck * code review changes * chore(dependencies): Autobump korkVersion (spinnaker#1383) * fix(build): remove old usage of korkVersion (spinnaker#1385) * chore(dependencies): Autobump korkVersion (spinnaker#1384) * chore(build): Update cloudbuild.yaml file (spinnaker#1388) Remove the $REPO_NAME variable from the cloudbuild.yaml file; this is being used to decide the name of the image to push which will not always correspond to the image name. In particular, if we start publishing both alpine and ubuntu images we'll want the image name to have a suffix reflecting that. * chore(dependencies): Autobump korkVersion (spinnaker#1389) * chore(dependencies): Autobump korkVersion (spinnaker#1390) * feat(plugins): adding halyard commands for plugins (spinnaker#1386) * feat(plugins): adding halyard commands for plugins * chore(refactor): use toMap instead of a concurrentMap collector * feat(notifications): Add Github Status support (spinnaker#1374) * chore(dependencies): Autobump korkVersion (spinnaker#1392) * feat(plugins): enable/disable downloading plugins (spinnaker#1393) * chore(dependencies): Autobump korkVersion (spinnaker#1394) * chore(dependencies): Autobump korkVersion (spinnaker#1395) * feat(kubernetes): Support for tolerations (spinnaker#1396) * fix(kubernetes): Added support for tolerationn Signed-off-by: rverma-nikiai <[email protected]> * feat(kubernetes): Added support for Tolerations Added support for tolerations Signed-off-by: rverma-nikiai <[email protected]> * feat(kubernetes): Support for tolerations * fix(kubernetes): Added support for Tolerations, fixed access * chore(dependencies): Autobump korkVersion (spinnaker#1397) * feat(artifacts): add feature flag to turn on artifactsRewrite (spinnaker#1398) * feat(deployments): Update component sizing command to allow container component sizing. (spinnaker#1387) * feat(deploy/kubernetes): Option to select the image variant to deploy (spinnaker#1401) * refactor(deploy/kubernetes): Removed duplicated code * feat(deploy/kubernetes): Option to select the image variant to deploy Supports `slim` and `ubuntu`, the former being the default. Ubuntu image supported starting with v1.16.0. * chore(dependencies): Autobump korkVersion (spinnaker#1403) * fix(docs): s/Kubenretes/Kubernetes (spinnaker#1402) * fix(ldap): Fix allowing back blank ldap search base when using search filter (spinnaker#1391) * chore(dependencies): Autobump korkVersion (spinnaker#1404) * chore(plugins): rename plugin downloading commands to kebab-case (spinnaker#1408) * chore(dependencies): Autobump korkVersion (spinnaker#1410) * refactor(deploy): Adapt to changes in kork-config (spinnaker#1407) * fix(notifications): fix editing notifications in halyard (spinnaker#1413) Broken in spinnaker#1374 Closes spinnaker/spinnaker#4834 * chore(dependencies): Autobump korkVersion (spinnaker#1415) * feat(localfiles): Support relative local files to hal config home Usually when referencing local files in main hal config with a relative path, halyard throws this error: Problems in Global: ! ERROR Failed to backup user file: default/files/kubeconfig-main - Failed to generate config. With this change, relative files will be automatically resolved relative from hal config home. * feat(localfiles): Only prefix files in subdirectories of input prefix * feat(halyard/localfiles): Use getter for hal config directory * feat(halyard/localfiles): Error on relative files escaping hal home * feat(front50): Support AWS S3 SSE (spinnaker#1399) * feat(operator): Save referenced files to hal config root * feat(operator): Exception if relative file paths resolve outside root
- Loading branch information
1 parent
f708965
commit ac0da7e
Showing
102 changed files
with
2,894 additions
and
329 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#Tue Jul 16 18:16:36 UTC 2019 | ||
#Thu Sep 05 14:11:55 UTC 2019 | ||
enablePublishing=false | ||
korkVersion=5.8.7 | ||
korkVersion=6.6.0 | ||
org.gradle.parallel=true |
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
48 changes: 48 additions & 0 deletions
48
halyard-cli/src/main/java/com/netflix/spinnaker/halyard/cli/command/v1/PluginCommand.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,48 @@ | ||
/* | ||
* Copyright 2019 Armory, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License") | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.spinnaker.halyard.cli.command.v1; | ||
|
||
import com.beust.jcommander.Parameters; | ||
import com.netflix.spinnaker.halyard.cli.command.v1.config.AbstractConfigCommand; | ||
import com.netflix.spinnaker.halyard.cli.command.v1.plugins.*; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
|
||
@Parameters(separators = "=") | ||
public class PluginCommand extends AbstractConfigCommand { | ||
@Getter(AccessLevel.PUBLIC) | ||
private String commandName = "plugins"; | ||
|
||
@Getter(AccessLevel.PUBLIC) | ||
private String shortDescription = "Show Spinnaker's configured plugins."; | ||
|
||
public PluginCommand() { | ||
registerSubcommand(new AddPluginCommand()); | ||
registerSubcommand(new EditPluginCommand()); | ||
registerSubcommand(new DeletePluginCommand()); | ||
registerSubcommand(new ListPluginsCommand()); | ||
registerSubcommand(new PluginEnableDisableCommandBuilder().setEnable(true).build()); | ||
registerSubcommand(new PluginEnableDisableCommandBuilder().setEnable(false).build()); | ||
registerSubcommand(new PluginDownloadingEnableDisableCommandBuilder().setEnable(true).build()); | ||
registerSubcommand(new PluginDownloadingEnableDisableCommandBuilder().setEnable(false).build()); | ||
} | ||
|
||
@Override | ||
protected void executeThis() { | ||
showHelp(); | ||
} | ||
} |
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
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
41 changes: 41 additions & 0 deletions
41
...spinnaker/halyard/cli/command/v1/config/notifications/github/EditGithubStatusCommand.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,41 @@ | ||
/* | ||
* Copyright 2019 Netflix, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License") | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.spinnaker.halyard.cli.command.v1.config.notifications.github; | ||
|
||
import com.beust.jcommander.Parameter; | ||
import com.beust.jcommander.Parameters; | ||
import com.netflix.spinnaker.halyard.cli.command.v1.config.notifications.AbstractEditNotificationCommand; | ||
import com.netflix.spinnaker.halyard.config.model.v1.node.Notification; | ||
import com.netflix.spinnaker.halyard.config.model.v1.notifications.GithubStatusNotification; | ||
|
||
/** Interact with the github notification */ | ||
@Parameters(separators = "=") | ||
public class EditGithubStatusCommand | ||
extends AbstractEditNotificationCommand<GithubStatusNotification> { | ||
protected String getNotificationName() { | ||
return "github-status"; | ||
} | ||
|
||
@Parameter(names = "--token", password = true, description = "Your github account token.") | ||
private String token; | ||
|
||
@Override | ||
protected Notification editNotification(GithubStatusNotification notification) { | ||
notification.setToken(isSet(token) ? token : notification.getToken()); | ||
return notification; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...lix/spinnaker/halyard/cli/command/v1/config/notifications/github/GithubStatusCommand.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,33 @@ | ||
/* | ||
* Copyright 2019 Netflix, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License") | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.spinnaker.halyard.cli.command.v1.config.notifications.github; | ||
|
||
import com.beust.jcommander.Parameters; | ||
import com.netflix.spinnaker.halyard.cli.command.v1.config.notifications.AbstractNamedNotificationCommand; | ||
|
||
/** Interact with the github notification */ | ||
@Parameters(separators = "=") | ||
public class GithubStatusCommand extends AbstractNamedNotificationCommand { | ||
protected String getNotificationName() { | ||
return "github-status"; | ||
} | ||
|
||
public GithubStatusCommand() { | ||
super(); | ||
registerSubcommand(new EditGithubStatusCommand()); | ||
} | ||
} |
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
Oops, something went wrong.