Skip to content
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

Add github yamllint workflow [v3.28] #9474

Merged
merged 1 commit into from
Nov 14, 2024
Merged
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
35 changes: 35 additions & 0 deletions .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Lint YAML files present in the repository.
#
# Currently we only lint semaphore yaml files, to
# avoid excessive confusion from developers by
# throwing unnecessary warnings or errors on arbitrary
# yaml files.
#
# If you want to lint other YAML files in this
# repository, *add a second workflow* and make
# sure that you're specifying file paths in the
# on:pull_request section and in the `with:file_or_dir`
# section of the block itself.
---
name: Yaml Lint
on: # yamllint disable-line rule:truthy
pull_request:
paths:
- '.semaphore/**/*.yml'
- '.semaphore/.yamllint.yml'

jobs:
lintSemaphoreYaml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: yaml-lint
uses: ibiqlik/action-yamllint@v3
with:
file_or_dir: .semaphore/**/*.yml
config_file: .semaphore/.yamllint.yml
- uses: actions/upload-artifact@v4
if: always()
with:
name: yamllint-logfile
path: ${{ steps.yaml-lint.outputs.logfile }}
8 changes: 8 additions & 0 deletions .semaphore/.yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: default

rules:
line-length: disable
document-start: disable
empty-lines: disable
indentation:
indent-sequences: whatever
65 changes: 31 additions & 34 deletions .semaphore/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,38 @@ agent:
machine:
type: f1-standard-2
os_image: ubuntu2004

execution_time_limit:
minutes: 10

blocks:
- name: Clean up GCE resources
dependencies: []
task:
prologue:
commands:
- checkout
- export GOOGLE_APPLICATION_CREDENTIALS=$HOME/secrets/secret.google-service-account-key.json
- export SHORT_WORKFLOW_ID=$(echo ${SEMAPHORE_WORKFLOW_ID} | sha256sum | cut -c -8)
- export ZONE=europe-west3-c
- export VM_PREFIX=sem-${SEMAPHORE_PROJECT_NAME}-${SHORT_WORKFLOW_ID}-
- echo VM_PREFIX=${VM_PREFIX}
jobs:
- name: Clean up GCE instances
commands:
- cd felix
- ./.semaphore/clean-up-vms ${VM_PREFIX}
secrets:
- name: google-service-account-for-gce

- name: Clean up windows resources
dependencies: []
task:
prologue:
commands:
- checkout
- az login --service-principal -u "${AZ_SP_ID}" -p "${AZ_SP_PASSWORD}" --tenant "${AZ_TENANT_ID}" --output none
- cd process/testing/util
jobs:
- name: Clean up windows felix resources
- name: Clean up GCE resources
dependencies: []
task:
prologue:
commands:
- ./delete-az-rg.sh ${USER}-capz-win-felix-${SEMAPHORE_WORKFLOW_ID:0:8}-rg
secrets:
- name: banzai-secrets
- checkout
- export GOOGLE_APPLICATION_CREDENTIALS=$HOME/secrets/secret.google-service-account-key.json
- export SHORT_WORKFLOW_ID=$(echo ${SEMAPHORE_WORKFLOW_ID} | sha256sum | cut -c -8)
- export ZONE=europe-west3-c
- export VM_PREFIX=sem-${SEMAPHORE_PROJECT_NAME}-${SHORT_WORKFLOW_ID}-
- echo VM_PREFIX=${VM_PREFIX}
jobs:
- name: Clean up GCE instances
commands:
- cd felix
- ./.semaphore/clean-up-vms ${VM_PREFIX}
secrets:
- name: google-service-account-for-gce
- name: Clean up windows resources
dependencies: []
task:
prologue:
commands:
- checkout
- az login --service-principal -u "${AZ_SP_ID}" -p "${AZ_SP_PASSWORD}" --tenant "${AZ_TENANT_ID}" --output none
- cd process/testing/util
jobs:
- name: Clean up windows felix resources
commands:
- ./delete-az-rg.sh ${USER}-capz-win-felix-${SEMAPHORE_WORKFLOW_ID:0:8}-rg
secrets:
- name: banzai-secrets
3 changes: 0 additions & 3 deletions .semaphore/license-scanning/fossa-scan.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
version: v1.0
name: Run Fossa Scan

agent:
machine:
type: f1-standard-2
os_image: ubuntu2004

execution_time_limit:
minutes: 30

blocks:
- name: "Trigger Fossa Scan"
skip:
Expand Down
3 changes: 0 additions & 3 deletions .semaphore/push-images/alp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ agent:
machine:
type: f1-standard-2
os_image: ubuntu2004

execution_time_limit:
minutes: 60

global_job_config:
env_vars:
- name: DEV_REGISTRIES
Expand All @@ -32,7 +30,6 @@ global_job_config:
- echo $DOCKER_TOKEN | docker login --username "$DOCKER_USER" --password-stdin
- echo $QUAY_TOKEN | docker login --username "$QUAY_USER" --password-stdin quay.io
- export BRANCH_NAME=$SEMAPHORE_GIT_BRANCH

blocks:
- name: Publish ALP images
dependencies: []
Expand Down
3 changes: 0 additions & 3 deletions .semaphore/push-images/apiserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ agent:
machine:
type: f1-standard-2
os_image: ubuntu2004

execution_time_limit:
minutes: 60

global_job_config:
env_vars:
- name: DEV_REGISTRIES
Expand All @@ -32,7 +30,6 @@ global_job_config:
- echo $DOCKER_TOKEN | docker login --username "$DOCKER_USER" --password-stdin
- echo $QUAY_TOKEN | docker login --username "$QUAY_USER" --password-stdin quay.io
- export BRANCH_NAME=$SEMAPHORE_GIT_BRANCH

blocks:
- name: Publish apiserver images
dependencies: []
Expand Down
3 changes: 0 additions & 3 deletions .semaphore/push-images/calicoctl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ agent:
machine:
type: f1-standard-2
os_image: ubuntu2004

execution_time_limit:
minutes: 60

global_job_config:
env_vars:
- name: DEV_REGISTRIES
Expand All @@ -32,7 +30,6 @@ global_job_config:
- echo $DOCKER_TOKEN | docker login --username "$DOCKER_USER" --password-stdin
- echo $QUAY_TOKEN | docker login --username "$QUAY_USER" --password-stdin quay.io
- export BRANCH_NAME=$SEMAPHORE_GIT_BRANCH

blocks:
- name: Publish calicoctl images
dependencies: []
Expand Down
3 changes: 0 additions & 3 deletions .semaphore/push-images/cni-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ agent:
machine:
type: f1-standard-2
os_image: ubuntu2004

execution_time_limit:
minutes: 60

global_job_config:
env_vars:
- name: DEV_REGISTRIES
Expand All @@ -32,7 +30,6 @@ global_job_config:
- echo $DOCKER_TOKEN | docker login --username "$DOCKER_USER" --password-stdin
- echo $QUAY_TOKEN | docker login --username "$QUAY_USER" --password-stdin quay.io
- export BRANCH_NAME=$SEMAPHORE_GIT_BRANCH

blocks:
- name: Publish cni-plugin images
dependencies: []
Expand Down
3 changes: 0 additions & 3 deletions .semaphore/push-images/key-cert-provisioner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ agent:
machine:
type: f1-standard-2
os_image: ubuntu2004

execution_time_limit:
minutes: 60

global_job_config:
env_vars:
- name: DEV_REGISTRIES
Expand All @@ -32,7 +30,6 @@ global_job_config:
- echo $DOCKER_TOKEN | docker login --username "$DOCKER_USER" --password-stdin
- echo $QUAY_TOKEN | docker login --username "$QUAY_USER" --password-stdin quay.io
- export BRANCH_NAME=$SEMAPHORE_GIT_BRANCH

blocks:
- name: Publish key-cert-provisioner images
dependencies: []
Expand Down
3 changes: 0 additions & 3 deletions .semaphore/push-images/kube-controllers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ agent:
machine:
type: f1-standard-2
os_image: ubuntu2004

execution_time_limit:
minutes: 60

global_job_config:
env_vars:
- name: DEV_REGISTRIES
Expand All @@ -32,7 +30,6 @@ global_job_config:
- echo $DOCKER_TOKEN | docker login --username "$DOCKER_USER" --password-stdin
- echo $QUAY_TOKEN | docker login --username "$QUAY_USER" --password-stdin quay.io
- export BRANCH_NAME=$SEMAPHORE_GIT_BRANCH

blocks:
- name: Publish kube-controllers images
dependencies: []
Expand Down
3 changes: 0 additions & 3 deletions .semaphore/push-images/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ agent:
machine:
type: f1-standard-4
os_image: ubuntu2004

execution_time_limit:
minutes: 60

global_job_config:
env_vars:
- name: DEV_REGISTRIES
Expand All @@ -32,7 +30,6 @@ global_job_config:
- echo $DOCKER_TOKEN | docker login --username "$DOCKER_USER" --password-stdin
- echo $QUAY_TOKEN | docker login --username "$QUAY_USER" --password-stdin quay.io
- export BRANCH_NAME=$SEMAPHORE_GIT_BRANCH

blocks:
- name: "Publish node images"
dependencies: []
Expand Down
3 changes: 0 additions & 3 deletions .semaphore/push-images/pod2daemon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ agent:
machine:
type: f1-standard-2
os_image: ubuntu2004

execution_time_limit:
minutes: 60

global_job_config:
env_vars:
- name: DEV_REGISTRIES
Expand All @@ -32,7 +30,6 @@ global_job_config:
- echo $DOCKER_TOKEN | docker login --username "$DOCKER_USER" --password-stdin
- echo $QUAY_TOKEN | docker login --username "$QUAY_USER" --password-stdin quay.io
- export BRANCH_NAME=$SEMAPHORE_GIT_BRANCH

blocks:
- name: Publish pod2daemon images
dependencies: []
Expand Down
3 changes: 0 additions & 3 deletions .semaphore/push-images/typha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ agent:
machine:
type: f1-standard-2
os_image: ubuntu2004

execution_time_limit:
minutes: 60

global_job_config:
env_vars:
- name: DEV_REGISTRIES
Expand All @@ -32,7 +30,6 @@ global_job_config:
- echo $DOCKER_TOKEN | docker login --username "$DOCKER_USER" --password-stdin
- echo $QUAY_TOKEN | docker login --username "$QUAY_USER" --password-stdin quay.io
- export BRANCH_NAME=$SEMAPHORE_GIT_BRANCH

blocks:
- name: Publish typha images
dependencies: []
Expand Down
Loading