diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42d393f76..6c11ad813 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -175,7 +175,7 @@ jobs: - name: Install python uses: actions/setup-python@v3 with: - python-version: '3.x' + python-version: '3.11' - name: Install click run: | @@ -194,7 +194,7 @@ jobs: with: filters: | docs: - - '**' + - 'doc/**' - name: Prepare user build image if: needs.update-base-images.outputs.build-rebuilt == 'True' || steps.filter.outputs.docs == 'true' @@ -204,18 +204,30 @@ jobs: --build-image ${{ needs.image-names.outputs.build-image }} \ --user-build-image ${{ needs.image-names.outputs.user-build-image }} - - name: Build and publish + - name: Build docs if: needs.update-base-images.outputs.build-rebuilt == 'True' || steps.filter.outputs.docs == 'true' run: | - ./admin/local/cli/qserv build-docs --cmake --linkcheck --upload \ + ./admin/local/cli/qserv build-docs --cmake --linkcheck \ --user-build-image ${{ needs.image-names.outputs.user-build-image }} env: - QSERV_LTD_USERNAME: ${{ secrets.LTD_USERNAME }} - QSERV_LTD_PASSWORD: ${{ secrets.LTD_PASSWORD }} QSERV_GH_EVENT_NAME: ${{ github.event_name }} QSERV_GH_HEAD_REF: ${{ github.head_ref }} QSERV_GH_REF: ${{ github.ref }} + # Only attempt documentation uploads for tagged releases and pull + # requests from ticket branches in the same repository. This avoids + # version clutter in the docs and failures when a PR doesn't have access + # to secrets. + - name: Upload to LSST the Docs + uses: lsst-sqre/ltd-upload@v1 + with: + project: "qserv" + dir: "build/doc/html" + username: ${{ secrets.LTD_USERNAME }} + password: ${{ secrets.LTD_PASSWORD }} + if: > + (github.event_name != 'pull_request' || startsWith(github.head_ref, 'tickets/')) + && (needs.update-base-images.outputs.build-rebuilt == 'True' || steps.filter.outputs.docs == 'true') update-run-image: name: Update Qserv image diff --git a/.github/workflows/ci.yml.old b/.github/workflows/ci.yml.old deleted file mode 100644 index 6a9e84052..000000000 --- a/.github/workflows/ci.yml.old +++ /dev/null @@ -1,143 +0,0 @@ -# @npease says: this GitHub actions CI code was originally written by @fjammes. -# I rewrote it, basically entirely, to use the `qserv` CLI command, in ci.yml. -# But I didn't want to lose what Fabrice had written, at least not right away. -# This workflow contains end-to-end test steps that we may want to re-enable. - -# - name: Declare Version Variables -# id: vars -# shell: bash -# run: | -# IMAGE="qserv/lite-qserv:$(git describe --dirty --always)" -# echo "IMAGE=${IMAGE}" >> $GITHUB_ENV -# echo "Build and test Qserv image: $IMAGE" -# - name: Build Qserv base images -# run: | -# ./admin/tools/docker/base/build.sh -# - name: Build Qserv image -# run: | -# ./admin/tools/docker/ci/build.sh -# mkdir -p artifacts -# docker save "${{ env.IMAGE }}" > artifacts/qserv-image.tar -# echo "${{ env.IMAGE }}" > artifacts/qserv-image-tag -# - uses: actions/upload-artifact@v2 -# with: -# name: qserv-image -# path: artifacts - # image-analysis: - # name: Analyze image - # runs-on: ubuntu-18.04 - # needs: build - # steps: - # - name: Download image - # uses: actions/download-artifact@v2 - # with: - # name: qserv-image - # path: artifacts - # - name: Load image in local registry - # run: | - # docker load --input artifacts/qserv-image.tar - # echo "IMAGE=$(cat artifacts/qserv-image-tag)" >> $GITHUB_ENV - # - name: Scan operator image - # uses: anchore/scan-action@v2 - # with: - # image: "${{ env.IMAGE }}" - # acs-report-enable: true - # - name: upload Anchore scan SARIF report - # uses: github/codeql-action/upload-sarif@v1 - # with: - # sarif_file: results.sarif - # e2e: - # name: Run end to end test on qserv - # runs-on: ubuntu-18.04 - # needs: build - # steps: - # - name: Download image - # uses: actions/download-artifact@v2 - # with: - # name: qserv-image - # path: artifacts - # - name: Load image in local registry - # run: | - # docker load --input artifacts/qserv-image.tar - # echo "IMAGE=$(cat artifacts/qserv-image-tag)" >> $GITHUB_ENV - # - name: apparmor - # run: | - # set -x - # sudo apt-get remove mysql-server --purge - # sudo apt-get install apparmor-profiles - # sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - # - name: Create k8s/kind cluster - # run: | - # git clone --depth 1 -b "k8s-v1.20.2" --single-branch https://github.com/k8s-school/kind-helper.git - # ./kind-helper/k8s-create.sh -s - # - name: Load container image inside kind - # run: | - # kind load image-archive artifacts/qserv-image.tar - # docker exec -- kind-control-plane crictl image - # - run: | - # kubectl get nodes - # - name: Install kustomize - # run: | - # VERSION="4.0.5" - # curl -lO "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/main/hack/install_kustomize.sh" - # chmod +x ./install_kustomize.sh - # sudo rm -f /usr/local/bin/kustomize - # sudo ./install_kustomize.sh "$VERSION" /usr/local/bin - # - name: Checkout qserv-operator code - # uses: actions/checkout@v2 - # with: - # repository: "lsst/qserv-operator" - # ref: "DM-29567-0" - # - name: Deploy Qserv operator - # run: | - # kubectl apply -f manifests/operator.yaml - # - name: Deploy Qserv - # run: | - # QSERV_IMAGE="${{ env.IMAGE }}" - # cat < manifests/base/image.yaml - # apiVersion: qserv.lsst.org/v1alpha1 - # kind: Qserv - # metadata: - # name: qserv - # spec: - # czar: - # image: $QSERV_IMAGE - # dbImage: "qserv/lite-mariadb:2021.04.0" - # dashboard: - # image: qserv/dashboard:2021.04.0 - # worker: - # image: $QSERV_IMAGE - # dbImage: "qserv/lite-mariadb:2021.04.0" - # replication: - # image: $QSERV_IMAGE - # dbImage: "qserv/lite-mariadb:2021.04.0" - # xrootd: - # image: $QSERV_IMAGE - # EOF - # kubectl apply -k manifests/base - # - name: Wait for Qserv to start - # run: ./tests/tools/wait-qserv-ready.sh - # - name: Run E2E Tests - # run: ./tests/e2e/integration.sh - # push: - # name: Push Qserv image to registry - # runs-on: ubuntu-20.04 - # needs: e2e - # steps: - # - name: Login to DockerHub - # uses: docker/login-action@v1 - # with: - # username: ${{ secrets.DOCKER_USERNAME }} - # password: ${{ secrets.DOCKER_TOKEN }} - # - name: Download qserv-operator image - # uses: actions/download-artifact@v2 - # with: - # name: qserv-image - # path: artifacts - # - name: Load image in local registry - # run: | - # docker load --input artifacts/qserv-image.tar - # echo "IMAGE=$(cat artifacts/qserv-image-tag)" >> $GITHUB_ENV - # - name: Push image to Docker Hub - # run: | - # docker push ${{ env.IMAGE }} diff --git a/.github/workflows/null.yml b/.github/workflows/null.yml deleted file mode 100644 index 729507a51..000000000 --- a/.github/workflows/null.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Empty check for branch protection - -on: - push: - branches: - - main - pull_request: - -jobs: - null_check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3