Skip to content

Weekly

Weekly #158

Workflow file for this run

name: Weekly
on:
schedule:
- cron: "0 0 * * 6" # Runs every saturday at midnight
pull_request:
paths:
- .github/workflows/weekly-test.yaml
permissions:
contents: read
actions: read
jobs:
test-on-fips:
name: Integration tests on FIPS machine
strategy:
fail-fast: false
matrix:
os: ["jammy", "noble"]
arch: ["amd64"]
channel: ["latest/edge"]
uses: ./.github/workflows/e2e-tests.yaml
with:
arch: ${{ matrix.arch }}
os: ${{ matrix.os }}
channel: ${{ matrix.channel }}
test-tags: 'up_to_weekly'
substrate: 'multipass'
extra-test-env: 'TEST_MULTIPASS_CLOUD_INIT=ubuntu-pro-fips-stig-${{ matrix.os }}.yaml,TEST_USE_LOCAL_MIRROR=0,TEST_PRELOAD_SNAPS=0,TEST_SKIP_CLEANUP=1'
secrets:
UBUNTU_PRO_TOKEN: ${{ secrets.UBUNTU_PRO_TOKEN }}
LAUNCHPAD_K8S_CI_BOT_PASSWORD: ${{ secrets.LAUNCHPAD_K8S_CI_BOT_PASSWORD }}
cncf:
name: CNCF conformance test
strategy:
fail-fast: false
matrix:
os: ["ubuntu:22.04", "ubuntu:24.04"]
arch: ["amd64"]
channel: ["latest/edge"]
uses: ./.github/workflows/e2e-tests.yaml
with:
arch: ${{ matrix.arch }}
os: ${{ matrix.os }}
channel: ${{ matrix.channel }}
test-tags: 'conformance_tests'
Mattermost:
name: Notify Mattermost
# Notify on success or failure but only if the event is a scheduled run.
# We don't want to ping people of failed PRs.
if: ${{ always() && github.event_name == 'schedule' }}
# Note: Update results check below if you change the "needs" list.
needs: [test-on-fips]
runs-on: ubuntu-latest
steps:
- name: Set current formatted date as env variable
run: echo "FORMATTED_DATE=$(date +'%d/%m/%Y')" >> $GITHUB_ENV
- name: Test results
run: |
RESULTS=$(echo '${{ toJson(needs) }}' | jq -c '[.[] | .result]')
if echo $RESULTS | jq -e 'all(. == "success")'; then
echo "RESULT=success" >> $GITHUB_ENV
else
echo "RESULT=failure" >> $GITHUB_ENV
fi
- name: Generate Mattermost Message
run: |
if [[ "${{ env.RESULT }}" == "success" ]]; then
echo "MM_TEXT=:white_check_mark: *Success!* CI completed successfully. [View Run](${{
github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_ENV
else
echo "MM_TEXT=:x: *Failure!* CI failed, @k8s-engineers please fix ASAP. [View Run](${{
github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_ENV
fi
- name: Notify Mattermost
uses: mattermost/action-mattermost-notify@master
with:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_BOT_WEBHOOK_URL }}
PAYLOAD: |
{
"attachments": [
{
"fallback": "k8s-snap Weekly CI Status",
"color": "${{ env.RESULT == 'success' && 'good' || 'danger' }}",
"title": "k8s-snap Weekly CI Status - ${{ env.FORMATTED_DATE }}",
"text": "${{ env.MM_TEXT }}"
}
]
}