Skip to content

Commit 99f0b80

Browse files
authored
Fix/breardon2011/workflow (#2460)
* wip working e2b remotes * add tfe engine, resolve api issue * add release * remove out of range terraform * remove out of range tf * remove local runner * error handling, tfe engine, some cleanup * fix some issues with opentofu spawning, remake templates * fix sidecar release * cleanup * fix side car timing * edit archiving to be compat across all versions * remove unnecessary var, adjust ui * sidecar workflow fix
1 parent 6fee69e commit 99f0b80

File tree

5 files changed

+46
-10
lines changed

5 files changed

+46
-10
lines changed

.github/workflows/sidecar-release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,27 @@ jobs:
5454
type=sha,prefix=sha-
5555
type=raw,value=latest,enable={{is_default_branch}}
5656
57+
- name: Set up Depot
58+
uses: depot/setup-action@v1
59+
5760
- name: Build and push Docker image
58-
uses: docker/build-push-action@v5
61+
id: build-push
62+
uses: depot/build-push-action@v1
5963
with:
64+
project: 43l6gkbwqm
65+
token: ${{ secrets.DEPOT_TOKEN }}
6066
context: ./sandbox-sidecar
6167
file: ./sandbox-sidecar/Dockerfile_sidecar
6268
push: ${{ github.event_name != 'pull_request' }}
6369
tags: ${{ steps.meta.outputs.tags }}
6470
labels: ${{ steps.meta.outputs.labels }}
65-
cache-from: type=gha
66-
cache-to: type=gha,mode=max
6771
platforms: linux/amd64,linux/arm64
6872

6973
- name: Generate artifact attestation
7074
if: github.event_name != 'pull_request'
7175
uses: actions/attest-build-provenance@v1
7276
with:
7377
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
74-
subject-digest: ${{ steps.build.outputs.digest }}
78+
subject-digest: ${{ steps.build-push.outputs.digest }}
7579
push-to-registry: true
7680

.github/workflows/taco-release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,6 @@ jobs:
187187
platforms: linux/amd64,linux/arm64
188188
tags: ${{ steps.docker-meta.outputs.tags }}
189189
labels: ${{ steps.docker-meta.outputs.labels }}
190-
cache-from: type=gha
191-
cache-to: type=gha,mode=max
192190
build-args: |
193191
COMMIT_SHA=${{ github.sha }}
194192
VERSION=${{ steps.meta.outputs.version }}

sandbox-sidecar/templates/build-all.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ async function main() {
2828

2929
await Template.build(buildTemplateObject(spec), {
3030
alias,
31-
cpuCount: 1,
32-
memoryMB: 1024,
31+
cpuCount: 2,
32+
memoryMB: 4096,
3333
onBuildLogs: defaultBuildLogger(),
3434
});
3535

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import "dotenv/config";
2+
import { Template, defaultBuildLogger } from "e2b";
3+
4+
async function main() {
5+
const alias = "opentaco-barebones";
6+
7+
console.log(`\n=== Building ${alias} (2 vCPU / 4GB) ===`);
8+
console.log("This is a minimal Ubuntu 22.04 template with no IaC tools pre-installed.");
9+
console.log("Use this as the fallback template for custom/unsupported versions.\n");
10+
11+
// Create a minimal Ubuntu template with just basic tools
12+
const template = Template()
13+
.fromUbuntuImage("22.04")
14+
.setUser("root")
15+
.runCmd("apt-get update && apt-get install -y wget unzip ca-certificates curl")
16+
.setUser("user");
17+
18+
await Template.build(template, {
19+
alias,
20+
cpuCount: 2,
21+
memoryMB: 4096,
22+
onBuildLogs: defaultBuildLogger(),
23+
});
24+
25+
console.log(`\n✅ Built ${alias}`);
26+
console.log(`\nTo use this template, set in your backend:`);
27+
console.log(`OPENTACO_E2B_BAREBONES_TEMPLATE_ID="${alias}"`);
28+
}
29+
30+
main().catch(err => {
31+
console.error(err);
32+
process.exit(1);
33+
});
34+

sandbox-sidecar/templates/manifest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ export interface TemplateSpec {
77
tplVersion: string;
88
}
99

10-
export const TEMPLATE_VERSION = "0.1.1"; // bump this when recipe changes
10+
export const TEMPLATE_VERSION = "0.1.2"; // bump this when recipe changes
1111

1212
export const TEMPLATES: TemplateSpec[] = [
1313
{ engine: "terraform", engineVersion: "1.0.11", tplVersion: TEMPLATE_VERSION },
1414
{ engine: "terraform", engineVersion: "1.3.9", tplVersion: TEMPLATE_VERSION },
15-
{ engine: "terraform", engineVersion: "1.5.5", tplVersion: TEMPLATE_VERSION },
15+
{ engine: "terraform", engineVersion: "1.5.7", tplVersion: TEMPLATE_VERSION },
1616
{ engine: "tofu", engineVersion: "1.6.0", tplVersion: TEMPLATE_VERSION },
1717
{ engine: "tofu", engineVersion: "1.10.0", tplVersion: TEMPLATE_VERSION },
1818
];

0 commit comments

Comments
 (0)