Skip to content

Commit 4f4328a

Browse files
committed
fix(ci): add Keycloak CRDs and fix flightdeck workflow
- Copy Keycloak CRDs to hack/keycloak/crds/ (previously expected in sibling directory from ptd repo structure) - Update localtest to use repo-local CRD path - Fix flightdeck workflow to push to GHCR on main branch before push-dockerhub job attempts to pull
1 parent 527992d commit 4f4328a

File tree

4 files changed

+7617
-10
lines changed

4 files changed

+7617
-10
lines changed

.github/workflows/flightdeck.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,12 @@ jobs:
136136
username: ${{ github.actor }}
137137
password: ${{ secrets.GITHUB_TOKEN }}
138138

139+
- name: Push to GHCR (main branch)
140+
if: github.ref == 'refs/heads/main'
141+
run: docker push "${{ env.GHCR_REGISTRY }}/flightdeck:${{ steps.metadata.outputs.version }}"
142+
139143
- name: Push to GHCR (for PRs - adhoc testing)
140144
if: github.event_name == 'pull_request'
141-
working-directory: flightdeck/
142145
run: |
143146
ADHOC_TAG="${{ steps.adhoc-tag.outputs.tag }}"
144147
docker tag "${{ env.GHCR_REGISTRY }}/flightdeck:${{ steps.metadata.outputs.version }}" "${{ env.GHCR_REGISTRY }}/flightdeck:${ADHOC_TAG}"

api/localtest/local.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ package localtest
22

33
import (
44
"context"
5-
"fmt"
6-
"os"
75
"path/filepath"
86

97
"github.com/go-logr/logr"
@@ -21,16 +19,10 @@ type LocalTestEnv struct {
2119
}
2220

2321
func (lte *LocalTestEnv) makeEnv() error {
24-
topDir, ok := os.LookupEnv("TOP")
25-
if !ok {
26-
fmt.Printf("TOP environment variable not set, guessing...\n")
27-
topDir = filepath.Join(RootDir, "../")
28-
}
29-
3022
lte.env = &envtest.Environment{
3123
CRDDirectoryPaths: []string{
3224
filepath.Join(RootDir, "config", "crd", "bases"),
33-
filepath.Join(topDir, "keycloak", "kustomization", "crds"),
25+
filepath.Join(RootDir, "hack", "keycloak", "crds"),
3426
filepath.Join(RootDir, "hack", "traefik", "crds"),
3527
},
3628
ErrorIfCRDPathMissing: true,

0 commit comments

Comments
 (0)