Skip to content

Instantly share code, notes, and snippets.

View bdpiprava's full-sized avatar
💭
Working

Bhupendrakumar Piprava bdpiprava

💭
Working
  • 3DPLM | Thought Works | Spark Networks
  • Berlin
View GitHub Profile
# GoCD Plugin Store
Installing plugin on GoCD Server has never been as easy task.
With GoCD Plugins store, installing and upgrading and deleting plugins and addons will be a one click operation.
## Current issues with plugin installation on GoCD Server:
* Manually need to copy plugin jar (Requires access to the machine :/)
* Needs a server restart
- in the cloud word, discovery and restart of server process running in cloud is very difficult. (on `docker swarm`, `DC/OS`, `Kubernetes` platforms)
* No automatic way to check Plugin compatibility with server
- PluggableSCMMaterialConfig.java#validateNotSubdirectoryOf and ScmMaterialConfig.java#validateNotSubdirectoryOf needs to be changed in case of symlink.
- Write a test to validate symlink is not picked up during Task working directory validation.
<elastic>
<profiles>
<profile id="dind-workflow" pluginId="cd.go.contrib.elasticagent.kubernetes">
<property>
<key>Image</key>
<value>gocd/gocd-agent-docker-dind:v18.2.0</value>
</property>
<property>
<key>MaxMemory</key>
</property>
##!/bin/bash
namespace="${1:-gocd}"
echo ""
echo ""
ingress_name=$(kubectl get ingress --namespace $namespace -o jsonpath='{.items[0].metadata.name}')
echo "GoCD server public IP: $(kubectl --namespace $namespace get ingress $ingress_name -o jsonpath='{.status.loadBalancer.ingress[0].ip}')"
echo ""
echo ""
## Get plugin settings
- Plugin is not loaded
- Should return error response with failed dependecy status code(424)
- If the plugin is loaded then following checks we have to perform before returning response -
* If the plugin does not support plugin-settings then return an error message (have to decide what it will be :) )
* When plugin supports plugin setting check if plugin-setting exist for the plugin
a. If plugin setting does not exist then return 404.
b. When plugin settings exist in DB then
- Check if user is a admin
- encrypt the secure variables in plugin-settings using plugin info and return the response
-> [
- /cctray.xml - createSession(5 min)
- /api/** - createSession(5 min)
- /** - createSession(perpetual)
]
-> authFilter
[
- /remoting/** - x509AuthFilter
- /cctray.xml - apiAuthFilter
- /api/** - apiAuthFilter
<pipelines group="TeamA">
<authorization>
<view>
<user>view</user>
</view>
<admins>
<user>operate</user>
</admins>
</authorization>
<pipeline name="Foo-PR" template="base">
/*!
* jQuery Autocomplete plugin 1.1
*
* Copyright (c) 2009 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $
@bdpiprava
bdpiprava / linux-ec2.json
Last active July 25, 2018 04:52
linux-ec2 instance
{
"DryRun": false,
"ImageId": "ami-fbc1c684",
"MinCount": 1,
"MaxCount": 1,
"UserData": "#!/bin/bash\n cat <<EOT >> /etc/ecs/ecs.config \n ECS_CLUSTER=GoCD \n EOT",
"InstanceType": "t2.small",
"IamInstanceProfile": {
"Name": "ecsInstanceRole"
}
{
"DryRun": false,
"ImageId": "ami-d781d4a8",
"MinCount": 1,
"MaxCount": 1,
"UserData": "<powershell>\n Import-Module ECSTools \n Initialize-ECSAgent -Cluster 'GoCD' -EnableTaskIAMRole \n </powershell>",
"InstanceType": "m5.large",
"IamInstanceProfile": {
"Name": "ecsInstanceRole"
}