Skip to content

Commit

Permalink
update to capture logs, make it work right
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Feb 6, 2025
1 parent c2886b7 commit c9894ff
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
25 changes: 20 additions & 5 deletions local-app/git-xargs/add-gpg-keys.edl.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
#!/bin/bash

LOGFILE="/tmp/git-xargs.$$.log"
USERS="hoad0300"
VERSION="1.0.4"
LOGFILE="/tmp/git-xargs.$XARGS_REPO_NAME.$$.log"
THIS=$(basname $0 .sh)

exec 3>&1 4>&2
trap 'exec 2>&4 1>&3' 0 1 2 3
exec 1>$LOGFILE 2>&1

USERS="house343 rudd0009 sung0005 vora0002"

echo "* starting $THIS v$VERSION at $(date)"
if [[ -d "init/git-secret" ]] && [[ -d ".gitsecret" ]]
then
git-secret reveal -f
for u in $USERS
do
echo "* copying user gpg key $u to init/git-secret/"
cp $HOME/terraform/support/keys/gpg-public-keys/$u.gpg.asc init/git-secret/
init/git-secret/setup-git-secret.sh $u
# bash init/git-secret/setup-git-secret.sh $u
done
git-secret hide
echo "* adding users and running hide"
(cd init/git-secret; bash setup-git-secret.sh)
status=$?
# git-secret hide
echo "* whoknows"
git-secret whoknows
fi
exit $?
echo "* ending $THIS v$VERSION at $(date) with status $status"
exit $status

## if [[ -d "init/git-secret" ]] && [[ -d ".gitsecret" ]]
## then
Expand Down
2 changes: 1 addition & 1 deletion local-app/git-xargs/submit.add-gpg-keys.edl.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GITHUB_HOSTNAME=github.e.it.census.gov GITHUB_OAUTH_TOKEN=ae2f950f5d628d665e6498bc699cdf24566bd94c git-xargs \
--branch-name master \
--skip-pull-requests \
--commit-message '[xargs] add gpg hoad0300' \
--commit-message '[xargs] add gpg for user users' \
--no-skip-ci \
--repos tf-repo.edl.txt \
"$(pwd)/add-gpg-keys.edl.sh" |& tee add-gpg-keys.edl.sh.$(date +%s).log

0 comments on commit c9894ff

Please sign in to comment.