Skip to content

Commit

Permalink
chore(ci): test w/umask 0077
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Kolberg <[email protected]>
  • Loading branch information
amdprophet committed Dec 4, 2024
1 parent 7b2d780 commit 54c81b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# specific to each workflow. This ensures that each package has an
# OTC_BUILD_NUMBER that is greater than previous runs which allows package
# upgrades from one build to the next.
name: 'Build packages'
name: "Build packages"

# Sets the name of the CI run based on whether the run was triggered with or
# without a workflow_id set.
Expand All @@ -16,7 +16,7 @@ run-name: >
on:
push:
branches:
- 'main'
- "main"
pull_request:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Set output workflow
id: workflow
run: |
echo "id=${{ inputs.workflow_id || steps.latest-workflow.outputs.id }}" >> $GITHUB_OUTPUT
echo "id=${{ inputs.workflow_id || steps.latest-workflow.outputs.id }}" >> $GITHUB_OUTPUT
- name: Output Remote Workflow URL
run: echo ::notice title=Remote Workflow URL::https://github.com/SumoLogic/sumologic-otel-collector/actions/runs/${{ steps.workflow.outputs.id }}
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
- name: Run install script tests (*nix)
if: steps.changed-files.outputs.any_changed == 'true' && runner.os != 'Windows'
working-directory: install-script/test
run: make test
run: umask 0077 && make test

- name: Run install script tests (Windows)
shell: powershell
Expand Down
4 changes: 3 additions & 1 deletion install-script/test/command_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ func exitCode(cmd *exec.Cmd) (int, error) {
}

func runScript(ch check) (int, []string, []string, error) {
cmd := exec.Command("bash", ch.installOptions.string()...)
opts := []string{"umask", "007", "&&"}
opts = append(opts, ch.installOptions.string()...)
cmd := exec.Command("bash", opts...)
cmd.Env = ch.installOptions.buildEnvs()
output := []string{}

Expand Down

0 comments on commit 54c81b1

Please sign in to comment.