-
Notifications
You must be signed in to change notification settings - Fork 46
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
plugin refactor for v4 #101
base: master
Are you sure you want to change the base?
Conversation
080a90b
to
1112d7e
Compare
looking for volunteers to test if anyone has some time ... |
89c6c32
to
b6b999a
Compare
5893fee
to
ad34599
Compare
cef88b1
to
cdab737
Compare
Is there anything I can do in order to get a review. I understand it's a big change, but I'm confident that the tests ensure functionality. I would like to get some feedback about running this plugin on Windows tho. I'm also open to change parts of the input attributes, mentioned above. |
Sorry for the delay in looking at this (been super busy for the last few weeks). I built the plugin, installed it manually and created a test packer file using docker as the source. My packer file is super simple, so I have not tested every single option/knob, but I think the change is pretty solid from looking at the code: packer {
required_plugins {
docker = {
version = ">= 1.0.10"
source = "github.com/hashicorp/docker"
}
goss = {
version = "0.0.1"
source = "github.com/YaleUniversity/goss"
}
}
}
source "docker" "ubuntu" {
image = "ubuntu:jammy"
commit = true
}
build {
name = "learn-packer"
sources = [
"source.docker.ubuntu"
]
provisioner "shell" {
environment_vars = [
"FOO=hello world",
]
inline = [
"echo $PWD",
"apt update",
"apt install -y curl",
"echo Adding file to Docker Container",
"echo \"FOO is $FOO\" > example.txt",
]
}
provisioner "goss" {}
} goss.yaml: file:
example.txt:
exists: true Result:
|
Any reviewers who can review and approve this? |
I'll take a look through the code @FalcoSuessgott @F21. It may take me a few days to get to it all as I am fairly busy on projects here at the University. |
Just to note: Added wiz vulnerability scanning tool to the university org, waiting on that to do its security scanning assessment before I approve. The scanning report should show up here on the PR. |
Thanks so much for your time and effort. |
46e7c22
to
101813b
Compare
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
5b80eac
to
e19754e
Compare
Alrighty, squashed the commits and removed the plugin docs stuff for now, as I want to have these in a separate PR. wiz found 1 vuln., which I fixed. Looking good from my side :) |
found a bug when working with paths: amazon-ebs.ubuntu: Detecting wether "tmp/goss.yaml" includes other gossfiles ...
amazon-ebs.ubuntu: Found [node_exporter_tests.yml] referenced in "tmp/goss.yaml"
amazon-ebs.ubuntu: Uploading [tmp/goss.yaml node_exporter_tests.yml] to target system ....
amazon-ebs.ubuntu: Uploading "tmp/goss.yaml" to "/tmp/tmp/goss.yaml"
amazon-ebs.ubuntu: Uploading "node_exporter_tests.yml" to "/tmp/node_exporter_tests.yml"
amazon-ebs.ubuntu: Running goss validate ...
amazon-ebs.ubuntu: Error: no matched files were found: "/tmp/tmp/node_exporter_tests.yml" gonna fix it and set it again for review |
Did you ever fix that bug? |
Hi @btassone I just started a new job so have been kind of busy. But will try to fix it this weekend, it was just a small thing when copying files to the target machine, nothing major. Will give you a heads up once done |
e19754e
to
725b061
Compare
Stupid me, that bug was due to running |
94bbc4b
to
d21973a
Compare
d21973a
to
a39867c
Compare
1cb2693
to
2c8c91a
Compare
2c8c91a
to
7103dc3
Compare
v4
)