diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4b3a8cd..e7d9023 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ stages: + - prepare - container - container:boot diff --git a/.gitlab/ci/container-boot.gitlab-ci.yml b/.gitlab/ci/container-boot.gitlab-ci.yml index 86c8169..e3e065e 100644 --- a/.gitlab/ci/container-boot.gitlab-ci.yml +++ b/.gitlab/ci/container-boot.gitlab-ci.yml @@ -18,6 +18,7 @@ extends: - .container:boot needs: + - generate-environment - manifest:sagittarius parallel: matrix: @@ -57,6 +58,7 @@ container:boot:aquila: extends: - .container:boot needs: + - generate-environment - manifest:aquila - manifest:sagittarius variables: @@ -80,6 +82,7 @@ container:boot:taurus: extends: - .container:boot needs: + - generate-environment - manifest:taurus script: - bundle install @@ -93,6 +96,7 @@ container:boot:draco: extends: - .container:boot needs: + - generate-environment - manifest:draco parallel: matrix: @@ -114,6 +118,7 @@ container:boot:sculptor: extends: - .container:boot needs: + - generate-environment - manifest:sculptor parallel: matrix: diff --git a/.gitlab/ci/container-build.gitlab-ci.yml b/.gitlab/ci/container-build.gitlab-ci.yml index 7fe1a28..a23dc23 100644 --- a/.gitlab/ci/container-build.gitlab-ci.yml +++ b/.gitlab/ci/container-build.gitlab-ci.yml @@ -33,7 +33,7 @@ - > build_image $image - $CI_PIPELINE_ID + $RETICULUM_CONTAINER_VERSION " --output type=registry,push-by-digest=true --metadata-file manifest-${CI_JOB_ID}.json @@ -62,7 +62,7 @@ - > build_image $image - $CI_PIPELINE_ID + $RETICULUM_CONTAINER_VERSION " --build-arg VARIANT=$VARIANT --output type=registry,push-by-digest=true @@ -86,34 +86,40 @@ variables: PLATFORM: amd64 script: - - create_manifest $image $(get_image_tag $CI_PIPELINE_ID $VARIANT) + - create_manifest $image $(get_image_tag $RETICULUM_CONTAINER_VERSION $VARIANT) container:mise: extends: - .single-image-build-base + needs: + - generate-environment manifest:mise: extends: - .manifest-create-base needs: + - generate-environment - container:mise container:rust: extends: - .single-image-build-base needs: + - generate-environment - manifest:mise manifest:rust: extends: - .manifest-create-base needs: + - generate-environment - container:rust container:aquila: extends: - .single-image-build-base needs: + - generate-environment - manifest:rust variables: NEED_PROJECT_DOWNLOAD: 'true' @@ -122,12 +128,14 @@ manifest:aquila: extends: - .manifest-create-base needs: + - generate-environment - container:aquila container:draco: extends: - .variant-image-build-base needs: + - generate-environment - manifest:rust variables: NEED_PROJECT_DOWNLOAD: 'true' @@ -149,6 +157,7 @@ manifest:draco: - rest - cron needs: + - generate-environment - job: container:draco parallel: matrix: @@ -161,6 +170,7 @@ container:taurus: extends: - .single-image-build-base needs: + - generate-environment - manifest:rust variables: NEED_PROJECT_DOWNLOAD: 'true' @@ -169,36 +179,42 @@ manifest:taurus: extends: - .manifest-create-base needs: + - generate-environment - container:taurus container:ruby: extends: - .single-image-build-base needs: + - generate-environment - manifest:mise manifest:ruby: extends: - .manifest-create-base needs: + - generate-environment - container:ruby container:postgresql: extends: - .single-image-build-base needs: + - generate-environment - manifest:mise manifest:postgresql: extends: - .manifest-create-base needs: + - generate-environment - container:postgresql container:sagittarius: extends: - .variant-image-build-base needs: + - generate-environment - manifest:ruby - manifest:postgresql variables: @@ -221,6 +237,7 @@ manifest:sagittarius: - ce - ee needs: + - generate-environment - job: container:sagittarius parallel: matrix: @@ -233,18 +250,21 @@ container:node: extends: - .single-image-build-base needs: + - generate-environment - manifest:mise manifest:node: extends: - .manifest-create-base needs: + - generate-environment - container:node container:sculptor: extends: - .variant-image-build-base needs: + - generate-environment - manifest:node variables: NEED_PROJECT_DOWNLOAD: 'true' @@ -268,6 +288,7 @@ manifest:sculptor: - ee - cloud needs: + - generate-environment - job: container:sculptor parallel: matrix: diff --git a/.gitlab/ci/prepare.gitlab-ci.yml b/.gitlab/ci/prepare.gitlab-ci.yml new file mode 100644 index 0000000..2d4c9cb --- /dev/null +++ b/.gitlab/ci/prepare.gitlab-ci.yml @@ -0,0 +1,15 @@ +generate-environment: + stage: prepare + image: alpine:3.22 + script: + - echo "RETICULUM_CONTAINER_VERSION=$(cat VERSION)-experimental-$CI_PIPELINE_ID-$CI_COMMIT_SHA" > .gitlab/ci/env + - | + echo -e "\e[0Ksection_start:`date +%s`:glpa_summary\r\e[0KHeader of the summary" + grep 'RETICULUM_CONTAINER_VERSION=' .gitlab/ci/env + echo -e "\e[0Ksection_end:`date +%s`:glpa_summary\r\e[0K" + artifacts: + expire_in: 1 day + reports: + dotenv: .gitlab/ci/env + paths: + - .gitlab/ci/env diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..bd52db8 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.0.0 \ No newline at end of file diff --git a/support/docker-compose.yml b/support/docker-compose.yml index 6f50d0a..16e7fb9 100644 --- a/support/docker-compose.yml +++ b/support/docker-compose.yml @@ -9,7 +9,7 @@ services: POSTGRES_DB: sagittarius_production sagittarius-rails-web: - image: ghcr.io/code0-tech/reticulum/ci-builds/sagittarius:${CI_PIPELINE_ID}-${SAGITTARIUS_VARIANT} + image: ghcr.io/code0-tech/reticulum/ci-builds/sagittarius:${RETICULUM_CONTAINER_VERSION}-${SAGITTARIUS_VARIANT} networks: - boot volumes: @@ -31,7 +31,7 @@ services: - http://sagittarius-rails-web:3000/health/liveness sagittarius-grpc: - image: ghcr.io/code0-tech/reticulum/ci-builds/sagittarius:${CI_PIPELINE_ID}-${SAGITTARIUS_VARIANT} + image: ghcr.io/code0-tech/reticulum/ci-builds/sagittarius:${RETICULUM_CONTAINER_VERSION}-${SAGITTARIUS_VARIANT} networks: - boot volumes: @@ -51,7 +51,7 @@ services: - -js aquila: - image: ghcr.io/code0-tech/reticulum/ci-builds/aquila:${CI_PIPELINE_ID} + image: ghcr.io/code0-tech/reticulum/ci-builds/aquila:${RETICULUM_CONTAINER_VERSION} networks: - boot environment: @@ -65,7 +65,7 @@ services: - "8081:8081" taurus: - image: ghcr.io/code0-tech/reticulum/ci-builds/taurus:${CI_PIPELINE_ID} + image: ghcr.io/code0-tech/reticulum/ci-builds/taurus:${RETICULUM_CONTAINER_VERSION} networks: - boot environment: @@ -77,7 +77,7 @@ services: - "8082:8082" draco: - image: ghcr.io/code0-tech/reticulum/ci-builds/draco:${CI_PIPELINE_ID}-${DRACO_VARIANT} + image: ghcr.io/code0-tech/reticulum/ci-builds/draco:${RETICULUM_CONTAINER_VERSION}-${DRACO_VARIANT} networks: - boot environment: @@ -89,7 +89,7 @@ services: - "8083:8083" sculptor: - image: ghcr.io/code0-tech/reticulum/ci-builds/sculptor:${CI_PIPELINE_ID}-${SCULPTOR_VARIANT} + image: ghcr.io/code0-tech/reticulum/ci-builds/sculptor:${RETICULUM_CONTAINER_VERSION}-${SCULPTOR_VARIANT} networks: - boot