Skip to content

Commit

Permalink
feat: test find tekton service
Browse files Browse the repository at this point in the history
  • Loading branch information
ElderMatt committed Oct 12, 2023
1 parent 359d0f7 commit 7c53884
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tasks/gitea/gitea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
RepositoryApi,
Team,
} from '@redkubes/gitea-client-node'
import { k8s } from '../../k8s'
import { doApiCall, waitTillAvailable } from '../../utils'
import { GITEA_PASSWORD, GITEA_URL, OTOMI_VALUES, cleanEnv } from '../../validators'
import { orgName, otomiValuesRepoName, teamNameViewer, username } from '../common'
Expand Down Expand Up @@ -122,6 +123,9 @@ export async function upsertRepo(
}
export async function addHook(repoApi: RepositoryApi): Promise<void> {
console.debug('Check for Tekton hook')
const k8sApi = k8s.core()
const service = await k8sApi.readNamespacedService('event-listener', 'team-admin')
console.log('SERVICE: ', service)
const tektonUrl = 'http://el-tekton-listener.team-admin.svc.cluster.local:8080'
const hasHooks = await hasTektonHook(repoApi)
if (!hasHooks) {
Expand Down

0 comments on commit 7c53884

Please sign in to comment.