Skip to content

Commit

Permalink
Merge pull request #69 from privacysandbox/release-0.49.0
Browse files Browse the repository at this point in the history
Release 0.49.0
  • Loading branch information
jamesewoo authored Oct 30, 2023
2 parents b3eb65b + da68f99 commit d8ff8bf
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 20 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.

## 0.49.0 (2023-10-27)


### Features

* Add wrk2 to test-tools image
* Extend normalize-bazel-symlink to normalize within containers


### Dependencies

* **deps:** Update versions in test-tools image

## 0.48.0 (2023-10-11)


Expand Down
26 changes: 15 additions & 11 deletions images/test-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,35 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM alpine:3.16 as builder
FROM alpine:3.18 as slowhttptest_builder
# hadolint ignore=DL3018
RUN apk add --no-cache build-base git openssl-dev autoconf automake
RUN apk add --no-cache autoconf automake build-base git openssl-dev
WORKDIR /build
ADD https://github.com/shekyan/slowhttptest/archive/refs/tags/v1.9.0.tar.gz /build
RUN tar xz --strip-components 1 -f v1.9.0.tar.gz && ls -l && ./configure && make
ADD https://github.com/shekyan/slowhttptest/archive/refs/tags/v1.9.0.tar.gz /build/src.tar.gz
RUN tar xz --strip-components 1 -f src.tar.gz && ./configure && make

FROM golang:1.19.4-alpine3.17 AS golang
FROM alpine:3.18 as wrk_builder
# hadolint ignore=DL3018
RUN apk add --no-cache autoconf automake build-base git openssl-dev zlib-dev
WORKDIR /build
ADD https://github.com/giltene/wrk2/archive/44a94c17d8e6a0bac8559b53da76848e430cb7a7.tar.gz /build/wrk.tar.gz
RUN tar xz --strip-components 1 -f wrk.tar.gz && make -j6

FROM golang:1.21-alpine3.18 AS golang
ENV BUILD_ARCH="${TARGETARCH}" \
GOBIN=/usr/local/go/bin
COPY build_golang_apps /scripts/
RUN /scripts/build_golang_apps

FROM fullstorydev/grpcurl:v1.8.7 AS grpcurl
FROM alpine:3.17.2
FROM fullstorydev/grpcurl:v1.8.9-alpine AS grpcurl

FROM alpine:3.18
COPY --from=golang /usr/local/go/bin/* /usr/local/bin/
COPY --from=grpcurl /bin/grpcurl /usr/local/bin/

ARG TARGETARCH
ENV BUILD_ARCH="${TARGETARCH}" \
PATH="${PATH}:/usr/local/go/bin" \
GOBIN=/usr/local/go/bin

COPY install_apps /scripts/

RUN /scripts/install_apps
COPY --from=builder /build/src/slowhttptest /usr/bin/
COPY --from=slowhttptest_builder /build/src/slowhttptest /usr/bin/
2 changes: 1 addition & 1 deletion tests/data/hashes/test-tools
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e19aaa4e08668be8056a6064e27be159ee7e158b3a90d75b7c4e5483369ebe41
48ec49fead076d09cfeaad6de7466d33300972e8f9a678c99d16321ac5ae74a4
26 changes: 19 additions & 7 deletions tools/normalize-bazel-symlinks
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

if [[ -f /.dockerenv ]]; then
printf "Running inside Docker container? This script is only designed to be executed outside docker\n" &>/dev/stderr
exit 1
fi

declare -r BAZEL_CACHE_DIR="${HOME}/.cache/bazel"

function normalize_symlink() {
Expand All @@ -26,17 +21,34 @@ function normalize_symlink() {
return
fi
local -r link_path="$(readlink "${link_name}")"
local -r output_user_root="${link_path///bazel_root\/}"
local -r output_user_root="${link_path///bazel_root/}"
rm -f "${link_name}"
ln -s "${BAZEL_CACHE_DIR}/${output_user_root}" "${link_name}"
}

function normalize_symlink_docker() {
declare -r link_name="$1"
if readlink --canonicalize-existing "${link_name}" &>/dev/null ; then
printf "symlink %s resolves fully, skipping\n" "${link_name}"
return
fi
local -r link_path="$(readlink "${link_name}")"
local -r output_user_root="${link_path##*/.cache/bazel/}"
rm -f "${link_name}"
ln -s "/bazel_root/${output_user_root}" "${link_name}"
}

declare _normalize_fn=normalize_symlink
if [[ -f /.dockerenv ]]; then
_normalize_fn=normalize_symlink_docker
fi

declare -a -r LINK_DIRS=(
bazel-bin
bazel-out
bazel-testlogs
bazel-workspace
)
for link in "${LINK_DIRS[@]}"; do
normalize_symlink "${link}"
${_normalize_fn} "${link}"
done
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.48.0
0.49.0

0 comments on commit d8ff8bf

Please sign in to comment.