Merge pull request #67 from COPRS/develop #53
Workflow file for this run
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
# Copyright 2023 Airbus | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: Release Build Pipeline production-common | |
on: | |
push: | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" | |
- "[0-9]+.[0-9]+.[0-9]+" | |
env: | |
IMAGE_NAME: rs-core | |
RS_CORE_FOLDER: processing-common | |
RS_EXAMPLES_FOLDER: rs-core-examples | |
ARTIFACTORY_BASE: artifactory.coprs.esa-copernicus.eu | |
ARTIFACTORY_PROJECT_DOCKER: rs-docker | |
ARTIFACTORY_PROJECT_DOCKER_PRIVATE: rs-docker-private | |
ARTIFACTORY_PROJECT_MAVEN: rs-maven | |
ARTIFACTORY_PROJECT_HELM: rs-helm | |
ARTIFACTORY_PROJECT_COMMON: rs-zip | |
ARTIFACTORY_CORE_PROJECT: rs-core | |
ARTIFACTORY_EXAMPLES_PROJECT: rs-core-examples | |
jobs: | |
# Git Guardian Token is invalid | |
# gg-scan: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v2 | |
# with: | |
# fetch-depth: 0 | |
# - name: GitGuardian scan | |
# uses: GitGuardian/ggshield-action@master | |
# env: | |
# GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }} | |
# GITHUB_PUSH_BASE_SHA: ${{ github.event.base }} | |
# GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
# GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | |
# GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }} | |
build-base: | |
# Git Guardian Token is invalid | |
#needs: [gg-scan] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- uses: ./.github/actions/build-container | |
with: | |
IMAGE_NAME_SUFFIX: base | |
BUILD_CONTEXT: ./rs-container/docker_base | |
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }} | |
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }} | |
- uses: ./.github/actions/generate-report | |
with: | |
COMPONENT: base | |
deploy-parent-poms: | |
# Git Guardian Token is invalid | |
#needs: [gg-scan] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
pom: [rs-libs, rs-core] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/deploy-pom | |
with: | |
POM: ${{ matrix.pom }} | |
ARTIFACTORY_BASE: ${{ env.ARTIFACTORY_BASE}} | |
ARTIFACTORY_PROJECT: ${{ env.ARTIFACTORY_PROJECT_MAVEN}} | |
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }} | |
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }} | |
build-libs: | |
# Git Guardian Token is invalid | |
#needs: [gg-scan] | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
matrix: | |
component: [lib-commons, app-status, message-adapter, xml-tools, error-repo-client, obs-sdk, metadata-client, prip-client, auxip-client, xbip-client, edip-client, cadip-client, data-lifecycle-client, jacoco-report] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/build-libs | |
with: | |
COMPONENT: ${{ matrix.component }} | |
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }} | |
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }} | |
SONARQUBE_HOST: ${{ secrets.SONARQUBE_HOST }} | |
SONARQUBE_TOKEN: ${{ secrets.WERUM_SONARQUBE_TOKEN }} | |
build-all-core: | |
needs: [build-base, build-libs] | |
strategy: | |
fail-fast: false | |
matrix: | |
component: [compression-worker, distribution-worker, dlq-manager, eviction-management-worker, execution-worker, ingestion-filter, ingestion-trigger, ingestion-worker, metadata-catalog-extraction, metadata-catalog-searchcontroller, native-api, data-lifecycle-worker, prip-frontend, ddip-frontend, preparation-worker, request-parking-lot, cronbased-trigger] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/build-docker | |
with: | |
COMPONENT: ${{ matrix.component }} | |
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }} | |
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }} | |
SONARQUBE_HOST: ${{ secrets.SONARQUBE_HOST }} | |
SONARQUBE_TOKEN: ${{ secrets.WERUM_SONARQUBE_TOKEN }} | |
- uses: ./.github/actions/generate-report | |
with: | |
COMPONENT: ${{ matrix.component }} | |
build-core-components: | |
# Git Guardian Token is invalid | |
#needs: [gg-scan] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
component: [ingestion, metadata, compression, distribution, datalifecycle, dlq] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/build-core-components | |
with: | |
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }} | |
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }} | |
build-core-examples: | |
# Git Guardian Token is invalid | |
#needs: [gg-scan] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
component: [ingestion-auxip, ingestion-edip, ingestion-xbip, ingestion-mock-auxip, ingestion-contingency] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/build-core-examples | |
with: | |
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }} | |
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }} | |
helm-charts: | |
# Git Guardian Token is invalid | |
#needs: [gg-scan] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
component: [ddip_frontend, metadata_search_controller, native_api, prip_frontend, request_parking_lot, eviction_manager] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/helm-charts | |
with: | |
COMPONENT: ${{ matrix.component}} | |
CHART_FOLDER: rs-processing-common | |
ARTIFACTORY_HELM_PROJECT: processing | |
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }} | |
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }} | |
helm-mocks: | |
# Git Guardian Token is invalid | |
#needs: [gg-scan] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
component: [mock_webdav, mock_ftp] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/helm-charts | |
with: | |
COMPONENT: ${{ matrix.component}} | |
CHART_FOLDER: rs-testing | |
ARTIFACTORY_HELM_PROJECT: testing | |
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }} | |
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }} | |
build-containers: | |
# Git Guardian Token is invalid | |
needs: [build-base] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
component: [mock_webdav, mock_ftpserver] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- uses: ./.github/actions/build-container | |
with: | |
IMAGE_NAME_SUFFIX: ${{ matrix.component }} | |
BUILD_CONTEXT: ./rs-container/docker_${{ matrix.component }} | |
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }} | |
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }} | |
- uses: ./.github/actions/generate-report | |
with: | |
COMPONENT: ${{ matrix.component }} | |
build-ipf-containers: | |
needs: [build-all-core] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ipf: | |
[ | |
{ image: rs-ipf-s1-aio, dir: docker_s1_ipf_aio }, | |
{ image: rs-ipf-s1-asp, dir: docker_s1_ipf_asp }, | |
{ image: rs-ipf-s1-l1, dir: docker_s1_ipf_l1 }, | |
{ image: rs-ipf-s1-l2, dir: docker_s1_ipf_l2 }, | |
{ image: rs-ipf-s3-acq, dir: docker_s3_ipf_acq }, | |
{ image: rs-ipf-s3-l0, dir: docker_s3_ipf_l0 }, | |
{ image: rs-ipf-s3-mw1, dir: docker_s3_ipf_mw1 }, | |
{ image: rs-ipf-s3-ol1-rac, dir: docker_s3_ipf_ol1_rac }, | |
{ image: rs-ipf-s3-ol1-spc, dir: docker_s3_ipf_ol1_spc }, | |
{ image: rs-ipf-s3-ol1, dir: docker_s3_ipf_ol1 }, | |
{ image: rs-ipf-s3-ol2, dir: docker_s3_ipf_ol2 }, | |
{ image: rs-ipf-s3-pug, dir: docker_s3_ipf_pug }, | |
{ image: rs-ipf-s3-sl1, dir: docker_s3_ipf_sl1 }, | |
{ image: rs-ipf-s3-sl2-frp, dir: docker_s3_ipf_sl2_frp }, | |
{ image: rs-ipf-s3-sl2, dir: docker_s3_ipf_sl2 }, | |
{ image: rs-ipf-s3-sr1, dir: docker_s3_ipf_sr1 }, | |
{ image: rs-ipf-s3-sy2-aod, dir: docker_s3_ipf_sy2_aod }, | |
{ image: rs-ipf-s3-sy2-vgs, dir: docker_s3_ipf_sy2_vgs }, | |
{ image: rs-ipf-s3-sy2, dir: docker_s3_ipf_sy2 }, | |
] | |
# The delivered IPFs for SM2 are currently too big for the GitHub pipeline, therefore skip these processors. | |
# If the size is fixed enable them by adding the following lines back to the array above: | |
# { image: rs-ipf-s3-sm2-hy, dir: docker_s3_ipf_sm2_hy }, | |
# { image: rs-ipf-s3-sm2-li, dir: docker_s3_ipf_sm2_li }, | |
# { image: rs-ipf-s3-sm2-si, dir: docker_s3_ipf_sm2_si }, | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF} | cut -d / -f3-)" | |
id: extract_branch | |
- uses: ./.github/actions/build-ipf-container | |
with: | |
BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }} | |
IMAGE_NAME: ${{ matrix.ipf.image }} | |
BUILD_CONTEXT: ./rs-container/${{ matrix.ipf.dir }} | |
WERUM_ARTIFACTORY_USER: ${{ secrets.WERUM_ARTIFACTORY_USER }} | |
WERUM_ARTIFACTORY_PASSWORD: ${{ secrets.WERUM_ARTIFACTORY_PASSWORD }} | |
- uses: ./.github/actions/generate-report | |
with: | |
COMPONENT: ${{ matrix.ipf.image }} |