Skip to content

Commit 0d5ed05

Browse files
authored
Merge pull request #2149 from lcarva/release-pipeline
Add release setup steps
2 parents fb4e6ef + 45e2357 commit 0d5ed05

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

release/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ The Pipelines are generated via [kustomize](https://kustomize.io/) from the `src
77
make changes to the Pipelines, update the corresponding files in that directory and run the
88
`make generate-pipelines` command (requires `kustomize`).
99

10+
## Setup
11+
12+
The [setup.yaml](setup.yaml) file should be applied to the namespace where the release Pipeliens
13+
will run. This creates a ServiceAccount with access to perform the release.
14+
1015
## Why are there two Pipelines?
1116

1217
Currently, it is not possible to specify the EC policy in the ReleasePlan, nor any general Pipeline

release/setup.yaml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
# Copyright The Enterprise Contract Contributors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# SPDX-License-Identifier: Apache-2.0
17+
18+
# A dedicated ServiceAccount is used to create create a distinction between build and release access.
19+
apiVersion: v1
20+
kind: ServiceAccount
21+
metadata:
22+
name: tenant-release
23+
namespace: rhtap-contract-tenant
24+
secrets:
25+
- name: ec-cli-main # push quay.io/enterprise-contract/cli
26+
- name: ec-tekton-task-main # push quay.io/enterprise-contract/tekton-task
27+
---
28+
apiVersion: rbac.authorization.k8s.io/v1
29+
kind: Role
30+
metadata:
31+
namespace: rhtap-contract-tenant
32+
name: tenant-release
33+
rules:
34+
- apiGroups:
35+
- appstudio.redhat.com
36+
resources:
37+
- releases
38+
- releaseplans
39+
- snapshots
40+
verbs:
41+
- get
42+
- watch
43+
- list
44+
---
45+
apiVersion: rbac.authorization.k8s.io/v1
46+
kind: RoleBinding
47+
metadata:
48+
name: tenant-release
49+
namespace: rhtap-contract-tenant
50+
subjects:
51+
- kind: ServiceAccount
52+
name: tenant-release
53+
roleRef:
54+
kind: Role
55+
name: tenant-release
56+
apiGroup: rbac.authorization.k8s.io

0 commit comments

Comments
 (0)