Skip to content

Commit

Permalink
Test Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Dilyan Marinov committed Jun 6, 2023
1 parent 1f23b38 commit 240f2cd
Show file tree
Hide file tree
Showing 3 changed files with 156 additions and 156 deletions.
138 changes: 69 additions & 69 deletions projects/control-service/cicd/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,76 +39,76 @@
- apk --no-cache add openjdk17-jdk git zip curl zip py-pip
- pip install --upgrade pip && pip install awscli

control_service_build_image:
extends:
- .control_service_base_build
- .images:dind
stage: build
script:
- apk --no-cache add git openjdk17-jdk
- export TAG=$(git rev-parse --short HEAD)
- cd projects/control-service/projects
- ./gradlew -p ./model build publishToMavenLocal --info --stacktrace
- ./gradlew build jacocoTestReport -x integrationTest --info --stacktrace
# - ./gradlew :pipelines_control_service:docker --info --stacktrace -Pversion=$TAG
retry: !reference [.control_service_retry, retry_options]
coverage: "/ - Line Coverage: ([0-9.]+)%/"
artifacts:
when: always
paths:
- ./projects/control-service/projects/*/build/reports/**
expire_in: 1 week
reports:
junit: ./projects/control-service/projects/**/build/test-results/test/TEST-*.xml
only:
refs:
- external_pull_requests
changes: *control_service_code_change_locations
#control_service_build_image:
# extends:
# - .control_service_base_build
# - .images:dind
# stage: build
# script:
# - apk --no-cache add git openjdk17-jdk
# - export TAG=$(git rev-parse --short HEAD)
# - cd projects/control-service/projects
# - ./gradlew -p ./model build publishToMavenLocal --info --stacktrace
# - ./gradlew build jacocoTestReport -x integrationTest --info --stacktrace
## - ./gradlew :pipelines_control_service:docker --info --stacktrace -Pversion=$TAG
# retry: !reference [.control_service_retry, retry_options]
# coverage: "/ - Line Coverage: ([0-9.]+)%/"
# artifacts:
# when: always
# paths:
# - ./projects/control-service/projects/*/build/reports/**
# expire_in: 1 week
# reports:
# junit: ./projects/control-service/projects/**/build/test-results/test/TEST-*.xml
# only:
# refs:
# - external_pull_requests
# changes: *control_service_code_change_locations

control_service_integration_test:
extends: .control_service_base_build
stage: build
variables:
DEPLOYMENT_K8S_KUBECONFIG: "~/.kube/config"
DEPLOYMENT_K8S_NAMESPACE: $CICD_KUBERNETES_NAMESPACE
CONTROL_K8S_KUBECONFIG: "~/.kube/config"
CONTROL_K8S_NAMESPACE: $CICD_KUBERNETES_NAMESPACE
DOCKER_REGISTRY_URL: $CICD_CONTAINER_REGISTRY_URI
DOCKER_REGISTRY_USERNAME: $CICD_CONTAINER_REGISTRY_USER_NAME
DOCKER_REGISTRY_PASSWORD: $CICD_CONTAINER_REGISTRY_USER_PASSWORD
GIT_URL: $CICD_GIT_URI
GIT_USERNAME: $CICD_GIT_USER
GIT_PASSWORD: $CICD_GIT_PASSWORD
GIT_USERNAME_READ_WRITE: $CICD_GIT_USER
GIT_PASSWORD_READ_WRITE: $CICD_GIT_PASSWORD
DATAJOBS_AWS_SERVICE_ACCOUNT_ACCESS_KEY_ID: $DATAJOBS_AWS_SERVICE_ACCOUNT_ACCESS_KEY_ID
DATAJOBS_AWS_SERVICE_ACCOUNT_SECRET_ACCESS_KEY: $DATAJOBS_AWS_SERVICE_ACCOUNT_SECRET_ACCESS_KEY
script:
- cd projects/control-service/projects
- ./gradlew -p ./model build publishToMavenLocal
- mkdir -p ~/.kube
- cp $KUBECONFIG ~/.kube/config
- ./gradlew -v
- ./gradlew projects --info
- ./gradlew -Djdk.tls.client.protocols=TLSv1.2 :pipelines_control_service:integrationTest --info --stacktrace --fail-fast
retry: !reference [.control_service_retry, retry_options]
artifacts:
when: always
paths:
- ./projects/control-service/projects/*/build/reports/**
expire_in: 1 week
reports:
junit: ./projects/control-service/projects/**/build/test-results/integrationTest/TEST-*.xml
only:
refs:
- external_pull_requests
changes: *control_service_code_change_locations
except:
changes:
- projects/control-service/projects/helm_charts/pipelines-control-service/version.txt
- projects/control-service/projects/model/CONTRIBUTING.MD
- projects/control-service/projects/**/README.md
- projects/control-service/projects/model/apidefs/datajob-api/config-python.json
# control_service_integration_test:
# extends: .control_service_base_build
# stage: build
# variables:
# DEPLOYMENT_K8S_KUBECONFIG: "~/.kube/config"
# DEPLOYMENT_K8S_NAMESPACE: $CICD_KUBERNETES_NAMESPACE
# CONTROL_K8S_KUBECONFIG: "~/.kube/config"
# CONTROL_K8S_NAMESPACE: $CICD_KUBERNETES_NAMESPACE
# DOCKER_REGISTRY_URL: $CICD_CONTAINER_REGISTRY_URI
# DOCKER_REGISTRY_USERNAME: $CICD_CONTAINER_REGISTRY_USER_NAME
# DOCKER_REGISTRY_PASSWORD: $CICD_CONTAINER_REGISTRY_USER_PASSWORD
# GIT_URL: $CICD_GIT_URI
# GIT_USERNAME: $CICD_GIT_USER
# GIT_PASSWORD: $CICD_GIT_PASSWORD
# GIT_USERNAME_READ_WRITE: $CICD_GIT_USER
# GIT_PASSWORD_READ_WRITE: $CICD_GIT_PASSWORD
# DATAJOBS_AWS_SERVICE_ACCOUNT_ACCESS_KEY_ID: $DATAJOBS_AWS_SERVICE_ACCOUNT_ACCESS_KEY_ID
# DATAJOBS_AWS_SERVICE_ACCOUNT_SECRET_ACCESS_KEY: $DATAJOBS_AWS_SERVICE_ACCOUNT_SECRET_ACCESS_KEY
# script:
# - cd projects/control-service/projects
# - ./gradlew -p ./model build publishToMavenLocal
# - mkdir -p ~/.kube
# - cp $KUBECONFIG ~/.kube/config
# - ./gradlew -v
# - ./gradlew projects --info
# - ./gradlew -Djdk.tls.client.protocols=TLSv1.2 :pipelines_control_service:integrationTest --info --stacktrace --fail-fast
# retry: !reference [.control_service_retry, retry_options]
# artifacts:
# when: always
# paths:
# - ./projects/control-service/projects/*/build/reports/**
# expire_in: 1 week
# reports:
# junit: ./projects/control-service/projects/**/build/test-results/integrationTest/TEST-*.xml
# only:
# refs:
# - external_pull_requests
# changes: *control_service_code_change_locations
# except:
# changes:
# - projects/control-service/projects/helm_charts/pipelines-control-service/version.txt
# - projects/control-service/projects/model/CONTRIBUTING.MD
# - projects/control-service/projects/**/README.md
# - projects/control-service/projects/model/apidefs/datajob-api/config-python.json

control_service_test_helm_chart:
stage: build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fi
#
# image.tag is fixed during release. It is set here to deploy using latest change in source code.
# We are using here embedded database, and we need to set the storageclass since in our test k8s no default storage class is not set.
helm upgrade --install --debug --wait --timeout 10m0s $RELEASE_NAME . \
helm upgrade --install --debug --wait --timeout 20m0s $RELEASE_NAME . \
-f "$TESTING_PIPELINES_SERVICE_VALUES_FILE" \
--set image.tag="$TAG" \
--set operationsUi.image.tag="$FRONTEND_TAG" \
Expand Down
172 changes: 86 additions & 86 deletions projects/frontend/cicd/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,63 +29,63 @@
when:
- always

frontend-data-pipelines-build:
image: "versatiledatakit/vdk-cicd-base-gui:2.0.0"
stage: build
needs:
- job: frontend-shared-components-build
optional: true
before_script:
- cd projects/frontend/
script:
- ./cicd/install_data_pipelines.sh
coverage: /^TOTAL\s+\d+\s+\d+\s+(\d+\%)$/
retry: !reference [.retry, retry_options]
rules:
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes: *frontend_shared_components_locations
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes: *frontend_data_pipelines_locations
artifacts:
when: always
reports:
junit:
- projects/frontend/data-pipelines/gui/reports/test-results/data-pipelines-ui/*.xml
- projects/frontend/data-pipelines/gui/reports/test-results/data-pipelines-lib/*.xml
paths:
- projects/frontend/data-pipelines/gui/reports/coverage/
- projects/frontend/data-pipelines/gui/package-lock.json
- projects/frontend/data-pipelines/gui/dist/
- projects/frontend/data-pipelines/gui/node_modules/
expire_in: 1 week
# frontend-data-pipelines-build:
# image: "versatiledatakit/vdk-cicd-base-gui:2.0.0"
# stage: build
# needs:
# - job: frontend-shared-components-build
# optional: true
# before_script:
# - cd projects/frontend/
# script:
# - ./cicd/install_data_pipelines.sh
# coverage: /^TOTAL\s+\d+\s+\d+\s+(\d+\%)$/
# retry: !reference [.retry, retry_options]
# rules:
# - if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
# changes: *frontend_shared_components_locations
# - if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
# changes: *frontend_data_pipelines_locations
# artifacts:
# when: always
# reports:
# junit:
# - projects/frontend/data-pipelines/gui/reports/test-results/data-pipelines-ui/*.xml
# - projects/frontend/data-pipelines/gui/reports/test-results/data-pipelines-lib/*.xml
# paths:
# - projects/frontend/data-pipelines/gui/reports/coverage/
# - projects/frontend/data-pipelines/gui/package-lock.json
# - projects/frontend/data-pipelines/gui/dist/
# - projects/frontend/data-pipelines/gui/node_modules/
# expire_in: 1 week

# TODO: Add the cicd path back to the rule once e2e tests are stabilized
frontend-data-pipelines-e2e-tests:
image: "versatiledatakit/vdk-cicd-base-gui:2.0.0"
stage: pre_release_test
before_script:
- cd projects/frontend/
script:
- ./cicd/test_e2e_data_pipelines.sh "$VDK_API_TOKEN" "$CYPRESS_test_environment" "$CI_PIPELINE_ID" "$CYPRESS_grepTags"
retry: !reference [.retry, retry_options]
rules:
- changes: *frontend_do_not_trigger_e2e
when: never
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes:
- "projects/frontend/shared-components/**/*"
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes:
- "projects/frontend/data-pipelines/**/*"
artifacts:
when: always
paths:
- projects/frontend/data-pipelines/gui/e2e/videos/
- projects/frontend/data-pipelines/gui/e2e/screenshots/
- projects/frontend/data-pipelines/gui/e2e/hars/
- projects/frontend/data-pipelines/gui/e2e/logs/
- projects/frontend/data-pipelines/gui/e2e/reports/
expire_in: 1 week
# frontend-data-pipelines-e2e-tests:
# image: "versatiledatakit/vdk-cicd-base-gui:2.0.0"
# stage: pre_release_test
# before_script:
# - cd projects/frontend/
# script:
# - ./cicd/test_e2e_data_pipelines.sh "$VDK_API_TOKEN" "$CYPRESS_test_environment" "$CI_PIPELINE_ID" "$CYPRESS_grepTags"
# retry: !reference [.retry, retry_options]
# rules:
# - changes: *frontend_do_not_trigger_e2e
# when: never
# - if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
# changes:
# - "projects/frontend/shared-components/**/*"
# - if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
# changes:
# - "projects/frontend/data-pipelines/**/*"
# artifacts:
# when: always
# paths:
# - projects/frontend/data-pipelines/gui/e2e/videos/
# - projects/frontend/data-pipelines/gui/e2e/screenshots/
# - projects/frontend/data-pipelines/gui/e2e/hars/
# - projects/frontend/data-pipelines/gui/e2e/logs/
# - projects/frontend/data-pipelines/gui/e2e/reports/
# expire_in: 1 week

frontend-data-pipelines-release:
image: "versatiledatakit/vdk-cicd-base-gui:2.0.0"
Expand Down Expand Up @@ -118,9 +118,9 @@ frontend_publish_ui_image:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- if: '$CI_COMMIT_BRANCH == "main"'
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes: *frontend_shared_components_locations
- if: '$CI_COMMIT_BRANCH == "main"'
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes: *frontend_data_pipelines_locations
extends: .frontend_publish_docker_image

Expand All @@ -135,9 +135,9 @@ frontend_tag_ui_image_stable:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- if: '$CI_COMMIT_BRANCH == "main"'
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes: *frontend_shared_components_locations
- if: '$CI_COMMIT_BRANCH == "main"'
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes: *frontend_data_pipelines_locations
extends: .frontend_publish_docker_image

Expand All @@ -156,9 +156,9 @@ frontend_deploy_testing_data_pipelines:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- if: '$CI_COMMIT_BRANCH == "main"'
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes: *frontend_shared_components_locations
- if: '$CI_COMMIT_BRANCH == "main"'
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes: *frontend_data_pipelines_locations

frontend_heartbeat_test:
Expand All @@ -181,9 +181,9 @@ frontend_heartbeat_test:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- if: '$CI_COMMIT_BRANCH == "main"'
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes: *frontend_shared_components_locations
- if: '$CI_COMMIT_BRANCH == "main"'
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes: *frontend_data_pipelines_locations

frontend_publish_test_image:
Expand All @@ -203,29 +203,29 @@ frontend_publish_test_image:
- projects/frontend/cicd/version.txt
extends: .frontend_publish_docker_image

frontend-shared-components-build:
image: "versatiledatakit/vdk-cicd-base-gui:2.0.0"
stage: build
before_script:
- cd projects/frontend/shared-components/gui
script:
- ../../cicd/install_shared.sh
retry: !reference [.retry, retry_options]
rules:
- if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
changes: *frontend_shared_components_locations
artifacts:
when: always
reports:
junit:
- projects/frontend/shared-components/gui/reports/test-results/shared/*.xml
- projects/frontend/shared-components/gui/reports/test-results/shared/*.xml
paths:
- projects/frontend/shared-components/gui/reports/coverage/
- projects/frontend/shared-components/gui/package-lock.json
- projects/frontend/shared-components/gui/dist/
- projects/frontend/shared-components/gui/node_modules/
expire_in: 1 week
# frontend-shared-components-build:
# image: "versatiledatakit/vdk-cicd-base-gui:2.0.0"
# stage: build
# before_script:
# - cd projects/frontend/shared-components/gui
# script:
# - ../../cicd/install_shared.sh
# retry: !reference [.retry, retry_options]
# rules:
# - if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"'
# changes: *frontend_shared_components_locations
# artifacts:
# when: always
# reports:
# junit:
# - projects/frontend/shared-components/gui/reports/test-results/shared/*.xml
# - projects/frontend/shared-components/gui/reports/test-results/shared/*.xml
# paths:
# - projects/frontend/shared-components/gui/reports/coverage/
# - projects/frontend/shared-components/gui/package-lock.json
# - projects/frontend/shared-components/gui/dist/
# - projects/frontend/shared-components/gui/node_modules/
# expire_in: 1 week

frontend-shared-components-release:
image: "versatiledatakit/vdk-cicd-base-gui:2.0.0"
Expand Down

0 comments on commit 240f2cd

Please sign in to comment.