Skip to content

Conversation

@anon-pradip
Copy link
Contributor

@anon-pradip anon-pradip commented Dec 2, 2025

Description

Changes Made:

1. Modified .drone.star - Split deployment into 3 steps:

  • prepareOcisDeployment() (golang image):

    • Builds ociswrapper binary
    • Applies sed patches to sharing/deployment.yaml:
      sed -i 's|/etc/ocis/sharing-banned-passwords.txt|/etc/ocis/config/drone/banned-password-list.txt|'
      sed -i 's|- name: configs|- name: banned-passwords|'
      sed -i 's|mountPath: /etc/ocis$|mountPath: /etc/ocis/config/drone|'
      sed -i 's|name: sharing-banned-passwords-{{ .appName }}|name: sharing-banned-passwords|'
  • setupOcisConfigMaps() (k3d image with kubectl):

    • Creates ConfigMap from tests/config/drone/banned-password-list.txt
    • Mounts to /etc/ocis/config/drone/banned-password-list.txt in sharing pod
  • deployOcis() (golang image with Helm):

    • Deploys oCIS with patched templates

2. Modified tests/acceptance/bootstrap/OcisConfigContext.php:

  • In K8s mode, prepends /etc/ocis/ to relative paths instead of using absolute paths from test container because: Test uses config/drone/banned-password-list.txt → K8s mounts to /etc/ocis/config/drone/banned-password-list.txt

Passing CI: https://drone.owncloud.com/owncloud/ocis/49533/18
https://drone.owncloud.com/owncloud/ocis/49644/15/10

Related Issue

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@anon-pradip anon-pradip self-assigned this Dec 2, 2025
@anon-pradip anon-pradip force-pushed the test/run-api-sharingNgLinkShare-suite-in-k8 branch from b29f989 to 1cdeb96 Compare December 2, 2025 11:29
@anon-pradip anon-pradip force-pushed the test/run-api-sharingNgLinkShare-suite-in-k8 branch 2 times, most recently from 571d51f to 70c89ea Compare December 3, 2025 06:09
@anon-pradip anon-pradip marked this pull request as ready for review December 3, 2025 10:42
@anon-pradip anon-pradip requested review from Ashim-Stha, nirajacharya2 and saw-jan and removed request for individual-it, kobergj and phil-davis December 3, 2025 10:43
nirajacharya2
nirajacharya2 previously approved these changes Dec 4, 2025
.drone.star Outdated
(waitForClamavService() if params["antivirusNeeded"] else []) +
(waitForEmailService() if params["emailNeeded"] else []) +
(waitK3sCluster() + deployOcis() + waitForOcis(ocis_url = ocis_url) + ociswrapper() + waitForOciswrapper() if run_on_k8s else ocisServer(storage, extra_server_environment = params["extraServerEnvironment"], with_wrapper = True, tika_enabled = params["tikaNeeded"], volumes = ([stepVolumeOcisStorage]))) +
(waitK3sCluster() + prepareOcisDeployment() + setupOcisConfigMaps() + deployOcis() + waitForOcis(ocis_url = ocis_url) + ociswrapper() + waitForOciswrapper() if run_on_k8s else ocisServer(storage, extra_server_environment = params["extraServerEnvironment"], with_wrapper = True, tika_enabled = params["tikaNeeded"], volumes = ([stepVolumeOcisStorage]))) +
Copy link
Contributor

@nirajacharya2 nirajacharya2 Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think we need this for core api tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. prepareOcisDeployment() - Builds ociswrapper (for @env-config tests) and enables basic auth (for coreApiAuth tests)
  2. setupOcisConfigMaps() - Creates the ocis namespace (required before Helm deployment)

@anon-pradip anon-pradip force-pushed the test/run-api-sharingNgLinkShare-suite-in-k8 branch 3 times, most recently from 251d117 to 8819392 Compare December 4, 2025 11:56
@anon-pradip anon-pradip force-pushed the test/run-api-sharingNgLinkShare-suite-in-k8 branch from 8819392 to f89da82 Compare December 4, 2025 12:17
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 4, 2025

# Only create banned password ConfigMap for sharingNgLinkShare suite
if suite_name == "sharingNgLinkShare":
commands.append(
"kubectl create configmap -n ocis sharing-banned-passwords --from-file=banned-password-list.txt=%s/tests/config/drone/banned-password-list.txt" % dirs["base"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we reuse existing configmap instead of creating a new sharing-banned-passwords?

sharing-banned-passwords-frontend  
sharing-banned-passwords-sharing  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants