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

binaries.tgz is missing ssm-session-worker and logger #3

Open
mdaniel opened this issue Jun 22, 2020 · 1 comment
Open

binaries.tgz is missing ssm-session-worker and logger #3

mdaniel opened this issue Jun 22, 2020 · 1 comment

Comments

@mdaniel
Copy link

mdaniel commented Jun 22, 2020

Foremost, thank you, thank you, thank you for this fork!

The "artefacts" manifest present on the release page is built from static text, and not the actual output of tree or tar or something executable, meaning it says that it includes ssm-session-worker but in fact does not:

$ bash -ex ./opsgang-release-binaries.sh
+ echo '... copying built binaries ' amazon-ssm-agent ssm-cli ssm-document-worker ssm-session-logger ssm-session-worker
+ cp -a /go/src/github.com/aws/amazon-ssm-agent/bin/linux_amd64/amazon-ssm-agent /go/src/github.com/aws/amazon-ssm-agent/bin/linux_amd64/ssm-cli /go/src/github.com/aws/amazon-ssm-agent/bin/linux_amd64/ssm-document-worker /go/src/github.com/aws/amazon-ssm-agent/opsgang/bin
## ...
+ tar czvf /go/src/github.com/aws/amazon-ssm-agent/release-artefacts/binaries.tgz -C /go/src/github.com/aws/amazon-ssm-agent/opsgang/bin .
./
./ssm-cli
./amazon-ssm-agent
./ssm-document-worker
+ tar czvf /go/src/github.com/aws/amazon-ssm-agent/release-artefacts/default-cfgs.tgz -C /go/src/github.com/aws/amazon-ssm-agent/opsgang etc

as best I can tell, this is caused by using a hard-coded shell expansion instead of the ls -1 | grep -v updater output used directly above it:

    cp -a $d/bin/linux_amd64/{amazon-ssm-agent,ssm-cli,ssm-document-worker} $bin_dir
@mdaniel
Copy link
Author

mdaniel commented Jun 22, 2020

it didn't feel like it deserved its own issue, but there is also a variable assignment that prevents the build-binaries.sh script from being able to run under set -euo pipefail:

--- opsgang-build-binaries.sh~  2020-06-22 13:49:37.569240417 -0700
+++ opsgang-build-binaries.sh   2020-06-22 13:51:22.233874799 -0700
@@ -34,8 +34,8 @@
     echo "INFO $0: ... making agent modules available in libs dirs"
     ln -s `pwd` `pwd`/vendor/src/github.com/aws/amazon-ssm-agent
 
-    echo "INFO $0: ... updating VERSION to $version because amazon did not bother ..."
     version=$(version_from_branch $(git_branch)) || return 1
+    echo "INFO $0: ... updating VERSION to $version because amazon did not bother ..."
     echo "$version" >VERSION
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant