Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions grr/config/grr_response_templates/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ fi
md5fingerprint=$(md5sum "${RELEASE_FILE}" | cut -d" " -f1)

# Upload tarball, make public
gsutil cp "${RELEASE_FILE}" "gs://${BUCKET}/"
gsutil acl ch -u AllUsers:R "gs://${BUCKET}/${RELEASE_TAR}"
gcloud storage cp "${RELEASE_FILE}" "gs://${BUCKET}/"
gcloud storage objects update "gs://${BUCKET}/${RELEASE_TAR}" --add-acl-grant=entity=allUsers,role=READER

sed -i -e "s!</body></html>!<a href=\"${RELEASE_TAR}#md5=${md5fingerprint}\">${RELEASE_NAME}</a><br/>\n</body></html>!" index.html

gsutil cp index.html "gs://${BUCKET}/"
gsutil acl ch -u AllUsers:R "gs://${BUCKET}/index.html"
gcloud storage cp index.html "gs://${BUCKET}/"
gcloud storage objects update "gs://${BUCKET}/index.html" --add-acl-grant=entity=allUsers,role=READER

echo "Test install with:"
echo "pip install --no-cache-dir -f https://storage.googleapis.com/${BUCKET}/index.html grr-response-templates==${VERSION}"
2 changes: 1 addition & 1 deletion terraform/demo/google/server_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LINUX_INSTALLER_UPLOAD_URL=$(curl http://metadata.google.internal/computeMetadat
if [[ "${grr_version}" = "latest" ]]; then
wget "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-273.0.0-linux-x86_64.tar.gz"
tar -xzf ./google-cloud-sdk-273.0.0-linux-x86_64.tar.gz -C .
./google-cloud-sdk/bin/gsutil cp gs://autobuilds.grr-response.com/_latest_server_deb/*.deb .
./google-cloud-sdk/bin/gcloud storage cp gs://autobuilds.grr-response.com/_latest_server_deb/*.deb .
GRR_VERSION=$(ls *.deb | sed 's/.*\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\-\([0-9]\+\).*/\1.\2.\3.\4/')
else
GRR_VERSION="${grr_version}"
Expand Down
Loading