diff --git a/.github/workflows/build-back.yaml b/.github/workflows/build-back.yaml index 8f8fe6910..50a3b1340 100644 --- a/.github/workflows/build-back.yaml +++ b/.github/workflows/build-back.yaml @@ -8,9 +8,16 @@ on: - 'code/**' branches: - 'main' + - 'develop' tags: - 'ara-*.*.*' pull_request: + types: [opened, synchronize, reopened, labeled] + paths: + - 'code/**' + branches: + - 'main' + - 'develop' jobs: docker: @@ -28,8 +35,8 @@ jobs: if [ "${{ github.event_name }}" = "schedule" ]; then VERSION=nightly elif [[ $GITHUB_REF == refs/tags/* ]]; then - GITHUB_TAGS=${GITHUB_REF#refs/tags/} - VERSION=${GITHUB_TAGS:4} + GITHUB_TAG=${GITHUB_REF#refs/tags/} + VERSION=${GITHUB_TAG#ara-} elif [[ $GITHUB_REF == refs/heads/* ]]; then VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g') if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then @@ -37,6 +44,9 @@ jobs: fi elif [[ $GITHUB_REF == refs/pull/* ]]; then VERSION=pr-${{ github.event.number }} + if [[ "${{ toJson(github.event.pull_request.labels.*.name) }}" == *"release-candidate"* ]]; then + VERSION=RC-$(echo -n ${$(cat charts/stable/Chart.yaml | grep version)#version:}) + fi fi TAGS="${DOCKER_IMAGE}:${VERSION}" if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then @@ -55,7 +65,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - if: github.event_name != 'pull_request' + if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'release-candidate') uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} @@ -68,7 +78,7 @@ jobs: context: ./code/api file: ./code/api/Dockerfile platforms: linux/amd64 - push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'release-candidate') }} tags: ${{ steps.prep.outputs.tags }} labels: | org.opencontainers.image.title=${{ github.event.repository.name }} diff --git a/.github/workflows/build-front.yaml b/.github/workflows/build-front.yaml index 6c1a2d077..57637bad5 100644 --- a/.github/workflows/build-front.yaml +++ b/.github/workflows/build-front.yaml @@ -8,9 +8,16 @@ on: - 'code/**' branches: - 'main' + - 'develop' tags: - 'ara-*.*.*' pull_request: + types: [opened, synchronize, reopened, labeled] + paths: + - 'code/**' + branches: + - 'main' + - 'develop' jobs: docker: @@ -28,8 +35,8 @@ jobs: if [ "${{ github.event_name }}" = "schedule" ]; then VERSION=nightly elif [[ $GITHUB_REF == refs/tags/* ]]; then - GITHUB_TAGS=${GITHUB_REF#refs/tags/} - VERSION=${GITHUB_TAGS:4} + GITHUB_TAG=${GITHUB_REF#refs/tags/} + VERSION=${GITHUB_TAG#ara-} elif [[ $GITHUB_REF == refs/heads/* ]]; then VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g') if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then @@ -37,6 +44,9 @@ jobs: fi elif [[ $GITHUB_REF == refs/pull/* ]]; then VERSION=pr-${{ github.event.number }} + if [[ "${{ toJson(github.event.pull_request.labels.*.name) }}" == *"release-candidate"* ]]; then + VERSION=RC-$(echo -n ${$(cat charts/stable/Chart.yaml | grep version)#version:}) + fi fi TAGS="${DOCKER_IMAGE}:${VERSION}" if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then @@ -55,7 +65,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - if: github.event_name != 'pull_request' + if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'release-candidate') uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} @@ -68,7 +78,7 @@ jobs: context: ./code/web-ui file: ./code/web-ui/Dockerfile platforms: linux/amd64 - push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'release-candidate') }} tags: ${{ steps.prep.outputs.tags }} labels: | org.opencontainers.image.title=${{ github.event.repository.name }} diff --git a/charts/stable/Chart.yaml b/charts/stable/Chart.yaml index 2b8676e72..9236749be 100644 --- a/charts/stable/Chart.yaml +++ b/charts/stable/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: ara -version: 7.1.3 +version: 7.1.4 home: https://github.com/Decathlon/ara description: | ARA helps you to fight against regressions by letting it preanalyze your non-regression tests runs, diff --git a/charts/stable/templates/deploy-api.yaml b/charts/stable/templates/deploy-api.yaml index 5b94b570a..84e75a198 100644 --- a/charts/stable/templates/deploy-api.yaml +++ b/charts/stable/templates/deploy-api.yaml @@ -10,6 +10,10 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/version: {{ .Chart.Version }} app.kubernetes.io/component: {{ $name }} + {{- if .Values.api.annotations }} + annotations: +{{ toYaml .Values.api.annotations | indent 4 }} + {{- end }} spec: replicas: {{ .Values.api.replicas }} selector: diff --git a/charts/stable/templates/deploy-ui.yaml b/charts/stable/templates/deploy-ui.yaml index 51184063f..80a0a8983 100644 --- a/charts/stable/templates/deploy-ui.yaml +++ b/charts/stable/templates/deploy-ui.yaml @@ -10,6 +10,10 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/version: {{ .Chart.Version }} app.kubernetes.io/component: {{ $name }} + {{- if .Values.ui.annotations }} + annotations: +{{ toYaml .Values.ui.annotations | indent 4 }} + {{- end }} spec: replicas: {{ .Values.ui.replicas }} selector: diff --git a/charts/stable/values.yaml b/charts/stable/values.yaml index 2367dae54..db7143421 100644 --- a/charts/stable/values.yaml +++ b/charts/stable/values.yaml @@ -13,6 +13,7 @@ image: ## api: replicas: 1 + annotations: {} resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little @@ -35,6 +36,7 @@ api: ## ui: replicas: 1 + annotations: {} resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little diff --git a/code/api/database/pom.xml b/code/api/database/pom.xml index a825c74c0..8ae3815ee 100644 --- a/code/api/database/pom.xml +++ b/code/api/database/pom.xml @@ -28,7 +28,7 @@ com.decathlon.ara ara-database - 7.1.3 + 7.1.4 ARA Database diff --git a/code/api/generated-cucumber-report/pom.xml b/code/api/generated-cucumber-report/pom.xml index 99292b88e..5e93c5c4a 100644 --- a/code/api/generated-cucumber-report/pom.xml +++ b/code/api/generated-cucumber-report/pom.xml @@ -27,7 +27,7 @@ com.decathlon.ara ara-generated-cucumber-report - 7.1.3 + 7.1.4 ARA Cucumber diff --git a/code/api/lib/pom.xml b/code/api/lib/pom.xml index 7cda9d9f3..6e0e29f89 100644 --- a/code/api/lib/pom.xml +++ b/code/api/lib/pom.xml @@ -27,7 +27,7 @@ com.decathlon.ara ara-lib - 7.1.3 + 7.1.4 14 diff --git a/code/api/pom.xml b/code/api/pom.xml index ce131a3fd..77ea38d78 100644 --- a/code/api/pom.xml +++ b/code/api/pom.xml @@ -28,7 +28,7 @@ com.decathlon.ara ara-parent pom - 7.1.3 + 7.1.4 ARA Parent diff --git a/code/api/server/pom.xml b/code/api/server/pom.xml index c2e62843b..bacc4ab00 100644 --- a/code/api/server/pom.xml +++ b/code/api/server/pom.xml @@ -28,7 +28,7 @@ com.decathlon.ara ara-server - 7.1.3 + 7.1.4 ARA Server