File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
1617ENV DEBIAN_FRONTEND=noninteractive
1718RUN apt-get update && \
@@ -27,6 +28,7 @@ ARG GROUP_ID=1000
2728RUN 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
3032USER ${USERNAME}
3133ENV HOME=/home/${USERNAME}
3234ARG PROJECT_DIR="${HOME}/projects"
@@ -36,7 +38,8 @@ COPY examples/ ./examples/
3638RUN 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
4144ENTRYPOINT [ "/bin/hackstack" ]
4245CMD ["--help" ]
Original file line number Diff line number Diff line change @@ -35,19 +35,21 @@ hackstack *args:
3535
3636# Run the full test suite
3737test-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
4041test-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
4547test-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
You can’t perform that action at this time.
0 commit comments