diff --git a/.ci/base-pipeline.yml b/.ci/base-pipeline.yml index 779b2befa1617f992f6970beb7df67a8625891c7..f67e2cbe0974787ccc832be6ab49dc0428ca21e8 100644 --- a/.ci/base-pipeline.yml +++ b/.ci/base-pipeline.yml @@ -1,7 +1,7 @@ include: - project: acc-logging-team/gitlab-templates file: gitlab-ci-gradle.yml - ref: 0.1.24 + ref: 0.1.25 build_project: stage: build diff --git a/.ci/deploy.yml b/.ci/deploy.yml index c0906910682b03023bfdee8c3fccc91c226ffebe..516f3c0bb206d790e21ddf8754663e5b753cc448 100644 --- a/.ci/deploy.yml +++ b/.ci/deploy.yml @@ -1,34 +1,21 @@ include: - project: acc-logging-team/gitlab-templates file: gitlab-ci-common.yml - ref: 0.1.24 + ref: 0.1.25 - project: acc-logging-team/gitlab-templates - file: gitlab-ci-nxcals.yml - ref: 0.1.24 + file: gitlab-ci-logging.yml + ref: 0.1.25 + - local: .ci/templates.yml workflow: name: "Deploy $VERSION to $ANSIBLE_INVENTORY" rules: - when: always -.nxcals_deploy: - extends: - - .nxcals_base_ansible_deploy_job - script: - - PYTIMBER_MAJOR_VERSION=$(awk -F "=" '/pytimberMajorVersion/ {print $2}' gradle.properties) - - PLAYBOOK_ADDITIONAL_OPTS="-u acclog -e pytimber_major_version=$PYTIMBER_MAJOR_VERSION" - - !reference [ .nxcals_base_ansible_deploy_job, script ] - variables: - ARTIFACT_NAME: nxcals-ansible - PLAYBOOKS: nxcals-full-install-with-sudo.yml - interruptible: false - tags: - - TN - deploy-infrastructure: stage: deploy extends: - - .nxcals_deploy + - .local_nxcals_ansible variables: PLAYBOOKS: "certificates-install-with-sudo.yml kafka-install-with-sudo.yml prepare-service-with-sudo.yml monit-install.yml iptables-install.yml" @@ -36,7 +23,7 @@ deploy-services: stage: deploy when: on_success extends: - - .nxcals_deploy + - .local_nxcals_ansible resource_group: "$RESOURCE_GROUP" parallel: matrix: @@ -62,7 +49,7 @@ deploy-services: deploy-artifacts: stage: deploy extends: - - .nxcals_deploy + - .local_nxcals_ansible when: on_success parallel: matrix: @@ -75,7 +62,7 @@ deploy-artifacts: deploy-wiki: stage: deploy extends: - - .nxcals_deploy + - .local_nxcals_ansible when: on_success needs: - deploy-artifacts diff --git a/.ci/staging-pipeline.yml b/.ci/staging-pipeline.yml index 313aac2597d854e2aae96d0d10614c2bf73735ec..5f8a26df55ab8b7ed2327fe693222948a5d1c188 100644 --- a/.ci/staging-pipeline.yml +++ b/.ci/staging-pipeline.yml @@ -2,19 +2,19 @@ include: - local: '.ci/templates.yml' - project: acc-logging-team/gitlab-templates file: gitlab-ci-common.yml - ref: 0.1.24 + ref: 0.1.25 - project: acc-logging-team/gitlab-templates file: gitlab-ci-jf.yml - ref: 0.1.24 + ref: 0.1.25 - project: acc-logging-team/gitlab-templates - file: gitlab-ci-nxcals.yml - ref: 0.1.24 + file: gitlab-ci-logging.yml + ref: 0.1.25 - project: acc-logging-team/gitlab-templates file: gitlab-ci-cas.yml - ref: 0.1.24 + ref: 0.1.25 - project: acc-logging-team/gitlab-templates file: gitlab-ci-gradle.yml - ref: 0.1.24 + ref: 0.1.25 - local: .ci/templates.yml variables: @@ -91,7 +91,7 @@ deploy:staging: integration_tests:staging: extends: - - .integration_tests + - .local_integration_tests rules: - !reference [ .staging_rules, on_staging ] needs: @@ -102,7 +102,7 @@ integration_tests:staging: regression_tests:staging: extends: - - .integration_tests + - .local_integration_tests rules: - !reference [ .staging_rules, on_staging ] needs: @@ -112,11 +112,13 @@ regression_tests:staging: - echo $PREVIOUS_VERSION - git checkout tags/$PREVIOUS_VERSION resource_group: integration-tests-staging + variables: + GIT_DEPTH: 0 # for full fetch publish_to_artifactory:pro: stage: release extends: - - .nxcals_release:pro + - .logging_release:pro rules: - !reference [ .staging_rules, manual:on_staging ] needs: @@ -143,6 +145,22 @@ deploy:pro: ANSIBLE_ZIP_LINK: 'https://artifactory.cern.ch/artifactory/ds-release-local/cern/nxcals/nxcals-ansible' RESOURCE_GROUP: 'deploy-pro' +publish_release_notes: + stage: deploy + rules: + - !reference [ .test_rules, run_test_pipeline ] + extends: + .local_nxcals_ansible + needs: + - publish_to_artifactory:test + - set_version:pro + variables: + ANSIBLE_INVENTORY: 'pro' + ANSIBLE_ZIP_LINK: 'https://artifactory.cern.ch/artifactory/ds-release-local/cern/nxcals/nxcals-ansible' + RESOURCE_GROUP: 'release-notes-pro' + PLAYBOOKS: "wikis-changelog-release-notes-install.yml" + PLAYBOOK_ADDITIONAL_OPTS: "-e in_branch=$MAIN_BRANCH" + deploy:testbed: stage: deploy-release rules: @@ -164,7 +182,7 @@ deploy:testbed: acc_py_publish:pro: stage: publish-release extends: - - .nxcals_python_publish + - .local_nxcals_python_publish rules: - !reference [ .staging_rules, on_pro_release ] needs: diff --git a/.ci/templates.yml b/.ci/templates.yml index e8c75c3f100047c8eb80acf91c81f8611dcd253a..143a877e8c7712bfb0eda60e14ed5015b15f4f0c 100644 --- a/.ci/templates.yml +++ b/.ci/templates.yml @@ -1,19 +1,18 @@ include: - project: acc-logging-team/gitlab-templates file: gitlab-ci-common.yml - ref: 0.1.24 + ref: 0.1.25 - project: acc-logging-team/gitlab-templates - file: gitlab-ci-nxcals.yml - ref: 0.1.24 + file: gitlab-ci-logging.yml + ref: 0.1.25 - -.nxcals_python_publish: +.local_nxcals_python_publish: extends: - .base_job script: - name_of_variable_to_check=VERSION - !reference [ .scripts, check_variable ] - - !reference [ .nxcals_scripts, activate_kerberos ] + - !reference [ .logging_scripts, activate_kerberos ] - | cd /tmp && mkdir release && cd release for NAME in nxcals-extraction-api-python3 nxcals-spark-session-builder nxcals nxcals-py4j-utils nxcals-type-stubs @@ -27,10 +26,10 @@ include: curl --output "$FILENAME" http://photons-resources.cern.ch/downloads/nxcals_pro/spark/"$FILENAME" acc-py devrelease "$FILENAME" -.integration_tests: +.local_integration_tests: stage: integration-tests extends: - - .nxcals_integration_tests + - .logging_integration_tests variables: INTEGRATION_TESTS_OPTIONS: "$TEST_VARIANT" RBAC_ENV: 'test' @@ -40,4 +39,17 @@ include: - TN parallel: matrix: - - TEST_VARIANT: [ "-base", "-thin", "-python", "-op", "-auth" ] \ No newline at end of file + - TEST_VARIANT: [ "-base", "-thin", "-python", "-op", "-auth" ] + +.local_nxcals_ansible: + extends: + - .logging_base_ansible_deploy_job + script: + - PYTIMBER_MAJOR_VERSION=$(awk -F "=" '/pytimberMajorVersion/ {print $2}' gradle.properties) + - PLAYBOOK_ADDITIONAL_OPTS="-u acclog -e pytimber_major_version=$PYTIMBER_MAJOR_VERSION $PLAYBOOK_ADDITIONAL_OPTS" + - !reference [ .logging_base_ansible_deploy_job, script ] + variables: + ARTIFACT_NAME: nxcals-ansible + interruptible: false + tags: + - TN \ No newline at end of file diff --git a/.ci/test-pipeline.yml b/.ci/test-pipeline.yml index 1d6954739a2c334fa028fa8aa2d1e861392bcad1..7df509a31e7c70cc0c1bc8c6bd57de5cbf5a478e 100644 --- a/.ci/test-pipeline.yml +++ b/.ci/test-pipeline.yml @@ -1,16 +1,16 @@ include: - project: acc-logging-team/gitlab-templates file: gitlab-ci-common.yml - ref: 0.1.24 + ref: 0.1.25 - project: acc-logging-team/gitlab-templates file: gitlab-ci-jf.yml - ref: 0.1.24 + ref: 0.1.25 - project: acc-logging-team/gitlab-templates - file: gitlab-ci-nxcals.yml - ref: 0.1.24 + file: gitlab-ci-logging.yml + ref: 0.1.25 - project: acc-logging-team/gitlab-templates file: gitlab-ci-gradle.yml - ref: 0.1.24 + ref: 0.1.25 - local: .ci/templates.yml .test_rules: @@ -55,9 +55,24 @@ deploy:test: ANSIBLE_ZIP_LINK: 'https://artifactory.cern.ch/artifactory/ds-development-local/cern/nxcals/nxcals-ansible' RESOURCE_GROUP: 'deploy-test' +publish_waiting_for_release: + stage: deploy + rules: + - !reference [ .test_rules, run_test_pipeline ] + extends: + .local_nxcals_ansible + needs: + - publish_to_artifactory:test + - set_version:dev + variables: + ANSIBLE_INVENTORY: 'test' + ANSIBLE_ZIP_LINK: 'https://artifactory.cern.ch/artifactory/ds-development-local/cern/nxcals/nxcals-ansible' + RESOURCE_GROUP: 'release-notes-test' + PLAYBOOKS: "wikis-changelog-to-be-released-install.yml" + integration_tests:test: extends: - - .integration_tests + - .local_integration_tests rules: - !reference [ .test_rules, run_test_pipeline ] needs: