Skip to content

Commit af428c7

Browse files
committed
fix: shell setup
1 parent 49ba858 commit af428c7

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

integration/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ RUN --mount=type=cache,target=/go/pkg/mod/ \
1111
CGO_ENABLED=0 go build -o /bin/hackstack .
1212

1313
# ========== CLI SETUP STAGE ==========
14-
FROM ubuntu:22.04 AS setup
14+
FROM ubuntu:22.04 AS env-setup
15+
SHELL ["/bin/bash", "-c"]
1516

1617
ENV DEBIAN_FRONTEND=noninteractive
1718
RUN apt-get update && \
@@ -27,6 +28,7 @@ ARG GROUP_ID=1000
2728
RUN addgroup --gid $GROUP_ID ${USERNAME} && \
2829
adduser --disabled-password --gecos '' --uid ${USER_ID} --gid ${GROUP_ID} ${USERNAME}
2930

31+
FROM env-setup AS workspace-setup
3032
USER ${USERNAME}
3133
ENV HOME=/home/${USERNAME}
3234
ARG PROJECT_DIR="${HOME}/projects"
@@ -36,7 +38,8 @@ COPY examples/ ./examples/
3638
RUN mkdir -p "${PROJECT_DIR}/backend" "${PROJECT_DIR}/cli"
3739

3840
# ========== APP RUN STAGE ==========
39-
FROM setup AS app
41+
FROM workspace-setup AS app
42+
SHELL ["/usr/bin/env", "bash", "-c"]
4043

4144
ENTRYPOINT [ "/bin/hackstack" ]
4245
CMD ["--help"]

integration/justfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,21 @@ hackstack *args:
3535

3636
# Run the full test suite
3737
test-all: test-base test-build
38-
@echo "hackstack CLI integration test completed!"
38+
@echo "Hackstack CLI integration test completed!"
3939

40+
# Base tests to verify the CLI is working and accessible
4041
test-base:
4142
#!/usr/bin/env bash
4243
just hackstack --version | grep -n "hackstack"
4344
just hackstack --help 2>&1 | grep -n "hackstack"
4445

46+
# Test the build command with a sample datasource
4547
test-build:
4648
#!/usr/bin/env bash
4749
just hackstack build --help
48-
just hackstack -vv build backend \
50+
just hackstack -vvv build backend \
4951
--output "/home/testuser/projects/backend" \
5052
--source examples/datasource.yaml
51-
just hackstack -vv build cli \
53+
just hackstack -vvv build cli \
5254
--output "/home/testuser/projects/cli" \
5355
--source examples/datasource.yaml

0 commit comments

Comments
 (0)