Skip to content

Commit

Permalink
Deploy action fix (#219)
Browse files Browse the repository at this point in the history
* fix deploy

* test

* revert change for test

* Debug install

* better debug

* sleep

* set namespace

* test this

* check deployment status

* remove duplicate check

* sleep again

* back to pod check

* app-crd fix

* try this

* fix crd

* namespace

* fix deploy

Co-authored-by: Justin Thompson <[email protected]>
  • Loading branch information
J-Thompson12 and Justin Thompson committed May 28, 2021
1 parent 9b4a857 commit 37b179f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 35 deletions.
30 changes: 16 additions & 14 deletions config/crd/app-crd.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: wego.app.crd
Expand All @@ -10,20 +10,22 @@ spec:
listKind: AppList
plural: apps
singular: app
subresources:
status: {}
validation:
openAPIV3Schema:
required: ["spec"]
properties:
spec:
required: ["url"]
properties:
url:
type: "string"
minimum: 1
maximum: 1
versions:
- name: v1alpha1
subresources:
status: {}
schema:
openAPIV3Schema:
required: ["spec"]
properties:
spec:
type: object
required: ["url"]
properties:
url:
type: "string"
minimum: 1
maximum: 1
type: object
served: true
storage: true
39 changes: 20 additions & 19 deletions pkg/cmdimpl/manifests/app-crd.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: apps.wego.weave.works
Expand All @@ -10,26 +10,27 @@ spec:
listKind: ApplicationList
plural: apps
singular: app
subresources:
status: {}
validation:
openAPIV3Schema:
required: ["spec"]
properties:
spec:
required: ["url", "path"]
properties:
url:
type: "string"
minimum: 1
maximum: 1
path:
type: "string"
minimum: 1
maximum: 1
version: v1alpha1
versions:
- name: v1alpha1
subresources:
status: {}
schema:
openAPIV3Schema:
required: ["spec"]
properties:
spec:
type: object
required: ["url", "path"]
properties:
url:
type: "string"
minimum: 1
maximum: 1
path:
type: "string"
minimum: 1
maximum: 1
type: object
served: true
storage: true
---
5 changes: 3 additions & 2 deletions test/acceptance/test/core_operations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ var _ = Describe("WEGO Acceptance Tests", func() {
})

By("And I have a brand new cluster", func() {
namespace = "wego-system"
_, err := ResetOrCreateCluster(namespace)
Expect(err).ShouldNot(HaveOccurred())
})
Expand All @@ -84,7 +85,7 @@ var _ = Describe("WEGO Acceptance Tests", func() {
Expect(setupTest()).Should(Succeed())
Expect(ensureWegoRepoIsAbsent()).Should(Succeed())

//Install wego
// Install wego
command := exec.Command("sh", "-c", fmt.Sprintf("%s install | kubectl apply -f -", WEGO_BIN_PATH))
session, err = gexec.Start(command, GinkgoWriter, GinkgoWriter)
Expect(err).ShouldNot(HaveOccurred())
Expand Down Expand Up @@ -254,7 +255,7 @@ func waitForNginxDeployment() error {
func waitForFluxInstall() error {
for i := 1; i < 11; i++ {
log.Infof("Waiting for flux... try: %d of 10\n", i)
err := utils.CallCommandForEffectWithDebug("kubectl get customresourcedefinition buckets.source.toolkit.fluxcd.io")
err := utils.CallCommandForEffect("kubectl get customresourcedefinition buckets.source.toolkit.fluxcd.io")
if err == nil {
return nil
}
Expand Down

0 comments on commit 37b179f

Please sign in to comment.