Skip to content

Attempting to reduce docs to single platform #1258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
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
12 changes: 12 additions & 0 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,15 @@ jobs:
name: assets
compression-level: 9
path: ./minio

- name: Publishing
uses: burnett01/rsync-deployments@7.0.2
with:
path: ./minio/
switches: --mkpath -rv --delete
remote_path: ${{ secrets.DEPLOY_PATH }}/${{ github.event.pull_request.head.ref }}
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_port: ${{ secrets.DEPLOY_PORT }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}
remote_key_pass: ${{ secrets.DEPLOY_KEY_PASS }}
42 changes: 0 additions & 42 deletions .github/workflows/minimal-build.yml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/pr-ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Staging

on:
pull_request:
type: ["opened","synchronize"]

jobs:
build-and-stage:

runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v4

- name: install-python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: pip-requirements
run: pip install -r requirements.txt

- name: npm-setup
uses: actions/setup-node@v4
with:
node-version: 20

- name: npm-install-setup
uses: bahmutov/npm-install@v1
with:
working-directory: ./

- name: build-docs
run: ./build-docs-ci.sh

- name: Staging
uses: burnett01/rsync-deployments@7.0.2
with:
path: ./minio/
switches: --mkpath -rv --delete
remote_path: ${{ secrets.DEPLOY_PATH }}/${{ github.event.pull_request.head.ref }}
remote_host: ${{ secrets.DEPLOY_HOST_STAGING }}
remote_port: ${{ secrets.DEPLOY_PORT }}
remote_user: ${{ secrets.DEPLOY_USER_STAGING }}
remote_key: ${{ secrets.DEPLOY_KEY_STAGING }}
remote_key_pass: ${{ secrets.DEPLOY_KEY_STAGING_PASS }}

- name: comment
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Staged at ${{ secrets.STAGING_URL }}/${{ github.event.pull_request.head.ref }}"
})


137 changes: 8 additions & 129 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,9 @@ stage-%:
exit 1; \
fi

@if [ ! $(shell command -v mc) ]; then \
echo "mc not found on this host, exiting" ; \
exit 1; \
fi

@if [ $(shell mc alias list --json docs-staging | jq '.status') = "error" ]; then \
echo "doc-staging alias not found on for host mc configuration, exiting" ; \
exit 1; \
fi
@(./stage.sh)

@if [ $(shell mc stat --json docs-staging/staging | jq '.status') = "error" ]; then \
echo "docs-staging/staging bucket not found, exiting" ; \
exit 1; \
fi

@echo "Copying contents of $(BUILDDIR)/$(GITDIR)/$*/html/* to docs-staging/staging/$(GITDIR)/$*/"
@mc cp -r $(BUILDDIR)/$(GITDIR)/$*/html/* docs-staging/staging/$(GITDIR)/$*/
@echo "Copy complete, visit $(STAGINGURL)/$(GITDIR)/$*/index.html"

# Commenting out the older method
# python -m http.server --directory $(BUILDDIR)/$(GITDIR)/$*/html/
Expand All @@ -65,12 +50,14 @@ stage-%:
# - Compile SCSS
# - Build docs via Sphinx

linux:
mindocs:
@echo "--------------------------------------"
@echo "Building for $@ Platform"
@echo " Building for MinIO "
@echo "--------------------------------------"
@cp source/default-conf.py source/conf.py
@make sync-deps
@make sync-operator-version
@make sync-deps
ifeq ($(SYNC_SDK),TRUE)
@make sync-sdks
else
Expand All @@ -80,91 +67,6 @@ endif
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)/$(GITDIR)/$@" $(SPHINXOPTS) $(O) -t $@
@echo -e "Building $@ Complete\n--------------------------------------\n"

windows:
@echo "--------------------------------------"
@echo "Building for $@ Platform"
@echo "--------------------------------------"
@cp source/default-conf.py source/conf.py
@make sync-deps
@npm run build
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)/$(GITDIR)/$@" $(SPHINXOPTS) $(O) -t $@
@echo -e "Building $@ Complete\n--------------------------------------\n"

macos:
@echo "--------------------------------------"
@echo "Building for $@ Platform"
@echo "--------------------------------------"
@cp source/default-conf.py source/conf.py
@make sync-deps
@npm run build
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)/$(GITDIR)/$@" $(SPHINXOPTS) $(O) -t $@
@echo -e "Building $@ Complete\n--------------------------------------\n"

k8s:
@echo "--------------------------------------"
@echo "Building for $@ Platform"
@echo "--------------------------------------"
@cp source/default-conf.py source/conf.py
@make sync-operator-version
@make sync-deps
@npm run build
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)/$(GITDIR)/$@" $(SPHINXOPTS) $(O) -t $@
@echo -e "Building $@ Complete\n--------------------------------------\n"

openshift:
@echo "--------------------------------------"
@echo "Building for $@ Platform"
@echo "--------------------------------------"
@cp source/default-conf.py source/conf.py
@make sync-operator-version
@make sync-deps
@npm run build
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)/$(GITDIR)/$@" $(SPHINXOPTS) $(O) -t $@ -t k8s
@echo -e "Building $@ Complete\n--------------------------------------\n"

eks:
@echo "--------------------------------------"
@echo "Building for $@ Platform"
@echo "--------------------------------------"
@cp source/default-conf.py source/conf.py
@make sync-operator-version
@make sync-deps
@npm run build
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)/$(GITDIR)/$@" $(SPHINXOPTS) $(O) -t $@ -t k8s
@echo -e "Building $@ Complete\n--------------------------------------\n"

gke:
@echo "--------------------------------------"
@echo "Building for $@ Platform"
@echo "--------------------------------------"
@cp source/default-conf.py source/conf.py
@make sync-operator-version
@make sync-deps
@npm run build
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)/$(GITDIR)/$@" $(SPHINXOPTS) $(O) -t $@ -t k8s
@echo -e "Building $@ Complete\n--------------------------------------\n"

aks:
@echo "--------------------------------------"
@echo "Building for $@ Platform"
@echo "--------------------------------------"
@cp source/default-conf.py source/conf.py
@make sync-operator-version
@make sync-deps
@npm run build
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)/$(GITDIR)/$@" $(SPHINXOPTS) $(O) -t $@ -t k8s
@echo -e "Building $@ Complete\n--------------------------------------\n"

container:
@echo "--------------------------------------"
@echo "Building for $@ Platform"
@echo "--------------------------------------"
@cp source/default-conf.py source/conf.py
@make sync-deps
@npm run build
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)/$(GITDIR)/$@" $(SPHINXOPTS) $(O) -t $@
@echo -e "Building $@ Complete\n--------------------------------------\n"

# Synchronization targets
# Note that the @case statements are required to account for differences between Linux and MacOS binaries
# Specifically, MacOS does not use GNU utils, so syntax is slightly different for things like sed
Expand Down Expand Up @@ -213,31 +115,8 @@ sync-minio-server-docs:
@(./sync-minio-server-docs.sh)

sync-minio-version:
@echo "Retrieving current MinIO version"
$(eval DEB = $(shell curl -s https://min.io/assets/downloads-minio.json | jq '.Linux."MinIO Server".amd64.DEB.download' | sed "s|linux-amd64|linux-amd64/archive|g"))
$(eval RPM = $(shell curl -s https://min.io/assets/downloads-minio.json | jq '.Linux."MinIO Server".amd64.RPM.download' | sed "s|linux-amd64|linux-amd64/archive|g"))
$(eval DEBARM64 = $(shell curl -s https://min.io/assets/downloads-minio.json | jq '.Linux."MinIO Server".arm64.DEB.download' | sed "s|linux-arm64|linux-arm64/archive|g"))
$(eval RPMARM64 = $(shell curl -s https://min.io/assets/downloads-minio.json | jq '.Linux."MinIO Server".arm64.RPM.download' | sed "s|linux-arm64|linux-arm64/archive|g"))
$(eval MINIO = $(shell curl --retry 10 -Ls -o /dev/null -w "%{url_effective}" https://github.com/minio/minio/releases/latest | sed "s/https:\/\/github.com\/minio\/minio\/releases\/tag\///"))

@$(eval kname = $(shell uname -s))

@case "${kname}" in \
"Darwin") \
sed -i "" "s|MINIOLATEST|${MINIO}|g" source/conf.py; \
sed -i "" "s|DEBURL|${DEB}|g" source/conf.py; \
sed -i "" "s|RPMURL|${RPM}|g" source/conf.py; \
sed -i "" "s|DEBARM64URL|${DEBARM64}|g" source/conf.py; \
sed -i "" "s|RPMARM64URL|${RPMARM64}|g" source/conf.py; \
;; \
*) \
sed -i "s|MINIOLATEST|${MINIO}|g" source/conf.py; \
sed -i "s|DEBURL|${DEB}|g" source/conf.py; \
sed -i "s|RPMURL|${RPM}|g" source/conf.py; \
sed -i "s|DEBARM64URL|${DEBARM64}|g" source/conf.py; \
sed -i "s|RPMARM64URL|${RPMARM64}|g" source/conf.py; \
;; \
esac
@echo "Retrieving MinIO latest version and download URLs"
@(./sync-minio-version.sh)

sync-sdks:
@(./sync-docs.sh)
Expand All @@ -249,7 +128,7 @@ sync-operator-crd:
sync-deps:
# C++ and Rust repos do not have any releases yet.
@echo "Synchronizing all external dependencies"
@make sync-minio-version
# @make sync-minio-version
@make sync-kes-version
@make sync-minio-server-docs

Expand Down
16 changes: 0 additions & 16 deletions build-docs-ci-minimal.sh

This file was deleted.

34 changes: 4 additions & 30 deletions build-docs-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,10 @@
set -ex

export PATH=${PATH}:${HOME}/.local/bin
export GITDIR=main
export GITDIR=$(git rev-parse --symbolic-full-name --abbrev-ref HEAD)


make SYNC_SDK=TRUE linux
make windows macos container k8s openshift eks aks gke
make SYNC_SDK=TRUE mindocs

mkdir -p minio/kubernetes/upstream
cp -vr build/${GITDIR}/k8s/html/* ./minio/kubernetes/upstream/

mkdir -p minio/kubernetes/eks
cp -vr build/${GITDIR}/eks/html/* ./minio/kubernetes/eks/


mkdir -p minio/kubernetes/gke
cp -vr build/${GITDIR}/gke/html/* ./minio/kubernetes/gke/

mkdir -p minio/kubernetes/aks
cp -vr build/${GITDIR}/aks/html/* ./minio/kubernetes/aks/

mkdir -p minio/kubernetes/openshift
cp -vr build/${GITDIR}/openshift/html/* ./minio/kubernetes/openshift/

mkdir -p minio/container
cp -vr build/${GITDIR}/container/html/* ./minio/container/

mkdir -p minio/linux
cp -vr build/${GITDIR}/linux/html/* ./minio/linux/

mkdir -p minio/macos
cp -vr build/${GITDIR}/macos/html/* ./minio/macos/

mkdir -p minio/windows
cp -vr build/${GITDIR}/windows/html/* ./minio/windows/
mkdir -p minio/
cp -vr build/${GITDIR}/mindocs/html/* ./minio/
Loading