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
2 changes: 2 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"matchDepNames": [
"apko",
"apm",
"aube",
"bazelisk",
"buf",
"buildx",
Expand Down Expand Up @@ -121,6 +122,7 @@
"matchDepNames": [
"apko",
"apm",
"aube",
"bazelisk",
"buf",
"buildx",
Expand Down
13 changes: 13 additions & 0 deletions docs/custom-registries.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ https://github.com/microsoft/apm/releases/download/v0.24.0/apm-linux-arm64.tar.g
https://github.com/microsoft/apm/releases/download/v0.24.0/apm-linux-arm64.tar.gz.sha256
```

## `aube`

Aube releases are downloaded from:

- `https://github.com/jdx/aube/releases`

Samples:

```txt
https://github.com/jdx/aube/releases/download/v1.41.0/aube-v1.41.0-aarch64-unknown-linux-gnu.tar.gz
https://github.com/jdx/aube/releases/download/v1.41.0/aube-v1.41.0-x86_64-unknown-linux-gnu.tar.gz
```

## `bazelisk`

Bazelisk releases are downloaded from:
Expand Down
1 change: 1 addition & 0 deletions packages/base/data/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"android-sdk-cmdline-tools": { "parent": "java" },
"apko": {},
"apm": {},
"aube": {},
"bazelisk": {},
"bower": { "type": "npm", "parent": "node", "deprecated": true },
"buf": {},
Expand Down
1 change: 1 addition & 0 deletions packages/base/src/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const tools = {
'android-sdk-cmdline-tools': { parent: 'java' },
apko: {},
apm: {},
aube: {},
bazelisk: {},
bower: { type: 'npm', parent: 'node', deprecated: true },
buf: {},
Expand Down
2 changes: 2 additions & 0 deletions src/cli/install-tool/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from '../services/index.ts';
import { ApkoInstallService } from '../tools/apko.ts';
import { ApmInstallService } from '../tools/apm.ts';
import { AubeInstallService } from '../tools/aube.ts';
import { BazeliskInstallService } from '../tools/bazelisk.ts';
import { BufInstallService } from '../tools/buf.ts';
import { BunInstallService } from '../tools/bun.ts';
Expand Down Expand Up @@ -119,6 +120,7 @@ async function prepareInstallContainer(): Promise<Container> {
container.bind(INSTALL_TOOL_TOKEN).to(AndroidSdkCmdlineToolsInstallService);
container.bind(INSTALL_TOOL_TOKEN).to(ApkoInstallService);
container.bind(INSTALL_TOOL_TOKEN).to(ApmInstallService);
container.bind(INSTALL_TOOL_TOKEN).to(AubeInstallService);
container.bind(INSTALL_TOOL_TOKEN).to(ComposerInstallService);
container.bind(INSTALL_TOOL_TOKEN).to(BazeliskInstallService);
container.bind(INSTALL_TOOL_TOKEN).to(BuildxInstallService);
Expand Down
45 changes: 45 additions & 0 deletions src/cli/tools/aube.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import fs from 'node:fs/promises';
import { join } from 'node:path';
import { injectFromHierarchy, injectable } from 'inversify';
import { BaseInstallService } from '../install-tool/base-install.service.ts';

@injectable()
@injectFromHierarchy()
export class AubeInstallService extends BaseInstallService {
readonly name = 'aube';

private get ghArch(): string {
switch (this.envSvc.arch) {
case 'arm64':
return 'aarch64';
case 'amd64':
return 'x86_64';
}
}

override async install(version: string): Promise<void> {
Comment thread
jonahsnider marked this conversation as resolved.
const baseUrl = `https://github.com/jdx/aube/releases/download/v${version}/`;
const filename = `aube-v${version}-${this.ghArch}-unknown-linux-gnu.tar.gz`;
const url = `${baseUrl}${filename}`;

const file = await this.http.download({ url });

await this.pathSvc.ensureToolPath(this.name);

const path = join(
await this.pathSvc.createVersionedToolPath(this.name, version),
'bin',
);
await fs.mkdir(path);
await this.compress.extract({ file, cwd: path });
}

override async link(version: string): Promise<void> {
const src = join(this.pathSvc.versionedToolPath(this.name, version), 'bin');
await this.shellwrapper({ srcDir: src });
}

override async test(_version: string): Promise<void> {
await this._spawn(this.name, ['--version']);
}
}
1 change: 1 addition & 0 deletions src/cli/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const NoPrepareTools = [
'android-sdk-cmdline-tools',
'apko',
'apm',
'aube',
'bazelisk',
'bower',
'buf',
Expand Down
20 changes: 20 additions & 0 deletions test/node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,25 @@ RUN set -ex; cd a; \
printf 'allowBuilds:\n re2: false\n' > pnpm-workspace.yaml; \
pnpm i

#--------------------------------------
# test: aube
#--------------------------------------
FROM build AS test-aube

# renovate: datasource=github-releases packageName=jdx/aube
RUN install-tool aube 1.41.0

RUN set -ex; cd aube; \
aube install; \
test -f node_modules/is-number/index.js; \
test -f postinstall-ran

RUN set -ex; cd aube; \
rm -rf node_modules postinstall-ran; \
aube install --ignore-scripts; \
test -f node_modules/is-number/index.js; \
test ! -e postinstall-ran

#--------------------------------------
# test: node 20
#--------------------------------------
Expand Down Expand Up @@ -651,6 +670,7 @@ FROM base
COPY --from=testa /.dummy /.dummy
COPY --from=testb /.dummy /.dummy
COPY --from=testc /.dummy /.dummy
COPY --from=test-aube /.dummy /.dummy
COPY --from=teste /.dummy /.dummy
COPY --from=testf /.dummy /.dummy
COPY --from=testg /.dummy /.dummy
Expand Down
24 changes: 24 additions & 0 deletions test/node/Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,29 @@ RUN install-tool yarn "${YARN_VERSION}"

RUN test "$(yarn --version)" = "${YARN_VERSION}"

#--------------------------------------
# Image: aube
#--------------------------------------
FROM test-node AS test-aube

# renovate: datasource=github-releases packageName=jdx/aube
RUN install-tool aube 1.41.0

COPY --chown=12021:0 test/node/test/aube /tmp/aube

USER 12021

RUN set -ex; cd /tmp/aube; \
aube install; \
test -f node_modules/is-number/index.js; \
test -f postinstall-ran

RUN set -ex; cd /tmp/aube; \
rm -rf node_modules postinstall-ran; \
aube install --ignore-scripts; \
test -f node_modules/is-number/index.js; \
test ! -e postinstall-ran

#--------------------------------------
# Image: renovate
#--------------------------------------
Expand Down Expand Up @@ -107,5 +130,6 @@ FROM base
COPY --from=test-node /.dummy /.dummy
COPY --from=test-pnpm /.dummy /.dummy
COPY --from=test-yarn /.dummy /.dummy
COPY --from=test-aube /.dummy /.dummy
COPY --from=test-renovate /.dummy /.dummy
COPY --from=test-vp /.dummy /.dummy
10 changes: 10 additions & 0 deletions test/node/test/aube/package.json
Comment thread
jonahsnider marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "containerbase-aube-test",
"private": true,
"scripts": {
"postinstall": "touch postinstall-ran"
},
"dependencies": {
"is-number": "7.0.0"
}
}