@@ -424,42 +424,43 @@ def main(ctx):
424
424
425
425
pipelines = []
426
426
427
- build_release_helpers = \
428
- changelog () + \
429
- docs () + \
430
- licenseCheck (ctx )
427
+ # build_release_helpers = \
428
+ # changelog() + \
429
+ # docs() + \
430
+ # licenseCheck(ctx)
431
431
432
432
test_pipelines = \
433
- codestyle (ctx ) + \
434
- checkGherkinLint (ctx ) + \
435
- checkTestSuitesInExpectedFailures (ctx ) + \
436
- buildWebCache (ctx ) + \
437
- getGoBinForTesting (ctx ) + \
438
- buildOcisBinaryForTesting (ctx ) + \
439
- checkStarlark () + \
440
- build_release_helpers + \
441
- testOcisAndUploadResults (ctx ) + \
442
- testPipelines (ctx )
443
-
444
- build_release_pipelines = \
445
- dockerReleases (ctx ) + \
446
- binaryReleases (ctx )
447
-
448
- test_pipelines .append (
449
- pipelineDependsOn (
450
- purgeBuildArtifactCache (ctx ),
451
- testPipelines (ctx ),
452
- ),
453
- )
454
-
455
- test_pipelines .append (
456
- pipelineDependsOn (
457
- uploadAPITestCoverageReport (ctx ),
458
- testPipelines (ctx ),
459
- ),
460
- )
461
-
462
- pipelines = test_pipelines + build_release_pipelines
433
+ deployments (ctx )
434
+ # codestyle(ctx) + \
435
+ # checkGherkinLint(ctx) + \
436
+ # checkTestSuitesInExpectedFailures(ctx) + \
437
+ # buildWebCache(ctx) + \
438
+ # getGoBinForTesting(ctx) + \
439
+ # buildOcisBinaryForTesting(ctx) + \
440
+ # checkStarlark() + \
441
+ # build_release_helpers + \
442
+ # testOcisAndUploadResults(ctx) + \
443
+ # testPipelines(ctx) + \
444
+
445
+ # build_release_pipelines = \
446
+ # dockerReleases(ctx) + \
447
+ # binaryReleases(ctx)
448
+
449
+ # test_pipelines.append(
450
+ # pipelineDependsOn(
451
+ # purgeBuildArtifactCache(ctx),
452
+ # testPipelines(ctx),
453
+ # ),
454
+ # )
455
+
456
+ # test_pipelines.append(
457
+ # pipelineDependsOn(
458
+ # uploadAPITestCoverageReport(ctx),
459
+ # testPipelines(ctx),
460
+ # ),
461
+ # )
462
+
463
+ pipelines = deployments (ctx ) #test_pipelines + build_release_pipelines
463
464
464
465
if ctx .build .event == "cron" :
465
466
pipelines = \
@@ -3535,3 +3536,91 @@ def onlyofficeService():
3535
3536
],
3536
3537
},
3537
3538
]
3539
+
3540
+ def deployments (ctx ):
3541
+ result = {
3542
+ "kind" : "pipeline" ,
3543
+ "type" : "docker" ,
3544
+ "name" : "k3d" ,
3545
+ "privileged" : True ,
3546
+ "steps" : wait (ctx ) + install (ctx ) + showPodsAfterInstall (ctx ),
3547
+ "services" : [
3548
+ {
3549
+ "name" : "k3d" ,
3550
+ "image" : "ghcr.io/k3d-io/k3d:5-dind" ,
3551
+ "user" : "root" ,
3552
+ "commands" : [
3553
+ "git clone https://github.com/owncloud/ocis-charts.git" ,
3554
+ "cd ocis-charts" ,
3555
+ "nohup dockerd-entrypoint.sh &" ,
3556
+ "until docker ps 2>&1 > /dev/null; do sleep 1s; done" ,
3557
+ "k3d cluster create --config ci/k3d-drone.yaml --api-port k3d:6445" ,
3558
+ "until kubectl get deployment coredns -n kube-system -o go-template='{{.status.availableReplicas}}' | grep -v -e '<no value>'; do sleep 1s; done" ,
3559
+ "k3d kubeconfig get drone > kubeconfig-$${DRONE_BUILD_NUMBER}.yaml" ,
3560
+ "chmod 0600 kubeconfig-$${DRONE_BUILD_NUMBER}.yaml" ,
3561
+ "printf '@@@@@@@@@@@@@@@@@@@@@@@\n @@@@ k3d is ready @@@@\n @@@@@@@@@@@@@@@@@@@@@@@\n '" ,
3562
+ "kubectl get events -Aw" ,
3563
+ ],
3564
+ },
3565
+ ],
3566
+ "depends_on" : [],
3567
+ "volumes" : [
3568
+ {
3569
+ "name" : "gopath" ,
3570
+ "temp" : {},
3571
+ },
3572
+ ],
3573
+ "trigger" : {
3574
+ "ref" : [
3575
+ "refs/pull/**" ,
3576
+ ],
3577
+ },
3578
+ }
3579
+
3580
+ result ["trigger" ]["ref" ].append ("refs/heads/master" )
3581
+
3582
+ return [result ]
3583
+
3584
+ def wait (config ):
3585
+ return [{
3586
+ "name" : "wait" ,
3587
+ "image" : "docker.io/bitnami/kubectl:1.31" ,
3588
+ "user" : "root" ,
3589
+ "commands" : [
3590
+ "export KUBECONFIG=kubeconfig-$${DRONE_BUILD_NUMBER}.yaml" ,
3591
+ "until test -f $${KUBECONFIG}; do sleep 1s; done" ,
3592
+ "kubectl config view" ,
3593
+ "kubectl get pods -A" ,
3594
+ ],
3595
+ }]
3596
+
3597
+ def showPodsAfterInstall (config ):
3598
+ return [{
3599
+ "name" : "testPodsAfterInstall" ,
3600
+ "image" : "docker.io/bitnami/kubectl:1.31" ,
3601
+ "user" : "root" ,
3602
+ "commands" : [
3603
+ "export KUBECONFIG=kubeconfig-$${DRONE_BUILD_NUMBER}.yaml" ,
3604
+ "until test -f $${KUBECONFIG}; do sleep 1s; done" ,
3605
+ "kubectl get pods -n ocis" ,
3606
+ "if [ \" $(kubectl get pods -n ocis --field-selector status.phase=Running | wc -l)\" -le \" 32\" ]; then exit 1; fi" , # there are 32 pods + 1 header line
3607
+ "kubectl get ingress -n ocis" ,
3608
+ "if [ \" $(kubectl get ingress -n ocis | wc -l)\" -le \" 1\" ]; then exit 1; fi" ,
3609
+ ],
3610
+ }]
3611
+
3612
+ def install (ctx ):
3613
+ return [{
3614
+ "name" : "helm-install" ,
3615
+ "image" : "owncloudci/golang:latest" ,
3616
+ "commands" : [
3617
+ "export KUBECONFIG=kubeconfig-$${DRONE_BUILD_NUMBER}.yaml" ,
3618
+ "make helm-install-atomic" ,
3619
+ ],
3620
+ "volumes" : [
3621
+ {
3622
+ "name" : "gopath" ,
3623
+ "path" : "/go" ,
3624
+ },
3625
+ ],
3626
+ }]
0 commit comments