From 30948b4db9f95d986c0e98bf82bfc348e954de86 Mon Sep 17 00:00:00 2001 From: Zedifus Date: Tue, 10 Dec 2024 13:50:57 +0000 Subject: [PATCH 01/12] Append job id to builder & context Stops parallel jobs clashing --- .gitlab/docker-build.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitlab/docker-build.yml b/.gitlab/docker-build.yml index aa578e97..9af25062 100644 --- a/.gitlab/docker-build.yml +++ b/.gitlab/docker-build.yml @@ -30,6 +30,8 @@ docker-build-dev: - docker run --rm --privileged aptman/qus -s -- -p aarch64 x86_64 - echo $CI_JOB_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY - echo $DOCKERHUB_TOKEN | docker login -u "$DOCKERHUB_USER" --password-stdin $DOCKERHUB_REGISTRY + - docker context create tls-environment-$CI_JOB_ID + - docker buildx create --name zedBuilder-$CI_JOB_ID --use tls-environment-$CI_JOB_ID script: - | tag=":$CI_COMMIT_REF_SLUG" @@ -37,8 +39,6 @@ docker-build-dev: - | echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" echo "Crafty Version: $VERSION" - - docker context create tls-environment - - docker buildx create --name zedBuilder --use tls-environment - docker buildx build --cache-from type=registry,ref="$CI_REGISTRY_IMAGE${tag}" --build-arg BUILDKIT_INLINE_CACHE=1 @@ -52,8 +52,8 @@ docker-build-dev: --push . after_script: - | - docker buildx rm zedBuilder && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance." - docker context rm tls-environment || true + docker buildx rm zedBuilder-$CI_JOB_ID && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance." + docker context rm tls-environment-$CI_JOB_ID || true echo "Please review multi-arch manifests are present:" docker buildx imagetools inspect "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" @@ -87,6 +87,8 @@ docker-build-prod: - docker run --rm --privileged aptman/qus -s -- -p aarch64 x86_64 - echo $CI_JOB_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY - echo $DOCKERHUB_TOKEN | docker login -u "$DOCKERHUB_USER" --password-stdin $DOCKERHUB_REGISTRY + - docker context create tls-environment-$CI_JOB_ID + - docker buildx create --name zedBuilder-$CI_JOB_ID --use tls-environment-$CI_JOB_ID script: - | VERSION="${MAJOR}.${MINOR}.${SUB}" @@ -110,7 +112,7 @@ docker-build-prod: --push . after_script: - | - docker buildx rm zedBuilder && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance." - docker context rm tls-environment || true + docker buildx rm zedBuilder-$CI_JOB_ID && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance." + docker context rm tls-environment-$CI_JOB_ID || true echo "Please review multi-arch manifests are present:" docker buildx imagetools inspect "$CI_REGISTRY_IMAGE${tag}" From 3eeb6d8a2a20036eca80184bfcf10de6e395f0ff Mon Sep 17 00:00:00 2001 From: Glenn Schuurman Date: Tue, 10 Dec 2024 19:24:56 +0000 Subject: [PATCH 02/12] Upgrade crafty to ubuntu 24.04 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d05cf3d0..8c16e3a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ENV DEBIAN_FRONTEND="noninteractive" @@ -36,7 +36,7 @@ WORKDIR /crafty COPY --chown=crafty:root requirements.txt ./ RUN python3 -m venv ./.venv \ && . .venv/bin/activate \ - && pip3 install --no-cache-dir --upgrade setuptools==50.3.2 pip==22.0.3 \ + && pip3 install --no-cache-dir --upgrade setuptools==75.6.0 pip==24.3.1 \ && pip3 install --no-cache-dir -r requirements.txt \ && deactivate USER root From dc8db04228ece3cca36d0d37f445ed85cf0c9dbb Mon Sep 17 00:00:00 2001 From: Zedifus Date: Tue, 10 Dec 2024 19:50:12 +0000 Subject: [PATCH 03/12] Consolidate separate prod & dev build jobs into one, adding rule for nightly builds --- .gitlab-ci.yml | 3 +- .gitlab/docker-build.yml | 151 ++++++++++++++++----------------------- 2 files changed, 64 insertions(+), 90 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 03144b48..4fbfb834 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,8 +5,7 @@ stages: - lint - test - - prod-deployment - - dev-deployment + - build-and-deploy - release variables: diff --git a/.gitlab/docker-build.yml b/.gitlab/docker-build.yml index 9af25062..454bc2d2 100644 --- a/.gitlab/docker-build.yml +++ b/.gitlab/docker-build.yml @@ -1,81 +1,42 @@ # yamllint disable rule:line-length --- -docker-build-dev: +docker-build: image: docker:latest services: - name: docker:dind - stage: dev-deployment + stage: build-and-deploy tags: - docker_priv - rules: - - if: $CI_COMMIT_BRANCH == 'dev' - environment: - name: development - before_script: - - | - apk --no-cache add jq - MAJOR=$(cat app/config/version.json | jq '.major' ) - MINOR=$(cat app/config/version.json | jq '.minor' ) - SUB=$(cat app/config/version.json | jq '.sub' ) - - | - apk --no-cache add curl - latest_tag=$(curl -s https://api.github.com/repos/docker/buildx/releases/latest | sed -Ene '/^ *"tag_name": *"(v.+)",$/s//\1/p') - echo "Using buildx version $latest_tag" - curl -sSLo docker-buildx "https://github.com/docker/buildx/releases/download/$latest_tag/buildx-$latest_tag.linux-amd64" - chmod a+x docker-buildx - mkdir -p ~/.docker/cli-plugins - mv docker-buildx ~/.docker/cli-plugins/docker-buildx - docker version - - docker run --rm --privileged aptman/qus -- -r - - docker run --rm --privileged aptman/qus -s -- -p aarch64 x86_64 - - echo $CI_JOB_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY - - echo $DOCKERHUB_TOKEN | docker login -u "$DOCKERHUB_USER" --password-stdin $DOCKERHUB_REGISTRY - - docker context create tls-environment-$CI_JOB_ID - - docker buildx create --name zedBuilder-$CI_JOB_ID --use tls-environment-$CI_JOB_ID - script: - - | - tag=":$CI_COMMIT_REF_SLUG" - VERSION="${MAJOR}.${MINOR}.${SUB}" - - | - echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" - echo "Crafty Version: $VERSION" - - docker buildx build - --cache-from type=registry,ref="$CI_REGISTRY_IMAGE${tag}" - --build-arg BUILDKIT_INLINE_CACHE=1 - --build-arg "BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ")" - --build-arg "BUILD_REF=${CI_COMMIT_SHA}" - --build-arg "CRAFTY_VER=${VERSION}" - --provenance false - --tag "$CI_REGISTRY_IMAGE${tag}" - --tag "arcadiatechnology/crafty-4${tag}" - --platform linux/arm64/v8,linux/amd64 - --push . - after_script: - - | - docker buildx rm zedBuilder-$CI_JOB_ID && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance." - docker context rm tls-environment-$CI_JOB_ID || true - echo "Please review multi-arch manifests are present:" - docker buildx imagetools inspect "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" -docker-build-prod: - image: docker:latest - services: - - name: docker:dind - stage: prod-deployment - tags: - - docker_priv rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + # Development branch + - if: $CI_COMMIT_BRANCH == 'dev' + variables: + ENVIRONMENT_NAME: "development" + DOCKER_TAGS: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG arcadiatechnology/crafty-4:$CI_COMMIT_REF_SLUG" + # Production branch (main) when not scheduled + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE != "schedule" + variables: + ENVIRONMENT_NAME: "production" + # We'll set the version in the script and append stable tags + DOCKER_TAGS: "" # We'll determine in script + # Scheduled nightly builds on main + - if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + variables: + ENVIRONMENT_NAME: "production" + DOCKER_TAGS: "$CI_REGISTRY_IMAGE:nightly arcadiatechnology/crafty-4:nightly" + environment: - name: production + name: $ENVIRONMENT_NAME + before_script: - | - apk --no-cache add jq - MAJOR=$(cat app/config/version.json | jq '.major' ) - MINOR=$(cat app/config/version.json | jq '.minor' ) - SUB=$(cat app/config/version.json | jq '.sub' ) + apk --no-cache add jq curl + MAJOR=$(cat app/config/version.json | jq -r '.major') + MINOR=$(cat app/config/version.json | jq -r '.minor') + SUB=$(cat app/config/version.json | jq -r '.sub') + VERSION="${MAJOR}.${MINOR}.${SUB}" - | - apk --no-cache add curl latest_tag=$(curl -s https://api.github.com/repos/docker/buildx/releases/latest | sed -Ene '/^ *"tag_name": *"(v.+)",$/s//\1/p') echo "Using buildx version $latest_tag" curl -sSLo docker-buildx "https://github.com/docker/buildx/releases/download/$latest_tag/buildx-$latest_tag.linux-amd64" @@ -89,30 +50,44 @@ docker-build-prod: - echo $DOCKERHUB_TOKEN | docker login -u "$DOCKERHUB_USER" --password-stdin $DOCKERHUB_REGISTRY - docker context create tls-environment-$CI_JOB_ID - docker buildx create --name zedBuilder-$CI_JOB_ID --use tls-environment-$CI_JOB_ID + script: + - echo "Running on branch '$CI_COMMIT_BRANCH', environment: $ENVIRONMENT_NAME" + - echo "Crafty Version: $VERSION" + + # If DOCKER_TAGS is empty (production default branch and not schedule), we set stable tags: + # This scenario adds both VERSION and 'latest' tags. - | - VERSION="${MAJOR}.${MINOR}.${SUB}" - - | - echo "Running on branch '$CI_COMMIT_BRANCH'" - echo "Crafty Version: $VERSION" - - docker context create tls-environment - - docker buildx create --name zedBuilder --use tls-environment - - docker buildx build - --cache-from type=registry,ref="$CI_REGISTRY_IMAGE:latest" - --build-arg BUILDKIT_INLINE_CACHE=1 - --build-arg "BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ")" - --build-arg "BUILD_REF=${CI_COMMIT_SHA}" - --build-arg "CRAFTY_VER=${VERSION}" - --provenance false - --tag "$CI_REGISTRY_IMAGE:$VERSION" - --tag "$CI_REGISTRY_IMAGE:latest" - --tag "arcadiatechnology/crafty-4:$VERSION" - --tag "arcadiatechnology/crafty-4:latest" - --platform linux/arm64/v8,linux/amd64 + if [ "$ENVIRONMENT_NAME" = "production" ] && [ -z "$DOCKER_TAGS" ]; then + DOCKER_TAGS="$CI_REGISTRY_IMAGE:${VERSION} \ + $CI_REGISTRY_IMAGE:latest \ + arcadiatechnology/crafty-4:${VERSION} \ + arcadiatechnology/crafty-4:latest" + fi + + - echo "Using the following tags: $DOCKER_TAGS" + + # Prepare build command + # We break DOCKER_TAGS into separate --tag arguments + - TARGS="" + - for t in $DOCKER_TAGS; do TARGS="$TARGS --tag $t"; done + - echo "Tag arguments: $TARGS" + + - docker buildx build \ + --cache-from type=registry,ref="$CI_REGISTRY_IMAGE:latest" \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ + --build-arg "BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ")" \ + --build-arg "BUILD_REF=${CI_COMMIT_SHA}" \ + --build-arg "CRAFTY_VER=${VERSION}" \ + --provenance false \ + $TARGS \ + --platform linux/arm64/v8,linux/amd64 \ --push . + after_script: - - | - docker buildx rm zedBuilder-$CI_JOB_ID && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance." - docker context rm tls-environment-$CI_JOB_ID || true - echo "Please review multi-arch manifests are present:" - docker buildx imagetools inspect "$CI_REGISTRY_IMAGE${tag}" + - docker buildx rm zedBuilder-$CI_JOB_ID && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance." + - docker context rm tls-environment-$CI_JOB_ID || true + - echo "Please review multi-arch manifests are present:" + - if [ "$ENVIRONMENT_NAME" = "development" ]; then docker buildx imagetools inspect "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"; fi + - if [ "$ENVIRONMENT_NAME" = "production" ] && [ -n "$VERSION" ]; then docker buildx imagetools inspect "$CI_REGISTRY_IMAGE:$VERSION"; fi + - if echo "$DOCKER_TAGS" | grep -q "nightly"; then docker buildx imagetools inspect "$CI_REGISTRY_IMAGE:nightly"; fi From 148a548df57ed01aaf3827e29bca2e65465c34fa Mon Sep 17 00:00:00 2001 From: Zedifus Date: Tue, 10 Dec 2024 19:59:56 +0000 Subject: [PATCH 04/12] Omit cache on nightly builds --- .gitlab/docker-build.yml | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/.gitlab/docker-build.yml b/.gitlab/docker-build.yml index 454bc2d2..342927ca 100644 --- a/.gitlab/docker-build.yml +++ b/.gitlab/docker-build.yml @@ -73,16 +73,31 @@ docker-build: - for t in $DOCKER_TAGS; do TARGS="$TARGS --tag $t"; done - echo "Tag arguments: $TARGS" - - docker buildx build \ - --cache-from type=registry,ref="$CI_REGISTRY_IMAGE:latest" \ - --build-arg BUILDKIT_INLINE_CACHE=1 \ - --build-arg "BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ")" \ - --build-arg "BUILD_REF=${CI_COMMIT_SHA}" \ - --build-arg "CRAFTY_VER=${VERSION}" \ - --provenance false \ - $TARGS \ - --platform linux/arm64/v8,linux/amd64 \ - --push . + # Conditional build command: omit cache if schedule + - | + if [ "$CI_PIPELINE_SOURCE" = "schedule" ]; then + echo "Omitting cache for nightly build." + docker buildx build \ + --build-arg "BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ")" \ + --build-arg "BUILD_REF=${CI_COMMIT_SHA}" \ + --build-arg "CRAFTY_VER=${VERSION}" \ + --provenance false \ + $TARGS \ + --platform linux/arm64/v8,linux/amd64 \ + --push . + else + echo "Using cache for build." + docker buildx build \ + --cache-from type=registry,ref="$CI_REGISTRY_IMAGE:latest" \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ + --build-arg "BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ")" \ + --build-arg "BUILD_REF=${CI_COMMIT_SHA}" \ + --build-arg "CRAFTY_VER=${VERSION}" \ + --provenance false \ + $TARGS \ + --platform linux/arm64/v8,linux/amd64 \ + --push . + fi after_script: - docker buildx rm zedBuilder-$CI_JOB_ID && echo "Successfully Stopped builder instance" || echo "Failed to stop builder instance." From a7c370f78261c3ae2500050d3f12805e819500ca Mon Sep 17 00:00:00 2001 From: Zedifus Date: Tue, 10 Dec 2024 20:46:05 +0000 Subject: [PATCH 05/12] Appease Gitlab's ci validator, also cache from dev for normal builds Nightlys omit cache, dev will be merged into master, so caching master from dev shortly after merge makes sense --- .gitlab/docker-build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab/docker-build.yml b/.gitlab/docker-build.yml index 342927ca..af8b9673 100644 --- a/.gitlab/docker-build.yml +++ b/.gitlab/docker-build.yml @@ -52,8 +52,8 @@ docker-build: - docker buildx create --name zedBuilder-$CI_JOB_ID --use tls-environment-$CI_JOB_ID script: - - echo "Running on branch '$CI_COMMIT_BRANCH', environment: $ENVIRONMENT_NAME" - - echo "Crafty Version: $VERSION" + - echo "Running on branch '$CI_COMMIT_BRANCH', environment- $ENVIRONMENT_NAME" + - echo "Crafty Version- $VERSION" # If DOCKER_TAGS is empty (production default branch and not schedule), we set stable tags: # This scenario adds both VERSION and 'latest' tags. @@ -65,13 +65,13 @@ docker-build: arcadiatechnology/crafty-4:latest" fi - - echo "Using the following tags: $DOCKER_TAGS" + - echo "Using the following tags- $DOCKER_TAGS" # Prepare build command # We break DOCKER_TAGS into separate --tag arguments - TARGS="" - for t in $DOCKER_TAGS; do TARGS="$TARGS --tag $t"; done - - echo "Tag arguments: $TARGS" + - echo "Tag arguments- $TARGS" # Conditional build command: omit cache if schedule - | @@ -88,7 +88,7 @@ docker-build: else echo "Using cache for build." docker buildx build \ - --cache-from type=registry,ref="$CI_REGISTRY_IMAGE:latest" \ + --cache-from type=registry,ref="$CI_REGISTRY_IMAGE:dev" \ --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg "BUILD_DATE=$(date +"%Y-%m-%dT%H:%M:%SZ")" \ --build-arg "BUILD_REF=${CI_COMMIT_SHA}" \ From 589448a244fe9b7f072418b95f81fcddbfc07c3f Mon Sep 17 00:00:00 2001 From: Zedifus Date: Tue, 10 Dec 2024 20:48:57 +0000 Subject: [PATCH 06/12] Fix windows builds after stage rename --- .gitlab/windows-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/windows-build.yml b/.gitlab/windows-build.yml index 2dd6fb50..85437715 100644 --- a/.gitlab/windows-build.yml +++ b/.gitlab/windows-build.yml @@ -1,7 +1,7 @@ # yamllint disable rule:line-length --- win-dev-build: - stage: dev-deployment + stage: build-and-deploy tags: - win64 cache: @@ -48,7 +48,7 @@ win-dev-build: - app\classes\**\* win-prod-build: - stage: prod-deployment + stage: build-and-deploy tags: - win64 cache: From 6bb23db3bd6154eee208bc204e131e44c86fa8c5 Mon Sep 17 00:00:00 2001 From: Zedifus Date: Tue, 10 Dec 2024 21:11:28 +0000 Subject: [PATCH 07/12] Exclude other pipeline jobs from nightly schedule --- .gitlab/lint.yml | 12 ++++++++++++ .gitlab/release.yml | 2 ++ .gitlab/windows-build.yml | 4 ++++ 3 files changed, 18 insertions(+) diff --git a/.gitlab/lint.yml b/.gitlab/lint.yml index 5cfae504..db223801 100644 --- a/.gitlab/lint.yml +++ b/.gitlab/lint.yml @@ -9,6 +9,8 @@ yamllint: rules: - if: "$CODE_QUALITY_DISABLED" when: never + - if: $CI_PIPELINE_SOURCE == "schedule" + when: never - if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH" script: - yamllint . @@ -22,6 +24,8 @@ jsonlint: rules: - if: "$CODE_QUALITY_DISABLED" when: never + - if: $CI_PIPELINE_SOURCE == "schedule" + when: never - if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH" script: - | @@ -37,6 +41,8 @@ black: rules: - if: "$CODE_QUALITY_DISABLED" when: never + - if: $CI_PIPELINE_SOURCE == "schedule" + when: never - if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH" script: - black --check --verbose -- . @@ -50,6 +56,8 @@ pylint: rules: - if: "$CODE_QUALITY_DISABLED" when: never + - if: $CI_PIPELINE_SOURCE == "schedule" + when: never - if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH" before_script: - apk update @@ -75,6 +83,8 @@ sonarcloud-check: when: never - if: "$CODE_QUALITY_DISABLED" when: never + - if: $CI_PIPELINE_SOURCE == "schedule" + when: never - if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH" variables: SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache @@ -94,6 +104,8 @@ sonarcloud-check: # rules: # - if: "$CODE_QUALITY_DISABLED" # when: never +# - if: $CI_PIPELINE_SOURCE == "schedule" +# when: never # - if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH" # allow_failure: true # before_script: diff --git a/.gitlab/release.yml b/.gitlab/release.yml index f1ed61da..d9c05824 100644 --- a/.gitlab/release.yml +++ b/.gitlab/release.yml @@ -4,6 +4,8 @@ release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + when: never - if: $CI_COMMIT_TAG needs: - job: win-prod-build diff --git a/.gitlab/windows-build.yml b/.gitlab/windows-build.yml index 85437715..a883e115 100644 --- a/.gitlab/windows-build.yml +++ b/.gitlab/windows-build.yml @@ -8,6 +8,8 @@ win-dev-build: paths: - .venv/ rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + when: never - if: "$CI_COMMIT_BRANCH == 'dev'" environment: name: development @@ -55,6 +57,8 @@ win-prod-build: paths: - .venv/ rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + when: never - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH" - if: $CI_COMMIT_TAG environment: From 8dc4e27db065ed6ea8695214eab196d63109586a Mon Sep 17 00:00:00 2001 From: Zedifus Date: Tue, 10 Dec 2024 21:22:49 +0000 Subject: [PATCH 08/12] Move nightly builds to their own environment --- .gitlab/docker-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/docker-build.yml b/.gitlab/docker-build.yml index af8b9673..ad83f135 100644 --- a/.gitlab/docker-build.yml +++ b/.gitlab/docker-build.yml @@ -23,7 +23,7 @@ docker-build: # Scheduled nightly builds on main - if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH variables: - ENVIRONMENT_NAME: "production" + ENVIRONMENT_NAME: "nightly" DOCKER_TAGS: "$CI_REGISTRY_IMAGE:nightly arcadiatechnology/crafty-4:nightly" environment: @@ -105,4 +105,4 @@ docker-build: - echo "Please review multi-arch manifests are present:" - if [ "$ENVIRONMENT_NAME" = "development" ]; then docker buildx imagetools inspect "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"; fi - if [ "$ENVIRONMENT_NAME" = "production" ] && [ -n "$VERSION" ]; then docker buildx imagetools inspect "$CI_REGISTRY_IMAGE:$VERSION"; fi - - if echo "$DOCKER_TAGS" | grep -q "nightly"; then docker buildx imagetools inspect "$CI_REGISTRY_IMAGE:nightly"; fi + - if [ "$ENVIRONMENT_NAME" = "nightly" ]; then docker buildx imagetools inspect "$CI_REGISTRY_IMAGE:nightly"; fi From 656c967151d02340d4f1452f2e27b8a0b9bb355e Mon Sep 17 00:00:00 2001 From: Zedifus Date: Tue, 10 Dec 2024 21:34:36 +0000 Subject: [PATCH 09/12] Update changelog !813 !812 --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 477fb3fa..447cff09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,13 @@ TBD ### Refactor - Refactor and standardize all JSON validator errors returning human readable translations ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/786)) +- Improve docker-build CI/CD, supporting nightly builds ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/813)) ### Bug fixes - Bump requests to resolve yank for CVE-2024-35195 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/808)) ### Tweaks -TBD +- Bump Docker base image `22.04` -> `24.04` ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/812)) +- Bump python pip `2.0.3` -> `24.3.1` ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/812)) +- Bump python setuptools `50.3.2` -> `75.6.0` ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/812)) ### Lang - Weblate Translation Platform Integration - Remove incomplete labels from translation files to better support new translation workflow ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/810)) From 8d6fe95393e30ceb2d3fd9bec0dd247a7bc2a78e Mon Sep 17 00:00:00 2001 From: Zedifus Date: Tue, 10 Dec 2024 22:35:39 +0000 Subject: [PATCH 10/12] Update changelog !811 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 447cff09..9a725bcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ TBD ### Lang - Weblate Translation Platform Integration - Remove incomplete labels from translation files to better support new translation workflow ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/810)) +- New langs added `ja_JP`, `ko_KR` ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/811))

## --- [4.4.4] - 2024/10/03 From 6d07ad651120d2fec79eddf330b09d42028ca34c Mon Sep 17 00:00:00 2001 From: Zedifus Date: Tue, 10 Dec 2024 22:39:56 +0000 Subject: [PATCH 11/12] Bump tornado for CVE-2024-52804 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-52804 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7bc5ae87..b01144c8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,7 +15,7 @@ pyjwt==2.8.0 PyYAML==6.0.1 requests==2.32.3 termcolor==1.1 -tornado==6.4.1 +tornado==6.4.2 tzlocal==5.1 jsonschema==4.19.1 orjson==3.9.15 From 284a177580235ca8a761f90e70738628fdaf4de1 Mon Sep 17 00:00:00 2001 From: Zedifus Date: Tue, 10 Dec 2024 22:44:10 +0000 Subject: [PATCH 12/12] Update changelog !814 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a725bcc..68261b23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ TBD - Bump Docker base image `22.04` -> `24.04` ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/812)) - Bump python pip `2.0.3` -> `24.3.1` ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/812)) - Bump python setuptools `50.3.2` -> `75.6.0` ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/812)) +- Bump tornado for CVE-2024-52804 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/814)) ### Lang - Weblate Translation Platform Integration - Remove incomplete labels from translation files to better support new translation workflow ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/810))