jenkins-x-plugins / jx-updatebot

a simple plugin to create downstream pull requests as part of your release pipeline
Apache License 2.0
10 stars 15 forks source link

feat: support argo applicationset #79

Closed wowq closed 1 year ago

wowq commented 1 year ago

Support update argo applicationset version

jenkins-x-bot commented 1 year ago

Hi @wowq. Thanks for your PR.

I'm waiting for a jenkins-x-plugins member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [jenkins-x/lighthouse](https://github.com/jenkins-x/lighthouse/issues/new?title=Command%20issue:) repository.
wowq commented 1 year ago

/assign @babadofar

msvticket commented 1 year ago

/ok-to-test

msvticket commented 1 year ago

/approve

msvticket commented 1 year ago

The test failed:

 FAIL: TestModifyApplicationFiles (0.05s)
            applications_test.go:19: using dir /tmp/TestModifyApplicationFiles1492847697/001
            files.go:84: 
                    Error Trace:    /workspace/source/pkg/cmd/argo/promote/files.go:84
                                                /workspace/source/pkg/cmd/argo/promote/applications_test.go:52
                    Error:          Not equal: 
                                    expected: "apiVersion: argoproj.io/v1alpha1\nkind: ApplicationSet\nmetadata:\n  name: my-v3-lts-node\n  namespace: argocd\n  annotations:\n    gitops.jenkins-x.io/sourceRepoUrl: [https://github.com/myorg/myrepo.git\nspec:\n](https://github.com/myorg/myrepo.git/nspec:/n)  generators:\n  - clusters: {}\n  template:\n    metadata:\n      name: \"{{name}}-my-v3-lts-node\"\n      annotations:\n        test1: test1\n    spec:\n      destination:\n        namespace: cheese\n        server: [https://kubernetes.default.svc\n](https://kubernetes.default.svc/n)      project: default\n      source:\n        path: charts/my-chart\n        repoURL: [https://github.com/myorg/myrepo.git\n](https://github.com/myorg/myrepo.git/n)        targetRevision: v1.2.3\n      syncPolicy:\n        automated:\n          selfHeal: true\n        syncOptions:\n        - CreateNamespace=true\n"
                                    actual  : "apiVersion: argoproj.io/v1alpha1\nkind: ApplicationSet\nmetadata:\n  name: my-v3-lts-node\n  namespace: argocd\n  annotations:\n    gitops.jenkins-x.io/sourceRepoUrl: [https://github.com/myorg/myrepo.git\nspec:\n](https://github.com/myorg/myrepo.git/nspec:/n)  generators:\n  - clusters: {}\n  template:\n    metadata:\n      name: \"{{name}}-my-v3-lts-node\"\n      annotations:\n        test1: test1\n    spec:\n      destination:\n        namespace: cheese\n        server: {? {server: ''} : ''}\n      project: default\n      source:\n        path: charts/my-chart\n        repoURL: [https://github.com/myorg/myrepo.git\n](https://github.com/myorg/myrepo.git/n)        targetRevision: v1.2.3\n      syncPolicy:\n        automated:\n          selfHeal: true\n        syncOptions:\n        - CreateNamespace=true\n"

                                    Diff:
                                    --- Expected
                                    +++ Actual
                                    @@ -18,3 +18,3 @@
                                             namespace: cheese
                                    -        server: https://kubernetes.default.svc/
                                    +        server: {? {server: ''} : ''}
                                           project: default
                    Test:           TestModifyApplicationFiles
                    Messages:       comparing text content of files /tmp/TestModifyApplicationFiles1492847697/001/simple/expected/myapp-appset.yaml and /tmp/TestModifyApplicationFiles1492847697/001/simple/source/myapp-appset.yaml
 FAIL   github.com/jenkins-x-plugins/jx-updatebot/pkg/cmd/argo/promote  0.211s
msvticket commented 1 year ago

/approve cancel

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

wowq commented 1 year ago

@msvticket fixed

msvticket commented 1 year ago

/approve

jenkins-x-bot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: msvticket

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/jenkins-x-plugins/jx-updatebot/blob/main/OWNERS)~~ [msvticket] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment