Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions packages/windows-connector/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# windows-connector: manual build/publish process

Unlike most linux-pkg packages, `windows-connector`'s `post-push` Jenkins job does
**not** auto-trigger on every push to `dlpx-app-gate`. It must be triggered manually.

## Why

`windows-connector` changes are infrequent, and the connector source lives in
`dlpx-app-gate` (a repo with heavy, unrelated traffic) rather than in `linux-pkg`
itself. Auto-triggering on every push meant most builds were pure rebuild churn
with no source change, and any real build-health regression showed up
indistinguishably from that noise. Rather than add machinery to tell the two
apart, the trigger is removed and a human decides when to build and publish.

## How the trigger is disabled

`config.sh` sets:

```bash
DEFAULT_PACKAGE_GIT_URL="none"
```

This is read by the shared Job DSL (`devops-gate/jenkins/jobs/linux_pkg_build_package.groovy`)
to disable `post-push`'s push trigger — no devops-gate change was needed for this.
The job's own auto-generated description reflects it: "Triggers are disabled for
this job, so it must be run manually."

Source is still fetched from the real `dlpx-app-gate` repo. Since
`DEFAULT_PACKAGE_GIT_URL="none"` would otherwise make `PACKAGE_GIT_URL` resolve
to `"none"` too, `config.sh` overrides the `fetch()` hook to hardcode the real
URL directly instead of relying on that variable:

```bash
function fetch() {
PACKAGE_GIT_URL="https://github.com/delphix/dlpx-app-gate.git"
logmust fetch_repo_from_git
}
```

## Making a connector change and bumping the version

1. Make your change under `appliance/server/connector` or
`appliance/host/windows` in `dlpx-app-gate`.
2. Bump `project.ext.connectorDebVersion` in
`appliance/host/windows/build.gradle` — this is the deb packaging version,
independent of `connectorVersion` (bumped once per release).
3. Merge your `dlpx-app-gate` PR to `develop`.

## Testing before merging to develop

Use `git-ab-pre-push -b windows-connector` from your local `dlpx-app-gate`
checkout. It builds the package (including uncommitted local changes, via an
auto-snapshotted throwaway branch) and chains through combine-packages,
appliance-build, and integration tests — entirely isolated to
`dev-de-images`/`pre-push`-scoped paths. It never touches production
`snapshot-de-images`/`post-push`/`latest`.

## Publishing a new `latest` after merging

Once your change is merged to `develop`, manually trigger the real `post-push`
job so the new artifact gets published to develop's `latest`:

`linux-pkg/develop/build-package/windows-connector/post-push` — click **Build Now**.

## Known caveat

`GIT_HASH`/`BUILD_INFO` published alongside the artifact reflect the commit at
the time of the last *real* build, not necessarily current `develop` HEAD —
this is true regardless of whether a build was triggered automatically or
manually, and is a pre-existing limitation, not something this change
introduces.
Comment on lines +65 to +71

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I agree with the framing that this is a "caveat".. I view this as a feature, and working as intended..

I'm OK leaving it, just makes it seem like this is a defect, when it's actually the whole point of capturing that information at build time.. so we can map the package contents, to the source code that was used to generate it..

which, by design, will lag the app-gate develop branch for this package..

14 changes: 13 additions & 1 deletion packages/windows-connector/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,21 @@
#
# shellcheck disable=SC2034

DEFAULT_PACKAGE_GIT_URL="https://github.com/delphix/dlpx-app-gate.git"
#
# windows-connector's post-push job no longer auto-triggers on every
# dlpx-app-gate push (see README.md in this directory for why). Setting this
# to "none" tells the Job DSL to disable that job's push trigger; source is
# still fetched from the real repo via the fetch() override below, which
# doesn't depend on this variable.
#
DEFAULT_PACKAGE_GIT_URL="none"
SKIP_COPYRIGHTS_CHECK=true

function fetch() {
PACKAGE_GIT_URL="https://github.com/delphix/dlpx-app-gate.git"
logmust fetch_repo_from_git
}

function prepare() {
logmust install_pkgs \
openjdk-17-jdk-headless
Expand Down