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

Fix #3167 change ownership of files in build/ #3168

Merged
merged 2 commits into from
Dec 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion libbeat/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ testsuite: clean collect
$(MAKE) benchmark-tests
$(MAKE) coverage-report

if [ $(TEST_ENVIRONMENT) = true ]; then \
$(MAKE) fix-permissions; \
fi

# Generates a coverage report from the existing coverage files
.PHONY: coverage-report
coverage-report:
Expand Down Expand Up @@ -405,11 +409,15 @@ package: package-setup
fi

SNAPSHOT=${SNAPSHOT} BUILDID=${BUILDID} BEAT_DIR=${BEAT_DIR} BUILD_DIR=${BUILD_DIR} $(MAKE) -C ${ES_BEATS}/dev-tools/packer ${PACKAGES} ${BUILD_DIR}/upload/build_id.txt

$(MAKE) fix-permissions
echo "Finished packages for ${BEATNAME}"

package-dashboards: package-setup
mkdir -p ${BUILD_DIR}
cp -r _meta/kibana ${BUILD_DIR}/dashboards
# build the dashboards package
BEATNAME=${BEATNAME} BUILD_DIR=${BUILD_DIR} SNAPSHOT=$(SNAPSHOT) $(MAKE) -C ${ES_BEATS}/dev-tools/packer package-dashboards ${shell pwd}/build/upload/build_id.txt

fix-permissions:
# Change ownership of all files inside /build folder from root/root to current user/group
docker run -v ${BUILD_DIR}:/build alpine:3.4 sh -c "chown -R $(shell id -u):$(shell id -g) /build"