Skip to content

Commit

Permalink
Fixing CI pipeline (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
zuzzas committed Apr 12, 2023
1 parent 66b8976 commit 415d063
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 30 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ defaults:

jobs:
tests:
runs-on: "ubuntu-20.04"
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v2"
- uses: actions/checkout@v3
- uses: werf/actions/[email protected]
- name: Werf lint chart
run: cd "$CHART_DIR" && werf helm lint
- name: Werf render chart
run: cd "$CHART_DIR" && werf helm template .
publish-charts:
runs-on: "ubuntu-20.04"
runs-on: ubuntu-latest
if: "github.event_name == 'push' && github.ref == 'refs/heads/master'"
needs: tests
steps:
- uses: "actions/checkout@v2"
- uses: actions/checkout@v3
- uses: werf/actions/[email protected]
- name: Package werf charts
run: |
Expand Down
27 changes: 6 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,11 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v4
with:
go-version: '1.19'

- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: Go Build Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}

- name: Go Mod Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Test With Coverage
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
Expand All @@ -46,17 +29,19 @@ jobs:
files: coverage.txt

- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=5m
# since go test already does it in a previous step
skip-pkg-cache: true
build:
runs-on: ubuntu-latest
needs: test
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/k8s-image-availability-exporter/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
k8sImageAvailabilityExporter:
image:
repository: registry.deckhouse.io/k8s-image-availability-exporter/k8s-image-availability-exporter
tag: v0.3.0
tag: v0.5.1
pullPolicy: IfNotPresent
replicas: 1
resources: {}
Expand Down
5 changes: 1 addition & 4 deletions pkg/registry_checker/indexers.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,8 @@ func (ci ControllerIndexers) validCi(cis *controllerWithContainerInfos) bool {
}

nsList, _ := ci.namespaceIndexer.ByIndex(labeledNSIndexName, cis.Namespace)
if len(nsList) == 0 {
return false
}

return true
return len(nsList) != 0
}

func namespaceIndexers(nsLabel string) cache.Indexers {
Expand Down

0 comments on commit 415d063

Please sign in to comment.