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

Drenv cache test #7

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
jobs:
e2e-rdr:
runs-on: [self-hosted, e2e-rdr]
if: github.repository == 'RamenDR/ramen' && github.event.pull_request.author_association == 'MEMBER'
if: github.repository == 'nirs/ramen' && github.event.pull_request.author_association == 'OWNER'

steps:
- name: Checkout Repo
Expand Down
5 changes: 2 additions & 3 deletions test/addons/ocm-controller/fetch → test/addons/cdi/cache
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
# SPDX-License-Identifier: Apache-2.0

import os

from drenv import cache

os.chdir(os.path.dirname(__file__))
path = cache.path("addons/ocm-controller.yaml")
cache.fetch(".", path)
cache.refresh("operator", "addons/cdi-operator.yaml")
cache.refresh("cr", "addons/cdi-cr.yaml")
16 changes: 0 additions & 16 deletions test/addons/cdi/fetch

This file was deleted.

6 changes: 2 additions & 4 deletions test/addons/cdi/start
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ NAMESPACE = "cdi"

def deploy(cluster):
print("Deploying cdi operator")
path = cache.path("addons/cdi-operator.yaml")
cache.fetch("operator", path)
path = cache.get("operator", "addons/cdi-operator.yaml")
kubectl.apply("--filename", path, context=cluster)

print("Waiting until cdi-operator is rolled out")
Expand All @@ -28,8 +27,7 @@ def deploy(cluster):
)

print("Deploying cdi cr")
path = cache.path("addons/cdi-cr.yaml")
cache.fetch("cr", path)
path = cache.get("cr", "addons/cdi-cr.yaml")
kubectl.apply("--filename", path, context=cluster)


Expand Down
4 changes: 1 addition & 3 deletions test/addons/recipe/fetch → test/addons/csi-addons/cache
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
# SPDX-License-Identifier: Apache-2.0

import os

from drenv import cache

os.chdir(os.path.dirname(__file__))
path = cache.path("addons/recipe.yaml")
cache.fetch(".", path)
cache.refresh(".", "addons/csi-addons.yaml")
3 changes: 1 addition & 2 deletions test/addons/csi-addons/start
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ from drenv import cache

def deploy(cluster):
print("Deploying csi addon for volume replication")
path = cache.path("addons/csi-addons.yaml")
cache.fetch(".", path)
path = cache.get(".", "addons/csi-addons.yaml")
kubectl.apply("--filename", path, context=cluster)


Expand Down
11 changes: 11 additions & 0 deletions test/addons/kubevirt/cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env python3

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

import os
from drenv import cache

os.chdir(os.path.dirname(__file__))
cache.refresh("operator", "addons/kubevirt-operator.yaml")
cache.refresh("cr", "addons/kubevirt-cr.yaml")
16 changes: 0 additions & 16 deletions test/addons/kubevirt/fetch

This file was deleted.

6 changes: 2 additions & 4 deletions test/addons/kubevirt/start
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ NAMESPACE = "kubevirt"

def deploy(cluster):
print("Deploying kubevirt operator")
path = cache.path("addons/kubevirt-operator.yaml")
cache.fetch("operator", path)
path = cache.get("operator", "addons/kubevirt-operator.yaml")
kubectl.apply("--filename", path, context=cluster)

print("Waiting until virt-operator is rolled out")
Expand All @@ -28,8 +27,7 @@ def deploy(cluster):
)

print("Deploying kubevirt cr")
path = cache.path("addons/kubevirt-cr.yaml")
cache.fetch("cr", path)
path = cache.get("cr", "addons/kubevirt-cr.yaml")
kubectl.apply("--filename", path, context=cluster)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
# SPDX-License-Identifier: Apache-2.0

import os

from drenv import cache

os.chdir(os.path.dirname(__file__))
path = cache.path("addons/csi-addons.yaml")
cache.fetch(".", path)
cache.refresh(".", "addons/ocm-controller.yaml")
3 changes: 1 addition & 2 deletions test/addons/ocm-controller/start
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ from drenv import cache

def deploy(cluster):
print("Deploying ocm controller")
path = cache.path("addons/ocm-controller.yaml")
cache.fetch(".", path)
path = cache.get(".", "addons/ocm-controller.yaml")
kubectl.apply("--filename", path, context=cluster)


Expand Down
4 changes: 1 addition & 3 deletions test/addons/rook-cephfs/fetch → test/addons/recipe/cache
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
# SPDX-License-Identifier: Apache-2.0

import os

from drenv import cache

os.chdir(os.path.dirname(__file__))
path = cache.path("addons/rook-cephfs.yaml")
cache.fetch(".", path)
cache.refresh(".", "addons/recipe.yaml")
3 changes: 1 addition & 2 deletions test/addons/recipe/start
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ os.chdir(os.path.dirname(__file__))
cluster = sys.argv[1]

print("Deploying recipe crd")
path = cache.path("addons/recipe.yaml")
cache.fetch(".", path)
path = cache.get(".", "addons/recipe.yaml")
kubectl.apply("--filename", path, context=cluster)
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
# SPDX-License-Identifier: Apache-2.0

import os

from drenv import cache

os.chdir(os.path.dirname(__file__))
path = cache.path("addons/rook-cluster.yaml")
cache.fetch(".", path)
cache.refresh(".", "addons/rook-cephfs.yaml")
3 changes: 1 addition & 2 deletions test/addons/rook-cephfs/start
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ from drenv import kubectl

def deploy(cluster):
print("Creating CephFS instance and storage/snapshot classes")
path = cache.path("addons/rook-cephfs.yaml")
cache.fetch(".", path)
path = cache.get(".", "addons/rook-cephfs.yaml")
kubectl.apply("--filename", path, context=cluster)


Expand Down
10 changes: 10 additions & 0 deletions test/addons/rook-cluster/cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env python3

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

import os
from drenv import cache

os.chdir(os.path.dirname(__file__))
cache.refresh(".", "addons/rook-cluster.yaml")
3 changes: 1 addition & 2 deletions test/addons/rook-cluster/start
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ TIMEOUT = 600

def deploy(cluster):
print("Deploying rook ceph cluster")
path = cache.path("addons/rook-cluster.yaml")
cache.fetch(".", path)
path = cache.get(".", "addons/rook-cluster.yaml")
kubectl.apply("--filename", path, context=cluster)


Expand Down
10 changes: 10 additions & 0 deletions test/addons/rook-operator/cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env python3

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

import os
from drenv import cache

os.chdir(os.path.dirname(__file__))
cache.refresh(".", "addons/rook-operator.yaml")
12 changes: 0 additions & 12 deletions test/addons/rook-operator/fetch

This file was deleted.

3 changes: 1 addition & 2 deletions test/addons/rook-operator/start
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ from drenv import cache

def deploy(cluster):
print("Deploying rook ceph operator")
path = cache.path("addons/rook-operator.yaml")
cache.fetch(".", path)
path = cache.get(".", "addons/rook-operator.yaml")
kubectl.apply("--filename", path, context=cluster)


Expand Down
10 changes: 10 additions & 0 deletions test/addons/rook-toolbox/cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env python3

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

import os
from drenv import cache

os.chdir(os.path.dirname(__file__))
cache.refresh(".", "addons/rook-toolbox.yaml")
12 changes: 0 additions & 12 deletions test/addons/rook-toolbox/fetch

This file was deleted.

3 changes: 1 addition & 2 deletions test/addons/rook-toolbox/start
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ from drenv import cache

def deploy(cluster):
print("Deploying rook ceph toolbox")
path = cache.path("addons/rook-toolbox.yaml")
cache.fetch(".", path)
path = cache.get(".", "addons/rook-toolbox.yaml")
kubectl.apply("--filename", path, context=cluster)


Expand Down
Loading
Loading