-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'improvement/ZENKO-4773-end2end-pra-archive-tests' into …
…q/2.6
- Loading branch information
Showing
27 changed files
with
1,214 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
"emailVerified": true, | ||
"firstName": "${OIDC_FIRST_NAME}", | ||
"lastName": "${OIDC_LAST_NAME}", | ||
"email": "[email protected]", | ||
"email": "${OIDC_EMAIL}", | ||
"attributes": { | ||
"instanceIds": [ | ||
"${INSTANCE_ID}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ DIR=$(dirname "$0") | |
|
||
COMMAND=${1:-''} | ||
NAMESPACE=${2:-default} | ||
ZENKO_NAME=${3:-end2end} | ||
|
||
KEYCLOAK_EXEC="kubectl -n ${NAMESPACE} exec -i keycloak-0 --" | ||
|
||
|
@@ -28,7 +29,9 @@ case $COMMAND in | |
"add-user") | ||
refresh_creds | ||
|
||
export INSTANCE_ID=`kubectl -n ${NAMESPACE} get zenko -o jsonpath='{.items[0].status.instanceID}'` | ||
export INSTANCE_ID=`kubectl -n ${NAMESPACE} get zenko ${ZENKO_NAME} -o jsonpath='{.status.instanceID}'` | ||
|
||
export OIDC_EMAIL=${OIDC_EMAIL:-"[email protected]"} | ||
|
||
envsubst < $DIR/configs/keycloak_user.json | \ | ||
${KEYCLOAK_EXEC} /opt/jboss/keycloak/bin/kcadm.sh create users -r ${OIDC_REALM} -f - | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,7 @@ env: | |
NOTIF_ALT_DEST_NAME: "destination2" | ||
NOTIF_ALT_DEST_TOPIC: "destination-topic-2" | ||
SUBDOMAIN: "zenko.local" | ||
DR_SUBDOMAIN: "dr.zenko.local" | ||
SKOPEO_PATH: "/tmp" | ||
HELM_VERSION: "v3.5.3" | ||
YQ_VERSION: "v4.27.5" | ||
|
@@ -91,7 +92,11 @@ env: | |
KUBECTL_VERSION: "1.30.0" | ||
TILT_VERSION: "0.23.4" | ||
KIND_VERSION: "v0.12.0" | ||
DRCTL_TAG: "v1.0.2" | ||
ZENKO_ENABLE_SOSAPI: false | ||
TIME_PROGRESSION_FACTOR: 1 | ||
EXPIRE_ONE_DAY_EARLIER: true | ||
TRANSITION_ONE_DAY_EARLIER: true | ||
JUNIT_REPORT_PATH: /reports/ctst-junit.xml | ||
# DEBUG WAIT | ||
TMATE_SERVER_HOST: ${{ secrets.TMATE_SERVER_HOST }} | ||
|
@@ -381,7 +386,9 @@ jobs: | |
with: | ||
push: true | ||
context: ./tests/ctst | ||
build-args: CTST_TAG=${{ env.CTST_TAG }} | ||
build-args: | | ||
CTST_TAG=${{ env.CTST_TAG }} | ||
DRCTL_TAG=${{ env.DRCTL_TAG}} | ||
tags: "${{ env.E2E_CTST_IMAGE_NAME }}:${{ env.E2E_IMAGE_TAG }}" | ||
cache-from: type=gha,scope=end2end-ctst | ||
cache-to: type=gha,mode=max,scope=end2end-ctst | ||
|
@@ -452,11 +459,8 @@ jobs: | |
if: always() | ||
|
||
end2end-pra: | ||
needs: [build-kafka, build-test-image, check-dashboard-versions] | ||
runs-on: | ||
- ubuntu | ||
- focal | ||
- xlarge | ||
needs: [build-kafka, check-dashboard-versions, lint-and-build-ctst] | ||
runs-on: ubuntu-22.04-16core | ||
env: | ||
GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }} | ||
steps: | ||
|
@@ -477,46 +481,41 @@ jobs: | |
env: | ||
ZENKO_MONGODB_SHARDED: "true" | ||
with: | ||
zkop_tag: 1.6.0-preview.1 | ||
zkop_tag: 1.6.0-preview.2 | ||
extra_components: | | ||
drctl: | ||
image: ghcr.io/scality/zenko-drctl | ||
tag: ${{ env.DRCTL_TAG }} | ||
- name: Prepare PRA environment | ||
run: bash prepare-pra.sh | ||
working-directory: ./.github/scripts/end2end | ||
- name: Deploy second Zenko for PRA | ||
run: bash deploy-zenko.sh end2end-pra default | ||
run: bash deploy-zenko.sh end2end-pra default './configs/zenko.yaml' | ||
env: | ||
ZENKO_MONGODB_SHARDED: "true" | ||
ZENKO_MONGODB_DATABASE: "pradb" | ||
EXTRA_COMPONENTS: | | ||
drctl: | ||
image: 'ghcr.io/scality/zenko-drctl' | ||
tag: ${{ env.DRCTL_TAG }} | ||
working-directory: ./.github/scripts/end2end | ||
- name: Deploy second Sorbet for PRA | ||
run: bash deploy-sorbet-resources.sh end2end-pra | ||
working-directory: ./.github/scripts/end2end/operator/tests/smoke | ||
- name: Add Keycloak pra user and assign StorageManager role | ||
shell: bash | ||
run: bash keycloak-helper.sh add-user default end2end-pra | ||
env: | ||
SORBETD_NAME: mock-sorbet-pra | ||
- name: Extract environment | ||
run: |- | ||
sudo curl --fail -L https://github.com/mikefarah/yq/releases/download/${{ env.YQ_VERSION}}/${{ env.YQ_BINARY }} -o /usr/bin/yq | ||
sudo chmod +x /usr/bin/yq | ||
get_image_from_deps() { | ||
local dep_name=$1 | ||
yq eval ".$dep_name | (.sourceRegistry // \"docker.io\") + \"/\" + .image" deps.yaml | ||
} | ||
cd solution/ | ||
cat <<EOF >> $GITHUB_ENV | ||
KAFKA_IMAGE=$(get_image_from_deps kafka) | ||
KAFKA_TAG=$(yq eval '.kafka.tag' deps.yaml) | ||
KAFKA_CONNECT_IMAGE=$(get_image_from_deps kafka-connect) | ||
KAFKA_CONNECT_TAG=$(yq eval '.kafka-connect.tag' deps.yaml) | ||
JMX_JAVAAGENT_IMAGE=$(get_image_from_deps jmx-javaagent) | ||
JMX_JAVAAGENT_TAG=$(yq eval '.jmx-javaagent.tag' deps.yaml) | ||
MONGODB_CONNECTOR_TAG=$(yq eval '.mongodb-connector.tag' deps.yaml) | ||
KAFKA_CLEANER_IMAGE=$(get_image_from_deps kafka-cleaner) | ||
KAFKA_CLEANER_TAG=$(yq eval '.kafka-cleaner.tag' deps.yaml) | ||
KAFKA_CRUISECONTROL_IMAGE=$(get_image_from_deps kafka-cruise-control) | ||
KAFKA_CRUISECONTROL_TAG=$(yq eval '.kafka-cruise-control.tag' deps.yaml) | ||
KAFKA_LAGEXPORTER_IMAGE=$(get_image_from_deps kafka-lag-exporter) | ||
KAFKA_LAGEXPORTER_TAG=$(yq eval '.kafka-lag-exporter.tag' deps.yaml) | ||
EOF | ||
- name: Deploy zenko dr components | ||
run: bash deploy-dr.sh | ||
OIDC_USERNAME: 'zenko-end2end-pra' | ||
OIDC_EMAIL: '[email protected]' | ||
working-directory: ./.github/scripts/end2end | ||
- name: Configure E2E PRA test environment | ||
run: bash configure-e2e.sh end2end-pra ${E2E_IMAGE_NAME}:${E2E_IMAGE_TAG} default | ||
working-directory: ./.github/scripts/end2end | ||
env: | ||
OIDC_USERNAME: 'zenko-end2end-pra' | ||
- name: Configure E2E CTST test environment | ||
run: bash configure-e2e-ctst.sh | ||
working-directory: ./.github/scripts/end2end | ||
- name: Run CTST end to end tests | ||
run: bash run-e2e-ctst.sh "" "" "" "" --tags @PRA | ||
working-directory: ./.github/scripts/end2end | ||
- name: Archive artifact logs and data | ||
uses: ./.github/actions/archive-artifacts | ||
|
@@ -685,11 +684,14 @@ jobs: | |
GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }} | ||
ZENKO_MONGODB_SHARDED: "true" | ||
ZENKO_ENABLE_SOSAPI: true | ||
TIME_PROGRESSION_FACTOR: 86400 | ||
TRANSITION_ONE_DAY_EARLIER: false | ||
EXPIRE_ONE_DAY_EARLIER: false | ||
- name: Configure E2E test environment | ||
run: bash configure-e2e-ctst.sh | ||
working-directory: ./.github/scripts/end2end | ||
- name: Run CTST end to end tests | ||
run: bash run-e2e-ctst.sh | ||
run: bash run-e2e-ctst.sh "" "" "" "" --tags 'not @PRA' | ||
working-directory: ./.github/scripts/end2end | ||
- name: Upload results | ||
if: "!cancelled() && env.TRUNK_TOKEN" | ||
|
Oops, something went wrong.