Skip to content

Commit

Permalink
RS-449: Install expect (#114)
Browse files Browse the repository at this point in the history
* Install expect
* Fix opening the PR in correct place
* Add LANG to SKIP_KEYS
  • Loading branch information
vikin91 authored Mar 3, 2022
1 parent 559955a commit 985de88
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
29 changes: 16 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ commands:
fi
popd
tag="$(.circleci/get_tag.sh "$flavor")"
# Open or update a PR and configure labels, assignees - this must happen before pushing code changes to the branch
.circleci/create_update_pr.sh \
"${branch_name}" \
"<< parameters.repo >>" \
"Update apollo-ci image" \
"Bump version of apollo-ci image used in CircleCI" \
"ci-upgrade-tests"
pushd "/tmp/<< parameters.repo >>"
sed -r -i "s@(.*)/apollo-ci:${prefix}[0-9].*@\1/apollo-ci:${tag} ${todo}@g" .circleci/config.yml
Expand All @@ -73,26 +82,20 @@ commands:
if [[ "$flavor" == "stackrox-build" ]] && [[ "<< parameters.repo >>" == "stackrox" ]]; then
echo "${tag} ${todo}" > BUILD_IMAGE_VERSION
git add BUILD_IMAGE_VERSION
fi
if git diff-index --quiet HEAD; then
if git diff-files --quiet; then
echo "There are no changes to commit in the dependent repo"
else
git commit -am "Bump apollo-ci:$flavor image tag to ${tag##:}"
printf "Committing diff:\n%s\n---End of diff" "$(git diff-files -p)"
# It may happen that the diff is empty and we still land in this if-branch (not sure why),
# thus adding `--allow-empty` to not fail the commiting in such cases
git commit --allow-empty -am "Bump apollo-ci:$flavor image tag to ${tag##:}"
git push origin "${branch_name}"
fi
done
git push origin "${branch_name}"
popd
# Open or update a PR and configure labels, assignees
.circleci/create_update_pr.sh \
"${branch_name}" \
"<< parameters.repo >>" \
"Update apollo-ci image" \
"Bump version of apollo-ci image used in CircleCI" \
"ci-upgrade-tests"
build-and-push-image:
parameters:
image-flavor:
Expand Down
1 change: 1 addition & 0 deletions images/circleci-tools/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const SKIP_KEYS = [
"HOME",
"IMAGE",
"INFLUXDB_USER",
"LANG",
"LOGNAME",
"MOTD_SHOWN",
"NO_PROXY",
Expand Down
1 change: 1 addition & 0 deletions images/rox.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ RUN set -ex \
&& apt-get install --no-install-recommends -y \
build-essential \
curl \
expect \
lsof \
openjdk-8-jdk-headless \
unzip \
Expand Down

0 comments on commit 985de88

Please sign in to comment.