Skip to content
Merged
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
2 changes: 1 addition & 1 deletion owlbot-postprocessor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN apt-get update \
&& apt-get -y autoremove \
&& apt-get -y autoclean
RUN mkdir /ruby-postprocessor \
&& gem install toys:0.21.0 rexml:3.4.4
&& gem install toys:0.21.0 rexml:3.4.4 json:2.19.2
WORKDIR /ruby-postprocessor
COPY lib/*.rb /ruby-postprocessor/
COPY lib/owlbot /ruby-postprocessor/owlbot
Expand Down
15 changes: 15 additions & 0 deletions owlbot-postprocessor/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
steps:
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: '/bin/bash'
args:
- '-c'
- |
PREV_DIGEST=$(gcloud container images list-tags gcr.io/cloud-devrel-public-resources/owlbot-ruby --filter="tags=latest" --format="value(digest)" 2>/dev/null || true)
if [ ! -z "$PREV_DIGEST" ]; then
HEX_DIGEST=${PREV_DIGEST#sha256:}
echo "Previous latest digest found: $PREV_DIGEST. Adding deprecation tag..."
gcloud container images add-tag gcr.io/cloud-devrel-public-resources/owlbot-ruby@$PREV_DIGEST gcr.io/cloud-devrel-public-resources/owlbot-ruby:deprecated-public-image-$HEX_DIGEST --quiet
else
echo "No previous latest image found to deprecate."
fi
- name: 'gcr.io/cloud-builders/docker'
entrypoint: '/bin/bash'
args:
- '-c'
- |
docker build \
-t gcr.io/cloud-devrel-public-resources/owlbot-ruby:${_VERSION} \
-t gcr.io/cloud-devrel-public-resources/owlbot-ruby:public-image-${_VERSION} \
-t gcr.io/cloud-devrel-public-resources/owlbot-ruby:latest \
-f owlbot-postprocessor/Dockerfile \
owlbot-postprocessor
images:
- 'gcr.io/cloud-devrel-public-resources/owlbot-ruby:${_VERSION}'
- 'gcr.io/cloud-devrel-public-resources/owlbot-ruby:public-image-${_VERSION}'
- 'gcr.io/cloud-devrel-public-resources/owlbot-ruby:latest'
2 changes: 1 addition & 1 deletion owlbot-postprocessor/test/test_owlbot_releases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def run_process cmd, output: false
::FileUtils.rm_rf repo_dir
::FileUtils.mkdir_p repo_dir
::Dir.chdir repo_dir do
run_process ["git", "init"]
run_process ["git", "init", "--ref-format=files"]
run_process ["git", "commit", "--allow-empty", "-m", "commit 1"]
run_process ["git", "commit", "--allow-empty", "-m", "commit 2"]
end
Expand Down
Loading