Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker make targets dont appear to work correctly #171

Open
3 tasks done
aidenvaines-bjss opened this issue Jul 24, 2024 · 2 comments · May be fixed by #172
Open
3 tasks done

Docker make targets dont appear to work correctly #171

aidenvaines-bjss opened this issue Jul 24, 2024 · 2 comments · May be fixed by #172
Labels
bug Something isn't working triage

Comments

@aidenvaines-bjss
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing Issues

Current Behavior

The docker related make targets don't appear to work correctly you get

# make runner-act-workflow
source ./scripts/docker/docker.lib.sh
make: source: No such file or directory
make: *** [runner-act-workflow] Error 1

I believe the reason behind this is the docker targets have a flaw in that they use 'source' which is not POSIX compliant, its a bash built-in and not all shells support it. The POSIX compliant way is to use . (https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Bourne-Shell-Builtins)

Expected Behavior

# make runner-act workflow=cicd-1-pull-request job=commit-stage
INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///var/run/docker.sock' 
[1. CI/CD pull request/Set CI/CD metadata] 🚀  Start image=ghcr.io/catthehacker/ubuntu:full-latest

[1. CI/CD pull request/Set CI/CD metadata]   🐳  docker pull image=ghcr.io/catthehacker/ubuntu:full-latest platform=linux/amd64 username= forcePull=fa

Steps To Reproduce

make runner-act workflow=cicd-1-pull-request job=commit-stage

Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Sensitive Information Declaration

  • I confirm that neither PII/PID nor sensitive data are included in this form
@aidenvaines-bjss aidenvaines-bjss added bug Something isn't working triage labels Jul 24, 2024
@aidenvaines-bjss aidenvaines-bjss linked a pull request Jul 24, 2024 that will close this issue
10 tasks
@Tomdango
Copy link

I've also recently setup a project and I'm seeing these errors - it is also affecting the pre-commit config for Terraform, meaning that for now the Git hooks have to be bypassed on commits, and I'm reliant on the CI to catch any problems here.

@regularfry
Copy link
Contributor

So I believe https://github.com/nhs-england-tools/repository-template/blob/main/scripts/init.mk#L88 ought to be responsible for making that work. Can we understand why it isn't?

I can't see anything wrong with the proposed fix, but there might be something important we're missing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants