Skip to content

Commit 12775f8

Browse files
authored
Merge branch 'release-0.3' into cherry-pick-133-to-release-0.3
2 parents d779d6e + 36fd859 commit 12775f8

2 files changed

Lines changed: 35 additions & 11 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, and contr
308308
| `git.lastChecked` | timestamp | Last time the repository was checked |
309309
| `deployment.image` | string | Container image of the deployed function |
310310
| `deployment.imageBuilt` | timestamp | When the current image was built |
311+
| `deployment.revision` | string | Current revision of the deployed service |
311312
| `deployment.deployer` | string | Tool/method used to deploy the function (e.g., "func") |
312313
| `deployment.runtime` | string | Detected function runtime |
313314
| `middleware.current` | string | Current middleware version in use |
@@ -318,6 +319,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, and contr
318319
| `middleware.lastRebuild` | timestamp | Last time the function was rebuilt for middleware updates |
319320
| `service.url` | string | URL of the function's service |
320321
| `service.ready` | string | Whether the function's service is ready (e.g., "true", "false", "UNKNOWN") |
322+
| `history` | array | Last 20 reconciliation events with timestamp and message |
321323

322324
#### Status Conditions
323325

docs/development/gitea-integration.md

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,39 @@ BeforeEach(func() {
4444
### Available Helper Methods
4545

4646
**RepositoryProvider Interface:**
47-
- `CreateUser(username, password, email string) (cleanup func(), err error)` - Create user with cleanup function
48-
- `CreateRandomUser() (username, password, email string, cleanup func(), err error)` - Create user with random credentials
49-
- `CreateRepo(owner, name string, private bool) (url string, cleanup func(), err error)` - Create repository
50-
- `CreateRandomRepo(owner string, private bool) (name, url string, cleanup func(), err error)` - Create repo with random name
51-
- `CreateAccessToken(username, password, tokenName string) (string, error)` - Generate access token
52-
- `CreateSSHKey(username, password, title, publicKey string) error` - Register SSH public key for user
53-
- `SSHRepoURL(owner, repo string) (string, error)` - Get SSH URL for a repository
54-
55-
**E2E Helper Functions:**
56-
- `InitializeRepoWithFunction(url, user, pass, lang)` - Clone, init function, push
57-
- `CommitAndPush(repoDir, msg, file, ...otherFiles)` - Commit and push files
47+
- `CreateUser(username, password, email string) (cleanup func(), err error)` — Create user with cleanup function
48+
- `DeleteUser(username string) error` — Delete a user and all their data
49+
- `CreateRandomUser() (username, password, email string, cleanup func(), err error)` — Create user with random credentials
50+
- `CreateRepo(owner, name string, private bool) (url string, cleanup func(), err error)` — Create repository
51+
- `DeleteRepo(owner, name string) error` — Delete a repository
52+
- `CreateRandomRepo(owner string, private bool) (name, url string, cleanup func(), err error)` — Create repo with random name
53+
- `CreateAccessToken(username, password, tokenName string) (string, error)` — Generate access token
54+
- `CreateSSHKey(username, password, title, publicKey string) error` — Register SSH public key for user
55+
- `SSHRepoURL(owner, repo string) (string, error)` — Get SSH URL for a repository
56+
57+
Note: `CreateUser`, `CreateRepo`, and `CreateRandomRepo` return cleanup functions that call `DeleteUser`/`DeleteRepo` internally. Prefer `DeferCleanup(cleanup)` over calling the delete methods directly.
58+
59+
**Git Helper Functions:**
60+
- `InitializeRepoWithFunction(url, user, pass, lang string, opts ...RepoOption) (repoDir string, err error)` — Clone, init function, push
61+
- `CommitAndPush(repoDir, msg, file string, otherFiles ...string) error` — Commit and push files
62+
63+
`InitializeRepoWithFunction` accepts functional options:
64+
- `WithSubDir(subDir string)` — Place the function in a subdirectory (for monorepo testing)
65+
- `WithCliVersion(version string)` — Use a specific func CLI version to initialize the function
66+
67+
**func CLI Helper Functions:**
68+
- `RunFunc(command string, args ...string) (string, error)` — Run the current/latest func CLI
69+
- `RunFuncWithVersion(version, command string, args ...string) (string, error)` — Run a specific func CLI version (downloads and caches automatically)
70+
- `RunFuncDeploy(functionDir string, opts ...FuncDeployOption) (string, error)` — Deploy a function with retry logic
71+
72+
`RunFuncDeploy` accepts functional options:
73+
- `WithNamespace(namespace string)` — Target namespace
74+
- `WithBuilder(builder string)` — Builder to use (e.g. `pack`, `s2i`)
75+
- `WithDeployer(deployer string)` — Deployer to use (e.g. `knative`, `keda`)
76+
- `WithDeployCliVersion(version string)` — Use a specific func CLI version
77+
- `WithEnvVars(envVars map[string]string)` — Set environment variables for the deploy command
78+
79+
Defaults for `RunFuncDeploy` are read from environment variables: `REGISTRY` (or `REGISTRY_URL`), `REGISTRY_INSECURE`, `DEFAULT_BUILDER`, `DEFAULT_DEPLOYER`.
5880

5981
### DeferCleanup Pattern
6082

0 commit comments

Comments
 (0)