Skip to content

Commit

Permalink
Use pull tests instead of testim for the tag-and-digest test (#4129)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh authored Nov 10, 2023
1 parent 32fbc64 commit a15716b
Show file tree
Hide file tree
Showing 77 changed files with 2,051 additions and 51 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2024,46 +2024,6 @@ jobs:
cluster-id: ${{ steps.create-cluster.outputs.cluster-id }}


validate-tag-and-digest:
runs-on: ubuntu-20.04
needs: [ enable-tests, can-run-ci, build-push-kotsadm-image, build-e2e, build-kurl-proxy, build-migrations, push-minio, push-mc, push-rqlite ]
strategy:
fail-fast: false
matrix:
cluster: [
{distribution: kind, version: v1.28.0}
]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: download e2e deps
uses: actions/download-artifact@v3
with:
name: e2e
path: e2e/bin/
- run: docker load -i e2e/bin/e2e-deps.tar
- run: chmod +x e2e/bin/*
- name: download kots binary
uses: actions/download-artifact@v3
with:
name: kots
path: bin/
- run: chmod +x bin/*
- uses: ./.github/actions/kots-e2e
with:
test-focus: 'Tag and Digest'
kots-namespace: 'tag-and-digest'
k8s-distribution: ${{ matrix.cluster.distribution }}
k8s-version: ${{ matrix.cluster.version }}
testim-access-token: '${{ secrets.TESTIM_ACCESS_TOKEN }}'
testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }}
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'


validate-kots-push-images-anonymous:
runs-on: ubuntu-20.04
needs: [ enable-tests, can-run-ci, build-push-kotsadm-image, build-kurl-proxy, build-migrations, push-minio, push-mc, push-rqlite ]
Expand Down Expand Up @@ -3924,7 +3884,6 @@ jobs:
- validate-no-required-config
- validate-version-history-pagination
- validate-change-license
- validate-tag-and-digest
- validate-min-kots-version
- validate-target-kots-version
- validate-range-kots-version
Expand Down
1 change: 0 additions & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ var _ = Describe("E2E", func() {
Entry(nil, inventory.NewVersionHistoryPagination()),
Entry(nil, inventory.NewChangeLicense()),
Entry(nil, inventory.NewHelmManagedMode()),
Entry(nil, inventory.NewTagAndDigest()),
Entry(nil, inventory.NewMinKotsVersion()),
Entry(nil, inventory.NewTargetKotsVersion()),
Entry(nil, inventory.NewRangeKotsVersion()),
Expand Down
9 changes: 0 additions & 9 deletions e2e/testim/inventory/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,6 @@ func MultiAppTest() Test {
}
}

func NewTagAndDigest() Test {
return Test{
Name: "Tag and Digest",
Suite: "tag-and-digest",
Namespace: "tag-and-digest",
UpstreamURI: "tag-and-digest/automated",
}
}

func NewMinKotsVersion() Test {
return Test{
Name: "Min KOTS Version",
Expand Down
12 changes: 12 additions & 0 deletions pkg/tests/pull/cases/taganddigest-norewrite/testcase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Name: test tag and digest no rewrite
PullOptions:
Namespace: app-namespace
ExcludeAdminConsole: true
IsAirgap: true
Silent: true
LocalPath: cases/taganddigest-norewrite/upstream
RootDir: cases/taganddigest-norewrite/results
SharedPassword: dummy-pass
RewriteImages: false
Downstreams:
- this-cluster
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-nginx-digest-multi-arch
labels:
app: example
component: nginx-digest-multi-arch
spec:
selector:
matchLabels:
app: example
component: nginx-digest-multi-arch
template:
metadata:
labels:
app: example
component: nginx-digest-multi-arch
spec:
containers:
- name: nginx
image: nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79
resources:
limits:
memory: '256Mi'
cpu: '500m'
requests:
memory: '32Mi'
cpu: '100m'
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-nginx-digest-single-arch
labels:
app: example
component: nginx-digest-single-arch
spec:
selector:
matchLabels:
app: example
component: nginx-digest-single-arch
template:
metadata:
labels:
app: example
component: nginx-digest-single-arch
spec:
containers:
- name: nginx
image: nginx@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261
resources:
limits:
memory: '256Mi'
cpu: '500m'
requests:
memory: '32Mi'
cpu: '100m'
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-nginx-tag-1-23
labels:
app: example
component: nginx-tag-1-23
spec:
selector:
matchLabels:
app: example
component: nginx-tag-1-23
template:
metadata:
labels:
app: example
component: nginx-tag-1-23
spec:
containers:
- name: nginx
image: nginx:1.23
resources:
limits:
memory: '256Mi'
cpu: '500m'
requests:
memory: '32Mi'
cpu: '100m'
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-nginx-tag-1
labels:
app: example
component: nginx-tag-1
spec:
selector:
matchLabels:
app: example
component: nginx-tag-1
template:
metadata:
labels:
app: example
component: nginx-tag-1
spec:
containers:
- name: nginx
image: nginx:1
resources:
limits:
memory: '256Mi'
cpu: '500m'
requests:
memory: '32Mi'
cpu: '100m'
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-nginx-tag-digest
labels:
app: example
component: nginx-tag-digest
spec:
selector:
matchLabels:
app: example
component: nginx-tag-digest
template:
metadata:
labels:
app: example
component: nginx-tag-digest
spec:
containers:
- name: nginx
image: nginx:1@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261
resources:
limits:
memory: '256Mi'
cpu: '500m'
requests:
memory: '32Mi'
cpu: '100m'
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kots.io/v1beta1
kind: Application
metadata:
name: my-app
spec:
title: My App
releaseNotes: |
release notes
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
apiVersion: kots.io/v1beta1
kind: License
metadata:
name: testcustomer
spec:
appSlug: my-app
channelID: 1vusIYZLAVxMG6q760OJmRKj5i5
channelName: My Channel
customerName: Test Customer
endpoint: https://replicated.app
entitlements:
bool_field:
title: Bool Field
value: true
valueType: Boolean
expires_at:
description: License Expiration
title: Expiration
value: "2030-07-27T00:00:00Z"
valueType: String
hidden_field:
isHidden: true
title: Hidden Field
value: this is secret
valueType: String
int_field:
title: Int Field
value: 123
valueType: Integer
string_field:
title: StringField
value: single line text
valueType: String
text_field:
title: Text Field
value: |-
multi
line
text
valueType: Text
isAirgapSupported: true
isGitOpsSupported: true
isSnapshotSupported: true
licenseID: 1vusOokxAVp1tkRGuyxnF23PJcq
licenseSequence: 7
licenseType: prod
signature: eyJsaWNlbnNlRGF0YSI6ImV5SmhjR2xXWlhKemFXOXVJam9pYTI5MGN5NXBieTkyTVdKbGRHRXhJaXdpYTJsdVpDSTZJa3hwWTJWdWMyVWlMQ0p0WlhSaFpHRjBZU0k2ZXlKdVlXMWxJam9pZEdWemRHTjFjM1J2YldWeUluMHNJbk53WldNaU9uc2liR2xqWlc1elpVbEVJam9pTVhaMWMwOXZhM2hCVm5BeGRHdFNSM1Y1ZUc1R01qTlFTbU54SWl3aWJHbGpaVzV6WlZSNWNHVWlPaUp3Y205a0lpd2lZM1Z6ZEc5dFpYSk9ZVzFsSWpvaVZHVnpkQ0JEZFhOMGIyMWxjaUlzSW1Gd2NGTnNkV2NpT2lKdGVTMWhjSEFpTENKamFHRnVibVZzU1VRaU9pSXhkblZ6U1ZsYVRFRldlRTFITm5FM05qQlBTbTFTUzJvMWFU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WV0pGUmtWWGJVWnZWakZLVUZkcWJGSmhXRVp1V2xkb1EyRnVRak5TUjNNd1lWWkpOVTVXVmxkV1ZUVnlUMGhLYjFsVlRYbGhiVGcwVjBkYWVGbHFWbFppYlhoeFpFWkZkMDU1Y3pCaFZsSkpWRVpPTm1WRk1IcGxWWFJ2VFVaR1ZtRXdWVFJSVnpsSFVsaEtVRTFZUmxCU01WcFJVMVJDTmxsV2FIcFdWWEJ0WTBSU2JFMVVRazlPVjNSU1ZucFdUMU5XWTNaU1ZYUkZVMGhzYlU5VmJGaGtNMUl3WTFWc1lXTlhSakJTYTA1RVlVWmtjbUo2VmtSU00wSllUREkxUmsxWVl6SmxWM1JKVlZoQk1sVXhTbEppU0Zwd1VrVXdNRlpFVWt0VU1rWnNVVmQwYzFSV1VrMVVWV055V1RCYVRHSXpaRTlUVm05NVlraE9SR1JzVG5aUmFrWmFaVmRPVGxOVlNteGFiRXB1Wld0U2RVMHhSVGxRVTBselNXMWtjMkl5U21oaVJYUnNaVlZzYTBscWIybFpiVkpzV2xSVk1rNVVXWGRaTWxwcFRrUk9hazlYU1hsUFIwcHRUMVJvYkZsWFRtaGFiVVV5VGtSWmFXWlJQVDBpZlE9PSJ9
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
metadata:
annotations:
kots.io/kustomization: base
resources:
- nginx-digest-multi-arch.yaml
- nginx-digest-single-arch.yaml
- nginx-tag-1-23.yaml
- nginx-tag-1.yaml
- nginx-tag-digest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-nginx-digest-multi-arch
labels:
app: example
component: nginx-digest-multi-arch
spec:
selector:
matchLabels:
app: example
component: nginx-digest-multi-arch
template:
metadata:
labels:
app: example
component: nginx-digest-multi-arch
spec:
containers:
- name: nginx
image: nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79
resources:
limits:
memory: '256Mi'
cpu: '500m'
requests:
memory: '32Mi'
cpu: '100m'
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-nginx-digest-single-arch
labels:
app: example
component: nginx-digest-single-arch
spec:
selector:
matchLabels:
app: example
component: nginx-digest-single-arch
template:
metadata:
labels:
app: example
component: nginx-digest-single-arch
spec:
containers:
- name: nginx
image: nginx@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261
resources:
limits:
memory: '256Mi'
cpu: '500m'
requests:
memory: '32Mi'
cpu: '100m'
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-nginx-tag-1-23
labels:
app: example
component: nginx-tag-1-23
spec:
selector:
matchLabels:
app: example
component: nginx-tag-1-23
template:
metadata:
labels:
app: example
component: nginx-tag-1-23
spec:
containers:
- name: nginx
image: nginx:1.23
resources:
limits:
memory: '256Mi'
cpu: '500m'
requests:
memory: '32Mi'
cpu: '100m'
Loading

0 comments on commit a15716b

Please sign in to comment.