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

Run prettier on the pipeline yaml files #2979

Merged
merged 3 commits into from
Aug 1, 2023
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
37 changes: 19 additions & 18 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,31 @@ run:

issues:
exclude-rules:
- linters:
- staticcheck
text: "SA1019: codec.BasicHandle is deprecated"
# This is set to false to disregard the default EXC0011 exclusion
# which shadows all the ST* checks. Refer https://github.com/golangci/golangci-lint/issues/2281
- path: "pkg/client/(.+)\\.go"
linters:
- importas
- path: "(.+/)?zz_generated_(.+)\\.go"
linters:
- importas
- path: "pkg/operator/(clientset|mocks)/(.+)\\.go"
linters:
- importas
- path: "pkg/util/mocks/(.+)\\.go"
linters:
- importas
- linters:
- staticcheck
text: "SA1019: codec.BasicHandle is deprecated"
# This is set to false to disregard the default EXC0011 exclusion
# which shadows all the ST* checks. Refer https://github.com/golangci/golangci-lint/issues/2281
- path: "pkg/client/(.+)\\.go"
linters:
- importas
- path: "(.+/)?zz_generated_(.+)\\.go"
linters:
- importas
- path: "pkg/operator/(clientset|mocks)/(.+)\\.go"
linters:
- importas
- path: "pkg/util/mocks/(.+)\\.go"
linters:
- importas
exclude-use-default: false

linters-settings:
stylecheck:
# added additional checks for comments in Go.
# Refer https://staticcheck.io/docs/options#checks for details
checks: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022"]
checks:
["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022"]
dot-import-whitelist:
- github.com/onsi/ginkgo/v2
- github.com/onsi/gomega
Expand Down
202 changes: 101 additions & 101 deletions .pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,132 +15,132 @@
trigger:
branches:
include:
- master
- master
paths:
exclude:
- docs/*
- docs/*
tags:
include:
- v2*
- v2*

pr:
branches:
include:
- master
- master
paths:
exclude:
- docs/*
- docs/*

resources:
containers:
- container: golang
image: registry.access.redhat.com/ubi8/go-toolset:1.18
options: --user=0
- container: python
image: registry.access.redhat.com/ubi8/python-39:latest
options: --user=0
- container: golang
image: registry.access.redhat.com/ubi8/go-toolset:1.18
options: --user=0
- container: python
image: registry.access.redhat.com/ubi8/python-39:latest
options: --user=0

variables:
- template: vars.yml
- template: vars.yml

jobs:
- job: Golang_CodeQL
pool:
name: 1es-aro-ci-pool
variables:
HOME: $(Agent.BuildDirectory)
steps:
- template: ./templates/template-checkout.yml
- template: ./templates/template-codeql.yml
parameters:
language: go
target: golang
github_token: $(github_codeql_upload_token)
timeoutInMinutes: 120
- job: Golang_CodeQL
pool:
name: 1es-aro-ci-pool
variables:
HOME: $(Agent.BuildDirectory)
steps:
- template: ./templates/template-checkout.yml
- template: ./templates/template-codeql.yml
parameters:
language: go
target: golang
github_token: $(github_codeql_upload_token)
timeoutInMinutes: 120

- job: Python_Unit_Tests
pool:
name: 1es-aro-ci-pool
variables:
HOME: $(Agent.BuildDirectory)
steps:
- template: ./templates/template-checkout.yml
- script: |
set -xe
make test-python
[[ -z "$(git status -s)" ]]
displayName: 🧪Run Python Unit Tests
target: python
- job: Python_Unit_Tests
pool:
name: 1es-aro-ci-pool
variables:
HOME: $(Agent.BuildDirectory)
steps:
- template: ./templates/template-checkout.yml
- script: |
set -xe
make test-python
[[ -z "$(git status -s)" ]]
displayName: 🧪Run Python Unit Tests
target: python

- job: Golang_Unit_Tests
pool:
name: 1es-aro-ci-pool
variables:
GOCACHE: /tmp/gocache
steps:
- template: ./templates/template-checkout.yml
- job: Golang_Unit_Tests
pool:
name: 1es-aro-ci-pool
variables:
GOCACHE: /tmp/gocache
steps:
- template: ./templates/template-checkout.yml

- script: |
set -xe
go version
go env
displayName: Print Go version & env
target: golang
- script: |
set -xe
go version
go env
displayName: Print Go version & env
target: golang

- script: |
set -xe
make generate
[[ -z "$(git status -s)" ]]
displayName: ⚙️ Run Golang code generate
target: golang
- script: |
set -xe
make generate
[[ -z "$(git status -s)" ]]
displayName: ⚙️ Run Golang code generate
target: golang

- script: |
set -xe
make build-all
[[ -z "$(git status -s)" ]]
displayName: 🕵️ Build Golang code
target: golang
- script: |
set -xe
make build-all
[[ -z "$(git status -s)" ]]
displayName: 🕵️ Build Golang code
target: golang

- script: |
set -xe
make unit-test-go
displayName: 🧪 Run Golang unit tests
target: golang
- script: |
set -xe
make unit-test-go
displayName: 🧪 Run Golang unit tests
target: golang

- script: |
set -xe
make validate-fips
displayName: 🕵️ Validate FIPS
target: golang
- script: |
set -xe
make validate-fips
displayName: 🕵️ Validate FIPS
target: golang

- task: PublishTestResults@2
displayName: 📊 Publish tests results
inputs:
testResultsFiles: $(System.DefaultWorkingDirectory)/**/report.xml
condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: 📊 Publish tests results
inputs:
testResultsFiles: $(System.DefaultWorkingDirectory)/**/report.xml
condition: succeededOrFailed()

- script: |
set -xe
go run github.com/axw/gocov/[email protected] convert cover.out | go run github.com/AlekSi/[email protected] > coverage.xml
displayName: ⚙️ Process Reports
condition: succeededOrFailed()
target: golang
- script: |
set -xe
go run github.com/axw/gocov/[email protected] convert cover.out | go run github.com/AlekSi/[email protected] > coverage.xml
displayName: ⚙️ Process Reports
condition: succeededOrFailed()
target: golang

- task: PublishCodeCoverageResults@1
displayName: 📈 Publish code coverage
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)/**/coverage.xml
failIfCoverageEmpty: false
condition: succeededOrFailed()
target: golang
- task: PublishCodeCoverageResults@1
displayName: 📈 Publish code coverage
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)/**/coverage.xml
failIfCoverageEmpty: false
condition: succeededOrFailed()
target: golang

- job: Lint_Admin_Portal
pool:
name: 1es-aro-ci-pool
steps:
- template: ./templates/template-checkout.yml
- script: |
set -xe
make lint-admin-portal
displayName: 🧹 Lint Admin Portal
- job: Lint_Admin_Portal
pool:
name: 1es-aro-ci-pool
steps:
- template: ./templates/template-checkout.yml
- script: |
set -xe
make lint-admin-portal
displayName: 🧹 Lint Admin Portal
40 changes: 20 additions & 20 deletions .pipelines/clean-subscription.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@ trigger: none
pr: none

parameters:
- name: dryRun
type: boolean
default: false
- name: dryRun
type: boolean
default: false

resources:
containers:
- container: golang
image: registry.access.redhat.com/ubi8/go-toolset:1.18
options: --user=0
- container: golang
image: registry.access.redhat.com/ubi8/go-toolset:1.18
options: --user=0

variables:
- template: vars.yml
- template: vars.yml

jobs:
- job: Clean_subscription
pool:
name: 1es-aro-ci-pool
- job: Clean_subscription
pool:
name: 1es-aro-ci-pool

steps:
- template: ./templates/template-checkout.yml
- template: ./templates/template-clean-subscription.yml
parameters:
dryRun: ${{ parameters.dryRun }}
subscriptionCredentialsJSON: $(aro-v4-e2e-devops-spn)
subscriptionId: $(subscriptionId)
purgeCreatedTag: $(purgeCreatedTag)
resourceGroupDeletePrefixes: $(resourceGroupDeletePrefixes)
purgeTTL: $(purgeTTL)
steps:
- template: ./templates/template-checkout.yml
- template: ./templates/template-clean-subscription.yml
parameters:
dryRun: ${{ parameters.dryRun }}
subscriptionCredentialsJSON: $(aro-v4-e2e-devops-spn)
subscriptionId: $(subscriptionId)
purgeCreatedTag: $(purgeCreatedTag)
resourceGroupDeletePrefixes: $(resourceGroupDeletePrefixes)
purgeTTL: $(purgeTTL)
36 changes: 18 additions & 18 deletions .pipelines/deploy-dev-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ trigger: none
pr: none

variables:
- template: vars.yml
- template: vars.yml

jobs:
- job: Deploy_new_shared_env
pool:
name: 1es-aro-ci-pool
- job: Deploy_new_shared_env
pool:
name: 1es-aro-ci-pool

steps:
- template: ./templates/template-checkout.yml
- template: ./templates/template-az-cli-login.yml
parameters:
azureDevOpsJSONSPN: $(aro-v4-e2e-devops-spn)
- script: |
export SECRET_SA_ACCOUNT_NAME=$(SECRET_SA_ACCOUNT_NAME)
make secrets
displayName: 🔑 Downloading certificates and secrets from storage account
- template: ./templates/template-deploy-shared-env.yml
parameters:
subscriptionID: $(AZURE_SUBSCRIPTION_ID)
azureDevOpsJSONSPN: $(aro-v4-e2e-devops-spn)
- template: ./templates/template-az-cli-logout.yml
steps:
- template: ./templates/template-checkout.yml
- template: ./templates/template-az-cli-login.yml
parameters:
azureDevOpsJSONSPN: $(aro-v4-e2e-devops-spn)
- script: |
export SECRET_SA_ACCOUNT_NAME=$(SECRET_SA_ACCOUNT_NAME)
make secrets
displayName: 🔑 Downloading certificates and secrets from storage account
- template: ./templates/template-deploy-shared-env.yml
parameters:
subscriptionID: $(AZURE_SUBSCRIPTION_ID)
azureDevOpsJSONSPN: $(aro-v4-e2e-devops-spn)
- template: ./templates/template-az-cli-logout.yml
Loading