Skip to content

Commit

Permalink
Update Triggers API group to match Triggers 0.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanGreene authored and tekton-robot committed Apr 7, 2020
1 parent dd4b4dd commit 0942078
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 19 deletions.
6 changes: 3 additions & 3 deletions base/200-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ rules:
- apiGroups: ["dashboard.tekton.dev"]
resources: ["extensions"]
verbs: ["get", "list", "watch"]
- apiGroups: ["tekton.dev"]
resources: ["eventlisteners", "triggerbindings",
"triggertemplates"]
- apiGroups: ["triggers.tekton.dev"]
resources: ["clustertriggerbindings", "eventlisteners",
"triggerbindings", "triggertemplates"]
verbs: ["get", "list", "watch"]
3 changes: 2 additions & 1 deletion overlays/full-fat/cluster-role-patch-json.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@
path: /rules/8
value:
apiGroups:
- tekton.dev
- triggers.tekton.dev
resources:
- clustertriggerbindings
- eventlisteners
- triggerbindings
- triggertemplates
Expand Down
2 changes: 1 addition & 1 deletion src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
} from './comms';

const tektonAPIGroup = 'tekton.dev';
const triggersAPIGroup = 'tekton.dev'; // TODO: update to 'triggers.tekton.dev' for Triggers 0.4
const triggersAPIGroup = 'triggers.tekton.dev';

export function getAPIRoot() {
const { href, hash } = window.location;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const intl = createIntl({
});

const clusterTriggerBindingSimple = {
apiVersion: 'tekton.dev/v1alpha1',
apiVersion: 'triggers.tekton.dev/v1alpha1',
kind: 'ClusterTriggerBinding',
metadata: {
creationTimestamp: '2019-11-19T19:44:43Z',
Expand All @@ -43,7 +43,7 @@ const clusterTriggerBindingSimple = {
};

const clusterTriggerBindingWithLabels = {
apiVersion: 'tekton.dev/v1alpha1',
apiVersion: 'triggers.tekton.dev/v1alpha1',
kind: 'ClusterTriggerBinding',
metadata: {
labels: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const namespaces = {

const byId = {
'c930f02e-0582-11ea-8c1f-025765432111': {
apiVersion: 'tekton.dev/v1alpha1',
apiVersion: 'triggers.tekton.dev/v1alpha1',
kind: 'ClusterTriggerBinding',
metadata: {
creationTimestamp: '2019-11-12T19:29:46Z',
Expand Down
2 changes: 1 addition & 1 deletion src/containers/EventListener/EventListener.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { createIntl } from 'react-intl';
import { EventListenerContainer } from './EventListener';

const eventListener = {
apiVersion: 'tekton.dev/v1alpha1',
apiVersion: 'triggers.tekton.dev/v1alpha1',
kind: 'EventListener',
metadata: {
name: 'my-eventlistener',
Expand Down
2 changes: 1 addition & 1 deletion src/containers/EventListener/EventListener.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const intl = createIntl({
/* Displaying of Trigger info is tested in the component test */

const fakeEventListenerWithLabels = {
apiVersion: 'tekton.dev/v1alpha1',
apiVersion: 'triggers.tekton.dev/v1alpha1',
kind: 'EventListener',
metadata: {
name: 'tekton-webhooks-eventlistener',
Expand Down
4 changes: 2 additions & 2 deletions src/containers/EventListeners/EventListeners.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const byNamespace = {

const byId = {
'c930f02e-0582-11ea-8c1f-025765432111': {
apiVersion: 'tekton.dev/v1alpha1',
kind: 'eventListener',
apiVersion: 'triggers.tekton.dev/v1alpha1',
kind: 'EventListener',
metadata: {
creationTimestamp: '2019-11-12T19:29:46Z',
name: 'event-listener',
Expand Down
2 changes: 1 addition & 1 deletion src/containers/SideNav/SideNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class SideNav extends Component {
group: 'apiextensions.k8s.io',
version: 'v1beta1',
type: 'customresourcedefinitions',
name: 'eventlisteners.tekton.dev'
name: 'eventlisteners.triggers.tekton.dev'
})
.then(() => {
this.setState({ isTriggersInstalled: true });
Expand Down
4 changes: 2 additions & 2 deletions src/containers/TriggerBinding/TriggerBinding.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const intl = createIntl({
});

const triggerBindingSimple = {
apiVersion: 'tekton.dev/v1alpha1',
apiVersion: 'triggers.tekton.dev/v1alpha1',
kind: 'TriggerBinding',
metadata: {
creationTimestamp: '2019-11-19T19:44:43Z',
Expand All @@ -44,7 +44,7 @@ const triggerBindingSimple = {
};

const triggerBindingWithLabels = {
apiVersion: 'tekton.dev/v1alpha1',
apiVersion: 'triggers.tekton.dev/v1alpha1',
kind: 'TriggerBinding',
metadata: {
labels: {
Expand Down
2 changes: 1 addition & 1 deletion src/containers/TriggerBindings/TriggerBindings.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const byNamespace = {

const byId = {
'c930f02e-0582-11ea-8c1f-025765432111': {
apiVersion: 'tekton.dev/v1alpha1',
apiVersion: 'triggers.tekton.dev/v1alpha1',
kind: 'triggerBinding',
metadata: {
creationTimestamp: '2019-11-12T19:29:46Z',
Expand Down
4 changes: 2 additions & 2 deletions src/containers/TriggerTemplate/TriggerTemplate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const resourceTemplate1Details = {
}
};
const fakeTriggerTemplate = {
apiVersion: 'tekton.dev/v1alpha1',
apiVersion: 'triggers.tekton.dev/v1alpha1',
kind: 'TriggerTemplate',
metadata: {
annotations: {
Expand Down Expand Up @@ -114,7 +114,7 @@ const fakeTriggerTemplate = {
};

const fakeTriggerTemplateWithLabels = {
apiVersion: 'tekton.dev/v1alpha1',
apiVersion: 'triggers.tekton.dev/v1alpha1',
kind: 'TriggerTemplate',
metadata: {
annotations: {
Expand Down
2 changes: 1 addition & 1 deletion src/containers/TriggerTemplates/TriggerTemplates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const byNamespace = {

const byId = {
'c930f02e-0582-11ea-8c1f-025765432111': {
apiVersion: 'tekton.dev/v1alpha1',
apiVersion: 'triggers.tekton.dev/v1alpha1',
kind: 'TriggerTemplate',
metadata: {
creationTimestamp: '2019-11-12T19:29:46Z',
Expand Down

0 comments on commit 0942078

Please sign in to comment.