Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ApplicationSet in e2e test #1121

Merged
merged 12 commits into from
Aug 15, 2024
Merged

Conversation

int128
Copy link
Owner

@int128 int128 commented Aug 14, 2024

Inspired from #1079

Copy link
Contributor

github-actions bot commented Aug 14, 2024

diff

  • e2e_test/applications/argoproj.io_v1alpha1_application_app1.yaml (Deleted)
  • e2e_test/applications/argoproj.io_v1alpha1_application_app2.yaml (Deleted)
  • e2e_test/applications/argoproj.io_v1alpha1_application_app3.yaml (Deleted)
  • e2e_test/applications/argoproj.io_v1alpha1_applicationset_e2e-test-set.yaml (New)
  • e2e_test/applications/argoproj.io_v1alpha1_appproject_e2e-test-project.yaml (New)

e2e_test/applications/argoproj.io_v1alpha1_application_app1.yaml

--- a/tmp/kustomize-action-XXXXXXi9IEgh/e2e_test/applications/argoproj.io_v1alpha1_application_app1.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-apiVersion: argoproj.io/v1alpha1
-kind: Application
-metadata:
-  finalizers:
-  - resources-finalizer.argocd.argoproj.io
-  labels:
-    int128.github.io/e2e-test: fixture
-  name: app1
-  namespace: argocd
-spec:
-  destination:
-    namespace: app1
-    server: https://kubernetes.default.svc
-  project: default
-  source:
-    path: app1
-    repoURL: https://github.com/int128/argocd-commenter-e2e-test
-    targetRevision: FIXTURE_BASE_BRANCH
-  syncPolicy:
-    automated:
-      prune: true

e2e_test/applications/argoproj.io_v1alpha1_application_app2.yaml

--- a/tmp/kustomize-action-XXXXXXi9IEgh/e2e_test/applications/argoproj.io_v1alpha1_application_app2.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-apiVersion: argoproj.io/v1alpha1
-kind: Application
-metadata:
-  finalizers:
-  - resources-finalizer.argocd.argoproj.io
-  labels:
-    int128.github.io/e2e-test: fixture
-  name: app2
-  namespace: argocd
-spec:
-  destination:
-    namespace: test2-fixture
-    server: https://kubernetes.default.svc
-  project: default
-  source:
-    path: app2
-    repoURL: https://github.com/int128/argocd-commenter-e2e-test
-    targetRevision: FIXTURE_BASE_BRANCH
-  syncPolicy:
-    automated:
-      prune: true
-    retry:
-      limit: 1

e2e_test/applications/argoproj.io_v1alpha1_application_app3.yaml

--- a/tmp/kustomize-action-XXXXXXi9IEgh/e2e_test/applications/argoproj.io_v1alpha1_application_app3.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-apiVersion: argoproj.io/v1alpha1
-kind: Application
-metadata:
-  finalizers:
-  - resources-finalizer.argocd.argoproj.io
-  labels:
-    int128.github.io/e2e-test: fixture
-  name: app3
-  namespace: argocd
-spec:
-  destination:
-    namespace: test3-fixture
-    server: https://kubernetes.default.svc
-  project: default
-  sources:
-  - path: app3
-    repoURL: https://github.com/int128/argocd-commenter-e2e-test
-    targetRevision: FIXTURE_BASE_BRANCH
-  syncPolicy:
-    automated:
-      prune: true
-    retry:
-      limit: 1

e2e_test/applications/argoproj.io_v1alpha1_applicationset_e2e-test-set.yaml

--- /dev/null
+++ b/tmp/kustomize-action-XXXXXXnBxMFe/e2e_test/applications/argoproj.io_v1alpha1_applicationset_e2e-test-set.yaml
@@ -0,0 +1,37 @@
+apiVersion: argoproj.io/v1alpha1
+kind: ApplicationSet
+metadata:
+  name: e2e-test-set
+  namespace: argocd
+spec:
+  generators:
+  - git:
+      files:
+      - path: '*/metadata.yaml'
+      repoURL: https://github.com/int128/argocd-commenter-e2e-test
+      requeueAfterSeconds: 5
+      revision: FIXTURE_BASE_BRANCH
+  goTemplate: true
+  goTemplateOptions:
+  - missingkey=error
+  template:
+    metadata:
+      annotations:
+        argocd-commenter.int128.github.io/deployment-url: '{{ .deploymentURL }}'
+      finalizers:
+      - resources-finalizer.argocd.argoproj.io
+      name: '{{ .path.basename }}'
+    spec:
+      destination:
+        namespace: default
+        server: https://kubernetes.default.svc
+      project: e2e-test-project
+      source:
+        path: '{{ .path.basename }}'
+        repoURL: https://github.com/int128/argocd-commenter-e2e-test
+        targetRevision: FIXTURE_BASE_BRANCH
+      syncPolicy:
+        automated:
+          prune: true
+        retry:
+          limit: 1

e2e_test/applications/argoproj.io_v1alpha1_appproject_e2e-test-project.yaml

--- /dev/null
+++ b/tmp/kustomize-action-XXXXXXnBxMFe/e2e_test/applications/argoproj.io_v1alpha1_appproject_e2e-test-project.yaml
@@ -0,0 +1,14 @@
+apiVersion: argoproj.io/v1alpha1
+kind: AppProject
+metadata:
+  name: e2e-test-project
+  namespace: argocd
+spec:
+  clusterResourceWhitelist:
+  - group: '*'
+    kind: '*'
+  destinations:
+  - namespace: '*'
+    server: https://kubernetes.default.svc
+  sourceRepos:
+  - https://github.com/int128/argocd-commenter-e2e-test

See the workflow run

@int128 int128 deleted the int128/Use-ApplicationSet-in-e2e-test branch August 15, 2024 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant