Skip to content

Commit 70eab9e

Browse files
Merge pull request opendatahub-io#167 from rimolive/rmartine
Add image-check automation
2 parents ad8715f + 150e72e commit 70eab9e

File tree

2 files changed

+42
-12
lines changed

2 files changed

+42
-12
lines changed

.github/workflows/image-check.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Image-check
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
tags-ignore:
7+
- 'v*'
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-go@v2
17+
with:
18+
go-version: '1.19.9'
19+
- name: Check hard-coded image names in template files
20+
run: |
21+
lines=$(grep -r "image: " ./config/internal/ | egrep -v "{{[a-zA-Z.]+}}" | grep -v sample | wc -l)
22+
if [ "$lines" -gt "0" ]; then exit 1; else exit 0; fi
23+
- name: Check Operator resources
24+
run: |
25+
lines=$(grep -r "image: " ./config/manager/ | grep -oP -v "\\$\([[:upper:]_]+\)" | wc -l)
26+
if [ "$lines" -gt "0" ]; then exit 1; else exit 0; fi
27+
- name: Check non-sha image parameters
28+
run: |
29+
lines=$(egrep -v "IMAGES_[A-Z]+=[a-z0-9./-]+@sha256" ./config/base/params.env | wc -l)
30+
if [ "$lines" -gt "0" ]; then exit 1; else exit 0; fi

config/base/params.env

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
IMAGES_APISERVER=quay.io/opendatahub/ds-pipelines-api-server:v1.0.0
2-
IMAGES_ARTIFACT=quay.io/opendatahub/ds-pipelines-artifact-manager:v1.0.0
3-
IMAGES_PERSISTENTAGENT=quay.io/opendatahub/ds-pipelines-persistenceagent:v1.0.0
4-
IMAGES_SCHEDULEDWORKFLOW=quay.io/opendatahub/ds-pipelines-scheduledworkflow:v1.0.0
5-
IMAGES_CACHE=registry.access.redhat.com/ubi8/ubi-minimal
6-
IMAGES_MOVERESULTSIMAGE=registry.access.redhat.com/ubi8/ubi-micro
7-
IMAGES_MARIADB=registry.redhat.io/rhel8/mariadb-103:1-188
8-
IMAGES_DSPO=quay.io/opendatahub/data-science-pipelines-operator:v1.0.0
9-
IMAGES_OAUTHPROXY=registry.redhat.io/openshift4/ose-oauth-proxy:v4.12.0
10-
IMAGES_MLMDENVOY=quay.io/opendatahub/ds-pipelines-metadata-envoy:v1.0.0
11-
IMAGES_MLMDGRPC=quay.io/opendatahub/ds-pipelines-metadata-grpc:v1.0.0
12-
IMAGES_MLMDWRITER=quay.io/opendatahub/ds-pipelines-metadata-writer:v1.0.0
1+
IMAGES_APISERVER=quay.io/opendatahub/ds-pipelines-api-server@sha256:4650c62254cd79112de3e4f09270130501d0d86a4dea79b74c2fcb8b5ca567e7
2+
IMAGES_ARTIFACT=quay.io/opendatahub/ds-pipelines-artifact-manager@sha256:58a13845901f8aae5421f640eeebee0abf3b12b27c1f96fbc8ff199b7e4f8d8d
3+
IMAGES_PERSISTENTAGENT=quay.io/opendatahub/ds-pipelines-persistenceagent@sha256:c8b0953c28fd24180ddd24a30c68df411d299ccc7f6bc18ab15f4dba4a84b7d9
4+
IMAGES_SCHEDULEDWORKFLOW=quay.io/opendatahub/ds-pipelines-scheduledworkflow@sha256:31d049e74ab038f3a6d3ff9fa8953a4d0ddb21b0efc43fbb5b07fbaf83817022
5+
IMAGES_CACHE=registry.access.redhat.com/ubi8/ubi-minimal@sha256:e52fc1de73dc2879516431ff1865e0fb61b1a32f57b6f914bdcddb13c62f84e6
6+
IMAGES_MOVERESULTSIMAGE=registry.access.redhat.com/ubi8/ubi-micro@sha256:443db9a646aaf9374f95d266ba0c8656a52d70d0ffcc386a782cea28fa32e55d
7+
IMAGES_MARIADB=registry.redhat.io/rhel8/mariadb-103@sha256:cafc7364494fb7206c373a1235fd5da74399c19b5c34d87dd02aa07e8f343fa2
8+
IMAGES_DSPO=quay.io/opendatahub/data-science-pipelines-operator@sha256:97b4d3c588abe62ffba0474ecb9506752bce43a0f952e84cc9fddc63724f696b
9+
IMAGES_OAUTHPROXY=registry.redhat.io/openshift4/ose-oauth-proxy@sha256:d0f2f1ef0bdc3aa1a70794ac8ac779271b634af83e939029ac5224ec0c815d7a
10+
IMAGES_MLMDENVOY=quay.io/opendatahub/ds-pipelines-metadata-envoy@sha256:f2d5d430bbc925520f635f35698e604aae391ace39b15a5d601a9c9eb26dec2b
11+
IMAGES_MLMDGRPC=quay.io/opendatahub/ds-pipelines-metadata-grpc@sha256:2490aadb2227cc72fd9e698549a8cd3270b669a2faa24bb0603c37f1c71ac8c4
12+
IMAGES_MLMDWRITER=quay.io/opendatahub/ds-pipelines-metadata-writer@sha256:89fc26374f8e58384628f6b178eb9b8e3ebb111fe395c529d0b65ba8adaa89f5

0 commit comments

Comments
 (0)