Skip to content

Commit

Permalink
📂 update Red Hat specific files
Browse files Browse the repository at this point in the history
  • Loading branch information
lance committed Oct 20, 2023
1 parent 2a6f74e commit 4cbfad9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 68 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM registry.access.redhat.com/ubi9/go-toolset@sha256:e91cbbd0b659498d029dd43e050c8a009c403146bfba22cbebca8bcd0ee7925f AS builder
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:82d9bc5d3ceb43635288880f26207201e55d1c688a60ebbfff4f54d4963a62a1 AS builder
ENV APP_ROOT=/opt/app-root
ENV GOPATH=$APP_ROOT

Expand All @@ -29,20 +29,21 @@ RUN go build -ldflags "${SERVER_LDFLAGS}" ./cmd/timestamp-server
RUN CGO_ENABLED=0 go build -gcflags "all=-N -l" -ldflags "${SERVER_LDFLAGS}" -o timestamp-server_debug ./cmd/timestamp-server

# debug compile options & debugger
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:e91cbbd0b659498d029dd43e050c8a009c403146bfba22cbebca8bcd0ee7925f as debug
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:82d9bc5d3ceb43635288880f26207201e55d1c688a60ebbfff4f54d4963a62a1 as debug
RUN go install github.com/go-delve/delve/cmd/[email protected]

# overwrite server and include debugger
COPY --from=builder /opt/app-root/src/timestamp-server_debug /usr/local/bin/timestamp-server

# Multi-Stage production build
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:e91cbbd0b659498d029dd43e050c8a009c403146bfba22cbebca8bcd0ee7925f as deploy
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:82d9bc5d3ceb43635288880f26207201e55d1c688a60ebbfff4f54d4963a62a1 as deploy

LABEL description="The timestamp-authority is a process that provides a timestamp record of when a document was created or modified."
LABEL io.k8s.description="The timestamp-authority is a process that provides a timestamp record of when a document was created or modified."
LABEL io.k8s.display-name="Timestamp-authority container image for Red Hat Trusted Signer."
LABEL io.openshift.tags="TSA trusted-signer."
LABEL summary="Provides a timestamp-authority image."
LABEL com.redhat.component="timestamp-authority"

# Retrieve the binary from the previous stage
COPY --from=builder /opt/app-root/src/timestamp-server /usr/local/bin/timestamp-server
Expand Down
51 changes: 0 additions & 51 deletions redhat/overlays/Dockerfile

This file was deleted.

22 changes: 8 additions & 14 deletions redhat/release/update-to-head.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,16 @@ robot_trigger_msg=":robot: triggering CI on branch '${redhat_ref}' after synchin
# Reset release-next to upstream main or <git-ref>.
git fetch upstream $upstream_ref
if [[ "$upstream_ref" == "main" ]]; then
git checkout upstream/main -B ${redhat_ref}
git checkout upstream/main -B ${redhat_ref}-ci
else
git checkout $upstream_ref -B ${redhat_ref}
git checkout $upstream_ref -B ${redhat_ref}-ci
fi

# RHTAP writes its pipeline files to the root of ${redhat_ref}
# Fetch those from origin and merge them into the ci branch
git fetch origin $redhat_ref
git merge origin/$redhat_ref --no-edit

# Update redhat's main and take all needed files from there.
git fetch origin $midstream_ref
git checkout origin/$midstream_ref $custom_files
Expand All @@ -67,27 +72,16 @@ if [[ -d redhat/patches ]]; then
git apply redhat/patches/*
fi

# RHTAP writes its pipeline files to the root of ${redhat_ref}
# Fetch those from origin and apply them to the the release branch
# since we just wiped out our local copy with the upstream ref.
git fetch origin $redhat_ref
git checkout origin/$redhat_ref .tekton

# Move overlays to root
if [[ -d redhat/overlays ]]; then
if [[ -f redhat/overlays/Dockerfile ]]; then
git rm Dockerfile
fi
git mv redhat/overlays/* .
mv redhat/overlays/* .
fi

git add . # Adds applied patches
git add $custom_files # Adds custom files
git commit -m "${redhat_files_msg}"

# Trigger CI
# TODO: Set up openshift or github CI to run on release-next-ci
git checkout "${redhat_ref}" -B "${redhat_ref}"-ci
date > ci
git add ci
git commit -m "${robot_trigger_msg}"
Expand Down

0 comments on commit 4cbfad9

Please sign in to comment.