Skip to content
This repository was archived by the owner on Nov 10, 2019. It is now read-only.

Commit 2d3d661

Browse files
Merge pull request #41 from codefresh-io/gitsubmodules
Gitsubmodules
2 parents b020794 + a849d18 commit 2d3d661

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed

dynamic-catalog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# **Catalog**
2-
Created at ** Wed Dec 26 2018 12:59:29 GMT+0000 (Coordinated Universal Time)**
2+
Created at ** Thu Dec 27 2018 22:37:47 GMT+0000 (Coordinated Universal Time)**
33

44

55
| Plugin Name | Image | Description | source | Tags |
@@ -11,6 +11,7 @@ Created at ** Wed Dec 26 2018 12:59:29 GMT+0000 (Coordinated Universal Time)**
1111
| docker-service | codefresh/docker-service | Codefresh docker-service plugin | https://github.com/codefresh-io/docker-service | **`docker`** **`docker-machine`** **`docker-compose`** |
1212
| ecs-deploy | codefresh/ecs | Release a Helm chart (update or install) | https://github.com/codefresh-io/cf-deploy-ecs.git | **`ecs`** **`deploy`** **`containers`** |
1313
| github-pr | codefresh/github-pr-plugin | Operates on GitHub pull requests | https://github.com/codefresh-io/github-pr-plugin | **`docker`** **`github`** **`pull-request`** |
14+
| gitsubmodules | codefresh/cfstep-gitsubmodules | Update git submodules | https://github.com/codefresh-io/cfstep-gitsubmodules | **`git`** **`submodules`** |
1415
| gke | codefresh/plugin-gke | Codefresh gke plugin | https://github.com/codefresh-io/plugin-gke | **`kubernetes`** **`gke`** **`gcloud`** |
1516
| helm | codefresh/cfstep-helm | Release a Helm chart (update or install) | https://github.com/codefresh-contrib/cfplugin-step | **`helm`** **`kubernetes`** |
1617
| helm-legacy | codefresh/plugin-helm | Release a Helm chart (update or install). There is a new Helm plugin with added capabilities, we are keeping this plugin as is for backward-compatibility. The new plugin is at /incubator/helm (https://github.com/codefresh-io/plugins/tree/master/incubator/helm) | https://github.com/codefresh-io/cf-plugin-helm | **`helm`** **`kubernetes`** |

plugins/gitsubmodules/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Update git submodules
2+
Plugin to update git submodules of an already cloned repo.
3+
4+
Dockerhub repo: https://hub.docker.com/r/codefresh/cfstep-gitsubmodules/tags
5+
6+
## Options
7+
| ENVIRONMENT VARIABLE | DEFAULT | TYPE | REQUIRED | DESCRIPTION |
8+
|--|--|--|--|--|
9+
| GITHUB_TOKEN | null | string | Yes | GitHub Personal Token |
10+
| CF_SUBMODULE_SYNC | null | boolean | No | If set to 'true', the step will perform 'git submodule sync' command |
11+
| CF_SUBMODULE_UPDATE_RECURSIVE | null | boolean | No | If set to 'true', the step will perform 'git submodule update --init' command with '--recursive' option |
12+
13+
## Usage Example:
14+
15+
This example updates submodule of a cloned repo.
16+
17+
The step assumes that the working directory is the cloned repo (which is the default working directory for any free style step)
18+
19+
```yaml
20+
version: '1.0'
21+
steps:
22+
updateSubmodules:
23+
image: codefresh/cfstep-gitsubmodules
24+
environment:
25+
- GITHUB_TOKEN=<github_token>
26+
- CF_SUBMODULE_SYNC=<boolean to determine if modules should be synced>
27+
- CF_SUBMODULE_UPDATE_RECURSIVE=<boolean to determine if modules should be recursively updated>
28+
```

plugins/gitsubmodules/plugin.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
image: codefresh/cfstep-gitsubmodules
2+
tag: latest
3+
version: 0.1.0
4+
description: Update git submodules
5+
keywords:
6+
- git
7+
- submodules
8+
home: https://github.com/codefresh-io/cfstep-gitsubmodules
9+
sources:
10+
- https://github.com/codefresh-io/cfstep-gitsubmodules
11+
maintainers:
12+
- name: Francisco Cocozza
13+
email: francisco@codefresh.io
14+
icon: https://git-scm.com/images/logos/downloads/Git-Icon-1788C.png
15+
envs:
16+
- name: GITHUB_TOKEN
17+
type: required
18+
description: GitHub Token required to access the repository
19+
- name: CF_SUBMODULE_SYNC
20+
type: optional
21+
description: if var is set to 'true', the step will perform 'git submodule sync' command
22+
- name: CF_SUBMODULE_UPDATE_RECURSIVE
23+
type: optional
24+
description: if set to 'true', the step will perform 'git submodule update --init' command with '--recursive' option

0 commit comments

Comments
 (0)