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
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ tests:
test:
- chain: openshift-mcp-server-mcpchecker-eval-vertex
workflow: ipi-aws
- as: fast-forward-latest-release
cron: 0 6 * * *
steps:
env:
DESTINATION_BRANCH: release-0.5
workflow: openshift-mcp-server-fastforward
zz_generated_metadata:
branch: main
org: openshift
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
periodics:
- agent: kubernetes
cluster: build01
cron: 0 6 * * *
decorate: true
decoration_config:
sparse_checkout_files:
- .ci-operator.yaml
- Dockerfile.ci
extra_refs:
- base_ref: main
org: openshift
repo: openshift-mcp-server
sparse_checkout_files:
- .ci-operator.yaml
- Dockerfile.ci
labels:
ci.openshift.io/generator: prowgen
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: periodic-ci-openshift-openshift-mcp-server-main-fast-forward-latest-release
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --lease-server-credentials-file=/etc/boskos/credentials
- --report-credentials-file=/etc/report/credentials
- --target=fast-forward-latest-release
command:
- ci-operator
env:
- name: HTTP_SERVER_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest
imagePullPolicy: Always
name: ""
ports:
- containerPort: 8080
name: http
resources:
requests:
cpu: 10m
volumeMounts:
- mountPath: /etc/boskos
name: boskos
readOnly: true
- mountPath: /secrets/gcs
name: gcs-credentials
readOnly: true
- mountPath: /secrets/manifest-tool
name: manifest-tool-local-pusher
readOnly: true
- mountPath: /etc/pull-secret
name: pull-secret
readOnly: true
- mountPath: /etc/report
name: result-aggregator
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: boskos
secret:
items:
- key: credentials
path: credentials
secretName: boskos-credentials
- name: manifest-tool-local-pusher
secret:
secretName: manifest-tool-local-pusher
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

set -euo pipefail

HOME="$(mktemp -d -t ff-XXXXX)"
export HOME
cd

log_file="${ARTIFACT_DIR}/fastforward.log"
log() {
echo "$(date --iso-8601=seconds)" "$@" | tee -a "$log_file"
}

# git_wrapper invokes the `git` CLI with
# - creds in a way that doesn't reveal them in logs, env, or process table.
# - logging
git_wrapper() {
git -c credential.helper= -c credential.helper='!f() { echo username=openshift-merge-robot; printf password=; cat /etc/github/oauth; echo; }; f' "$@" 2>&1 | tee -a "$log_file"
}

log "INFO Fast-forward settings"
log " REPO_OWNER = $REPO_OWNER"
log " REPO_NAME = $REPO_NAME"
log " SOURCE_BRANCH = $SOURCE_BRANCH"
log " DESTINATION_BRANCH = $DESTINATION_BRANCH"

repo_url="https://github.com/${REPO_OWNER}/${REPO_NAME}.git"

log "INFO Cloning $DESTINATION_BRANCH"
git_wrapper clone -b "$DESTINATION_BRANCH" "$repo_url"
cd "$REPO_NAME"

log "INFO Pulling $SOURCE_BRANCH into $DESTINATION_BRANCH (ff-only)"
git_wrapper pull --ff-only origin "$SOURCE_BRANCH"

log "INFO Pushing to origin/$DESTINATION_BRANCH"
git_wrapper push

log "INFO Fast-forward complete"
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"path": "openshift/mcp-server/fastforward/openshift-mcp-server-fastforward-ref.yaml",
"owners": {
"approvers": [
"2uasimojo",
"bentito",
"cajieh",
"Cali0707",
"dlom",
"grokspawn",
"manusa",
"matzew",
"Kaustubh-pande",
"wking"
],
"reviewers": [
"2uasimojo",
"bentito",
"cajieh",
"Cali0707",
"dlom",
"grokspawn",
"manusa",
"matzew",
"Kaustubh-pande"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ref:
as: openshift-mcp-server-fastforward
from_image:
name: "5.0"
namespace: ocp
tag: cli
commands: openshift-mcp-server-fastforward-commands.sh
resources:
requests:
cpu: 100m
memory: 100Mi
credentials:
- namespace: ci
name: github-credentials-openshift-merge-robot
mount_path: /etc/github
env:
- name: SOURCE_BRANCH
default: "main"
documentation: |-
The branch to fast-forward FROM.
- name: DESTINATION_BRANCH
default: ""
documentation: |-
The branch to fast-forward TO. Required.
documentation: |-
Fast-forwards a source branch to a destination branch in the
openshift/openshift-mcp-server GitHub repo using openshift-merge-robot
credentials.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"path": "openshift/mcp-server/fastforward/openshift-mcp-server-fastforward-workflow.yaml",
"owners": {
"approvers": [
"2uasimojo",
"bentito",
"cajieh",
"Cali0707",
"dlom",
"grokspawn",
"manusa",
"matzew",
"Kaustubh-pande",
"wking"
],
"reviewers": [
"2uasimojo",
"bentito",
"cajieh",
"Cali0707",
"dlom",
"grokspawn",
"manusa",
"matzew",
"Kaustubh-pande"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
workflow:
as: openshift-mcp-server-fastforward
steps:
test:
- ref: openshift-mcp-server-fastforward
documentation: |-
Fast-forwards a source branch to a destination branch in the
openshift/openshift-mcp-server GitHub repo.