Skip to content

Commit 1582f52

Browse files
authored
Merge pull request #695 from xinredhat/PLNSRVCE-1124
PLNSRVCE-1124-Move CI to StoneSoup Prod MVP
2 parents 0f225fb + 8ad0ac1 commit 1582f52

File tree

6 files changed

+27
-46
lines changed

6 files changed

+27
-46
lines changed

.tekton/tasks/deploy-cluster.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ spec:
2727
value: "$(params.region)"
2828
- name: OCP_VERSION
2929
value: "$(params.ocp_version)"
30-
- name: BW_CLIENTID
30+
- name: ROSA_TOKEN
3131
valueFrom:
3232
secretKeyRef:
33-
name: hypershift-bitwarden
34-
key: "BW_CLIENTID"
35-
- name: BW_CLIENTSECRET
33+
name: plnsvc-ci-secret
34+
key: "PLNSVC_ROSA_TOKEN"
35+
- name: AWS_ACCESS_KEY_ID
3636
valueFrom:
3737
secretKeyRef:
38-
name: hypershift-bitwarden
39-
key: "BW_CLIENTSECRET"
40-
- name: BW_PASSWORD
38+
name: plnsvc-ci-secret
39+
key: "PLNSVC_AWS_KEY_ID"
40+
- name: AWS_SECRET_ACCESS_KEY
4141
valueFrom:
4242
secretKeyRef:
43-
name: hypershift-bitwarden
44-
key: "BW_PASSWORD"
43+
name: plnsvc-ci-secret
44+
key: "PLNSVC_AWS_KEY"
4545
command:
4646
- $(workspaces.source.path)/ci/images/ci-runner/hack/bin/deploy-cluster.sh

.tekton/tasks/destroy-cluster.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ spec:
1818
env:
1919
- name: CLUSTER_NAME
2020
value: "$(params.cluster-name)"
21-
- name: BW_CLIENTID
21+
- name: ROSA_TOKEN
2222
valueFrom:
2323
secretKeyRef:
24-
name: hypershift-bitwarden
25-
key: "BW_CLIENTID"
26-
- name: BW_CLIENTSECRET
24+
name: plnsvc-ci-secret
25+
key: "PLNSVC_ROSA_TOKEN"
26+
- name: AWS_ACCESS_KEY_ID
2727
valueFrom:
2828
secretKeyRef:
29-
name: hypershift-bitwarden
30-
key: "BW_CLIENTSECRET"
31-
- name: BW_PASSWORD
29+
name: plnsvc-ci-secret
30+
key: "PLNSVC_AWS_KEY_ID"
31+
- name: AWS_SECRET_ACCESS_KEY
3232
valueFrom:
3333
secretKeyRef:
34-
name: hypershift-bitwarden
35-
key: "BW_PASSWORD"
34+
name: plnsvc-ci-secret
35+
key: "PLNSVC_AWS_KEY"
3636
- name: KUBECONFIG_DIR
3737
value: "$(workspaces.output.path)"
3838
- name: REGION

.tekton/tasks/destroy-existing-cluster.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ spec:
1414
- name: destroy
1515
image: quay.io/redhat-pipeline-service/ci-runner:$(params.target_branch)
1616
env:
17-
- name: BW_CLIENTID
17+
- name: ROSA_TOKEN
1818
valueFrom:
1919
secretKeyRef:
20-
name: hypershift-bitwarden
21-
key: "BW_CLIENTID"
22-
- name: BW_CLIENTSECRET
20+
name: plnsvc-ci-secret
21+
key: "PLNSVC_ROSA_TOKEN"
22+
- name: AWS_ACCESS_KEY_ID
2323
valueFrom:
2424
secretKeyRef:
25-
name: hypershift-bitwarden
26-
key: "BW_CLIENTSECRET"
27-
- name: BW_PASSWORD
25+
name: plnsvc-ci-secret
26+
key: "PLNSVC_AWS_KEY_ID"
27+
- name: AWS_SECRET_ACCESS_KEY
2828
valueFrom:
2929
secretKeyRef:
30-
name: hypershift-bitwarden
31-
key: "BW_PASSWORD"
30+
name: plnsvc-ci-secret
31+
key: "PLNSVC_AWS_KEY"
3232
- name: REGION
3333
value: "$(params.region)"
3434
command:

ci/images/ci-runner/hack/bin/cleanup-expired-clusters.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ source "$SCRIPT_DIR/utils.sh"
1313

1414
EXCLUDE_CLUSTER=(local-cluster newci4plnsvc)
1515

16-
fetch_bitwarden_secrets() {
17-
printf "Fetch secrets from bitwarden server\n" | indent 2
18-
open_bitwarden_session
19-
get_aws_credentials
20-
get_rosa_token
21-
}
22-
2316
is_cluster_expired() {
2417
cluster_name=$1
2518

@@ -47,7 +40,6 @@ destroy_expired_clusters() {
4740
done
4841
}
4942

50-
fetch_bitwarden_secrets
5143
setx_off
5244
rosa login --token="$ROSA_TOKEN"
5345
setx_on

ci/images/ci-runner/hack/bin/deploy-cluster.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ SCRIPT_DIR="$(
1111
# shellcheck source=ci/images/ci-runner/hack/bin/utils.sh
1212
source "$SCRIPT_DIR/utils.sh"
1313

14-
fetch_bitwarden_secrets() {
15-
printf "Fetch secrets from bitwarden server\n" | indent 2
16-
open_bitwarden_session
17-
get_aws_credentials
18-
get_rosa_token
19-
}
20-
2114
print_debug_info() {
2215
printf "Print debug info......\n" | indent 2
2316
rosa describe cluster --cluster="$CLUSTER_NAME"
@@ -102,5 +95,4 @@ deploy_cluster() {
10295
check_clusteroperators
10396
}
10497

105-
fetch_bitwarden_secrets
10698
deploy_cluster

ci/images/ci-runner/hack/bin/destroy-cluster.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ source "$SCRIPT_DIR/utils.sh"
3636

3737
if [[ -n "$CLUSTER_NAME" ]]; then
3838
echo "Started to destroy cluster [$CLUSTER_NAME]..."
39-
open_bitwarden_session
40-
get_aws_credentials
41-
get_rosa_token
4239

4340
printf "Log in to your Red Hat account...\n" | indent 2
4441
setx_off

0 commit comments

Comments
 (0)