chore(dre): Cleanup old and now unused trustworthy metrics structs #1563
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: | |
push: | |
branches: | |
- "main" | |
tags: | |
- "v*" | |
paths-ignore: | |
- "release-index.yaml" | |
- "replica-releases/**" | |
- "node-labels/**" | |
pull_request: | |
paths-ignore: | |
- "release-index.yaml" | |
- "replica-releases/**" | |
- "node-labels/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
bazel: | |
runs-on: | |
labels: dre-runner-custom | |
# This image is based on ubuntu:20.04 | |
container: ghcr.io/dfinity/dre/actions-runner:2864b49b24203b5842420ca31f7a4eb33e4076ce | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: "π Ensure singular opentelemetry version in Cargo.lock" | |
shell: bash | |
run: test "$(grep -n 'name = "opentelemetry"' Cargo.lock | wc -l)" -le 1 | |
- name: "βοΈ Setup runner" | |
uses: ./.github/workflows/manage-runner-pre | |
######################################## | |
# Build and test | |
######################################## | |
- name: "π Building" | |
uses: ./.github/workflows/build | |
with: | |
ssh_pk_workflow: ${{ secrets.SSH_PK_WORKFLOW }} | |
- run: bazel test ... | |
name: "π Testing" | |
######################################## | |
# Upload test artifacts | |
######################################## | |
- name: "π§ͺ Upload test artifacts" | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-artifacts | |
path: bazel-out/k8-opt/bin/rs/ic-observability/multiservice-discovery/multiservice-discovery | |
######################################## | |
# Prepare release | |
######################################## | |
- name: "π’ Prepare release" | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
uses: ./.github/workflows/prepare-release | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
######################################## | |
# Upload container images | |
######################################## | |
- name: "π§ Login to GitHub Container Registry" | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: "π¦ Push images to GitHub Container Registry" | |
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.head_ref, 'container') || startsWith(github.ref, 'refs/heads/container') || (github.ref == 'refs/heads/main') }} | |
run: bazel query --noshow_progress 'kind("oci_push", ...)' | xargs -I_target bazel run _target -- --tag ${GITHUB_SHA} | |
######################################## | |
# Check if dashboard/* changed to see if | |
# it also needs to be updated in k8s | |
######################################## | |
- name: "β Check if dashboard/* changed in last commit" | |
id: check | |
uses: ./.github/workflows/check-modified-files-as-step | |
with: | |
path: dashboard/* | |
- name: "π² Setting correct paths to update" | |
id: paths | |
shell: bash | |
run: | | |
files=( | |
bases/apps/ic-release-controller/sts.yaml | |
bases/apps/mainnet-dashboard/backend/base/deployment.yaml | |
bases/apps/mainnet-dashboard/statefulset-slack.yaml | |
bases/apps/service-discovery/service-discovery.yaml | |
gitlab-ci/vector-configs.yml | |
) | |
if [[ $changed == "true" ]]; then | |
echo "Adding frontend to list of files" | |
files+=( bases/apps/mainnet-dashboard/frontend/deployment.yaml ) | |
else | |
echo "Skipping adding of frontend to list of files" | |
fi | |
echo "Output of this step:" | |
echo ${files[@]} | |
echo "files=${files[@]}" >> $GITHUB_ENV | |
######################################## | |
# Update k8s deployments | |
######################################## | |
- name: "π€ Update k8s deployments" | |
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.head_ref, 'container') || startsWith(github.ref, 'refs/heads/container') || (github.ref == 'refs/heads/main') }} | |
uses: ./.github/workflows/update-k8s-deployments | |
with: | |
gitlab_api_token: ${{ secrets.GITLAB_K8S_API_TOKEN }} | |
######################################## | |
# Deploy to github pages | |
######################################## | |
- name: "π’ Deploy to GitHub Pages" | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: | | |
git config --global user.email "actions@github.com" | |
git config --global user.name "GitHub Actions" | |
bazel run "//:mkdocs" -- gh-deploy --force | |
######################################## | |
# Clean up runner | |
######################################## | |
- uses: ./.github/workflows/manage-runner-post | |
name: "πͺ Tear down runner" | |
if: ${{ !startsWith(runner.name, 'dre-runner-custom') }} | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |