forked from argoproj/argo-cd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add git submodule support (argoproj#2495)
- Loading branch information
1 parent
500730e
commit bbfb96c
Showing
9 changed files
with
154 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -344,6 +344,10 @@ argocd repo add [email protected]:argoproj/argocd-example-apps.git --ssh-private-ke | |
!!! warning "This does not work for Kustomize remote bases or custom plugins" | ||
For Kustomize support, see [#827](https://github.com/argoproj/argo-cd/issues/827). | ||
|
||
## Git Submodules | ||
|
||
Submodules are supported and will be picked up automatically. If the submodule repository requires authentication then the credentials will need to match the credentials of the parent repository. Set ARGOCD_GIT_MODULES_ENABLED=false to disable submodule support | ||
|
||
## Declarative Configuration | ||
|
||
See [declarative setup](../../operator-manual/declarative-setup#Repositories) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package e2e | ||
|
||
import ( | ||
"testing" | ||
|
||
v1 "k8s.io/api/core/v1" | ||
|
||
"github.com/argoproj/argo-cd/test/e2e/fixture" | ||
|
||
. "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1" | ||
. "github.com/argoproj/argo-cd/test/e2e/fixture/app" | ||
) | ||
|
||
func TestGitSubmoduleSSHSupport(t *testing.T) { | ||
Given(t). | ||
RepoURLType(fixture.RepoURLTypeSSHSubmoduleParent). | ||
Path("submodule"). | ||
Recurse(). | ||
CustomSSHKnownHostsAdded(). | ||
SubmoduleSSHRepoURLAdded(true). | ||
When(). | ||
CreateFromFile(func(app *Application) {}). | ||
Sync(). | ||
Then(). | ||
Expect(SyncStatusIs(SyncStatusCodeSynced)). | ||
Expect(Pod(func(p v1.Pod) bool { return p.Name == "pod-in-submodule" })) | ||
} | ||
|
||
func TestGitSubmoduleHTTPSSupport(t *testing.T) { | ||
Given(t). | ||
RepoURLType(fixture.RepoURLTypeHTTPSSubmoduleParent). | ||
Path("submodule"). | ||
Recurse(). | ||
CustomCACertAdded(). | ||
SubmoduleHTTPSRepoURLAdded(true). | ||
When(). | ||
CreateFromFile(func(app *Application) {}). | ||
Sync(). | ||
Then(). | ||
Expect(SyncStatusIs(SyncStatusCodeSynced)). | ||
Expect(Pod(func(p v1.Pod) bool { return p.Name == "pod-in-submodule" })) | ||
} |
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,12 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: pod-in-submodule | ||
spec: | ||
containers: | ||
- name: main | ||
image: alpine:3.10.2 | ||
imagePullPolicy: IfNotPresent | ||
command: | ||
- "true" | ||
restartPolicy: Never |
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