forked from eclipse-jkube/jkube
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test (gradle-plugin/it) : Add Gradle Integration test for WellKnownLa…
…belsEnricher Signed-off-by: Rohan Kumar <[email protected]>
- Loading branch information
1 parent
6a64e3b
commit 11c7048
Showing
8 changed files
with
804 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (c) 2019 Red Hat, Inc. | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at: | ||
* | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Red Hat, Inc. - initial API and implementation | ||
*/ | ||
plugins { | ||
id 'org.eclipse.jkube.kubernetes' version "${jKubeVersion}" | ||
id 'org.eclipse.jkube.openshift' version "${jKubeVersion}" | ||
id 'java' | ||
} | ||
|
||
group = 'org.eclipse.jkube.integration.tests.gradle' | ||
version = '0.0.1-SNAPSHOT' | ||
sourceCompatibility = '11' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
def extensionConfig = { | ||
offline = true | ||
images { | ||
image { | ||
name = 'repository/well-known-labels:latest' | ||
build { | ||
from = 'quay.io/jkube/jkube-java-11' | ||
ports = ['8080'] | ||
} | ||
} | ||
} | ||
} | ||
|
||
kubernetes(extensionConfig) | ||
openshift(extensionConfig) |
102 changes: 102 additions & 0 deletions
102
gradle-plugin/it/src/it/well-known-labels/expected/custom/kubernetes.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: List | ||
items: | ||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
jkube.eclipse.org/git-url: "@ignore@" | ||
jkube.eclipse.org/git-commit: "@ignore@" | ||
jkube.eclipse.org/git-branch: "@ignore@" | ||
labels: | ||
app.kubernetes.io/component: custom-component | ||
app.kubernetes.io/managed-by: custom-managed-by | ||
app.kubernetes.io/name: custom-app | ||
app.kubernetes.io/part-of: custom-part-of | ||
app.kubernetes.io/version: "@ignore@" | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
name: well-known-labels | ||
spec: | ||
ports: | ||
- name: http | ||
port: 8080 | ||
protocol: TCP | ||
targetPort: 8080 | ||
selector: | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
app.kubernetes.io/component: custom-component | ||
app.kubernetes.io/managed-by: custom-managed-by | ||
app.kubernetes.io/name: custom-app | ||
app.kubernetes.io/part-of: custom-part-of | ||
- apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
jkube.eclipse.org/git-url: "@ignore@" | ||
jkube.eclipse.org/git-commit: "@ignore@" | ||
jkube.eclipse.org/git-branch: "@ignore@" | ||
labels: | ||
app.kubernetes.io/component: custom-component | ||
app.kubernetes.io/managed-by: custom-managed-by | ||
app.kubernetes.io/name: custom-app | ||
app.kubernetes.io/part-of: custom-part-of | ||
app.kubernetes.io/version: "@ignore@" | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
name: well-known-labels | ||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 2 | ||
selector: | ||
matchLabels: | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
app.kubernetes.io/component: custom-component | ||
app.kubernetes.io/managed-by: custom-managed-by | ||
app.kubernetes.io/name: custom-app | ||
app.kubernetes.io/part-of: custom-part-of | ||
template: | ||
metadata: | ||
annotations: | ||
jkube.eclipse.org/git-url: "@ignore@" | ||
jkube.eclipse.org/git-commit: "@ignore@" | ||
jkube.eclipse.org/git-branch: "@ignore@" | ||
labels: | ||
app.kubernetes.io/component: custom-component | ||
app.kubernetes.io/managed-by: custom-managed-by | ||
app.kubernetes.io/name: custom-app | ||
app.kubernetes.io/part-of: custom-part-of | ||
app.kubernetes.io/version: "@ignore@" | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
spec: | ||
containers: | ||
- env: | ||
- name: KUBERNETES_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: HOSTNAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
image: repository/well-known-labels:latest | ||
imagePullPolicy: IfNotPresent | ||
name: repository-well-known-labels | ||
ports: | ||
- containerPort: 8080 | ||
name: http | ||
protocol: TCP | ||
securityContext: | ||
privileged: false |
143 changes: 143 additions & 0 deletions
143
gradle-plugin/it/src/it/well-known-labels/expected/custom/openshift.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: List | ||
items: | ||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
app.openshift.io/vcs-ref: "@ignore@" | ||
jkube.eclipse.org/git-url: "@ignore@" | ||
app.openshift.io/vcs-uri: "@ignore@" | ||
jkube.eclipse.org/git-commit: "@ignore@" | ||
jkube.eclipse.org/git-branch: "@ignore@" | ||
labels: | ||
app.kubernetes.io/component: custom-component | ||
app.kubernetes.io/managed-by: custom-managed-by | ||
app.kubernetes.io/name: custom-app | ||
app.kubernetes.io/part-of: custom-part-of | ||
app.kubernetes.io/version: "@ignore@" | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
name: well-known-labels | ||
spec: | ||
ports: | ||
- name: http | ||
port: 8080 | ||
protocol: TCP | ||
targetPort: 8080 | ||
selector: | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
app.kubernetes.io/component: custom-component | ||
app.kubernetes.io/managed-by: custom-managed-by | ||
app.kubernetes.io/name: custom-app | ||
app.kubernetes.io/part-of: custom-part-of | ||
- apiVersion: apps.openshift.io/v1 | ||
kind: DeploymentConfig | ||
metadata: | ||
annotations: | ||
app.openshift.io/vcs-ref: "@ignore@" | ||
jkube.eclipse.org/git-url: "@ignore@" | ||
app.openshift.io/vcs-uri: "@ignore@" | ||
jkube.eclipse.org/git-commit: "@ignore@" | ||
jkube.eclipse.org/git-branch: "@ignore@" | ||
labels: | ||
app.kubernetes.io/component: custom-component | ||
app.kubernetes.io/managed-by: custom-managed-by | ||
app.kubernetes.io/name: custom-app | ||
app.kubernetes.io/part-of: custom-part-of | ||
app.kubernetes.io/version: "@ignore@" | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
name: well-known-labels | ||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 2 | ||
selector: | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
app.kubernetes.io/component: custom-component | ||
app.kubernetes.io/managed-by: custom-managed-by | ||
app.kubernetes.io/name: custom-app | ||
app.kubernetes.io/part-of: custom-part-of | ||
strategy: | ||
rollingParams: | ||
timeoutSeconds: 3600 | ||
type: Rolling | ||
template: | ||
metadata: | ||
annotations: | ||
app.openshift.io/vcs-ref: "@ignore@" | ||
jkube.eclipse.org/git-url: "@ignore@" | ||
app.openshift.io/vcs-uri: "@ignore@" | ||
jkube.eclipse.org/git-commit: "@ignore@" | ||
jkube.eclipse.org/git-branch: "@ignore@" | ||
labels: | ||
app.kubernetes.io/component: custom-component | ||
app.kubernetes.io/managed-by: custom-managed-by | ||
app.kubernetes.io/name: custom-app | ||
app.kubernetes.io/part-of: custom-part-of | ||
app.kubernetes.io/version: "@ignore@" | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
spec: | ||
containers: | ||
- env: | ||
- name: KUBERNETES_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
image: repository/well-known-labels:latest | ||
imagePullPolicy: IfNotPresent | ||
name: repository-well-known-labels | ||
ports: | ||
- containerPort: 8080 | ||
name: http | ||
protocol: TCP | ||
securityContext: | ||
privileged: false | ||
triggers: | ||
- type: ConfigChange | ||
- imageChangeParams: | ||
automatic: true | ||
containerNames: | ||
- repository-well-known-labels | ||
from: | ||
kind: ImageStreamTag | ||
name: well-known-labels:latest | ||
type: ImageChange | ||
- apiVersion: route.openshift.io/v1 | ||
kind: Route | ||
metadata: | ||
annotations: | ||
app.openshift.io/vcs-ref: "@ignore@" | ||
jkube.eclipse.org/git-url: "@ignore@" | ||
app.openshift.io/vcs-uri: "@ignore@" | ||
jkube.eclipse.org/git-commit: "@ignore@" | ||
jkube.eclipse.org/git-branch: "@ignore@" | ||
labels: | ||
app.kubernetes.io/component: custom-component | ||
app.kubernetes.io/managed-by: custom-managed-by | ||
app.kubernetes.io/name: custom-app | ||
app.kubernetes.io/part-of: custom-part-of | ||
app.kubernetes.io/version: "@ignore@" | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
name: well-known-labels | ||
spec: | ||
port: | ||
targetPort: 8080 | ||
to: | ||
kind: Service | ||
name: well-known-labels |
97 changes: 97 additions & 0 deletions
97
gradle-plugin/it/src/it/well-known-labels/expected/default/kubernetes.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: List | ||
items: | ||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
jkube.eclipse.org/git-url: "@ignore@" | ||
jkube.eclipse.org/git-commit: "@ignore@" | ||
jkube.eclipse.org/git-branch: "@ignore@" | ||
labels: | ||
app.kubernetes.io/managed-by: jkube | ||
app.kubernetes.io/name: well-known-labels | ||
app.kubernetes.io/version: "@ignore@" | ||
app.kubernetes.io/part-of: org.eclipse.jkube.integration.tests.gradle | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
name: well-known-labels | ||
spec: | ||
ports: | ||
- name: http | ||
port: 8080 | ||
protocol: TCP | ||
targetPort: 8080 | ||
selector: | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
app.kubernetes.io/managed-by: jkube | ||
app.kubernetes.io/name: well-known-labels | ||
app.kubernetes.io/part-of: org.eclipse.jkube.integration.tests.gradle | ||
- apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
jkube.eclipse.org/git-url: "@ignore@" | ||
jkube.eclipse.org/git-commit: "@ignore@" | ||
jkube.eclipse.org/git-branch: "@ignore@" | ||
labels: | ||
app.kubernetes.io/managed-by: jkube | ||
app.kubernetes.io/name: well-known-labels | ||
app.kubernetes.io/version: "@ignore@" | ||
app.kubernetes.io/part-of: org.eclipse.jkube.integration.tests.gradle | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
name: well-known-labels | ||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 2 | ||
selector: | ||
matchLabels: | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
app.kubernetes.io/managed-by: jkube | ||
app.kubernetes.io/name: well-known-labels | ||
app.kubernetes.io/part-of: org.eclipse.jkube.integration.tests.gradle | ||
template: | ||
metadata: | ||
annotations: | ||
jkube.eclipse.org/git-url: "@ignore@" | ||
jkube.eclipse.org/git-commit: "@ignore@" | ||
jkube.eclipse.org/git-branch: "@ignore@" | ||
labels: | ||
app: "well-known-labels" | ||
provider: "jkube" | ||
version: "@ignore@" | ||
group: org.eclipse.jkube.integration.tests.gradle | ||
app.kubernetes.io/managed-by: jkube | ||
app.kubernetes.io/name: well-known-labels | ||
app.kubernetes.io/version: "@ignore@" | ||
app.kubernetes.io/part-of: org.eclipse.jkube.integration.tests.gradle | ||
spec: | ||
containers: | ||
- env: | ||
- name: KUBERNETES_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: HOSTNAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
image: repository/well-known-labels:latest | ||
imagePullPolicy: IfNotPresent | ||
name: repository-well-known-labels | ||
ports: | ||
- containerPort: 8080 | ||
name: http | ||
protocol: TCP | ||
securityContext: | ||
privileged: false |
Oops, something went wrong.