-
Notifications
You must be signed in to change notification settings - Fork 74
pipeline to build scna and push model engine for sg2.0 #795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
osayandehenry
merged 5 commits into
main
from
osayandehenry-iyasere/gfd-444-cicd-pipeline-for-model-engine-llm-engine
Apr 3, 2026
+85
−0
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
672e870
pipeline to build scna and push model engine for sg2.0
osayandehenry ea0a8c0
added comment about apps-dev
osayandehenry 35f6748
Merge branch 'main' into osayandehenry-iyasere/gfd-444-cicd-pipeline-…
osayandehenry 8ed1386
Merge branch 'main' into osayandehenry-iyasere/gfd-444-cicd-pipeline-…
osayandehenry b3627ea
Merge branch 'main' into osayandehenry-iyasere/gfd-444-cicd-pipeline-…
osayandehenry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| # ───────────────────────────────────────────────────────────────────────────── | ||
| # Model Engine (LLM Engine) — SG2.0 Build Pipeline | ||
| # | ||
| # Builds the FIPS model-engine image, scans with Grype, pushes to Harbor. | ||
| # Uses the standard scalegov2-pipelines templates with overrides for | ||
| # Chainguard private registry auth. | ||
| # | ||
| # GFD-444 — https://linear.app/scale-epd/issue/GFD-444 | ||
| # | ||
| # Required CI/CD Variables (set in GitLab project settings): | ||
| # HARBOR_USER — Harbor robot account username | ||
| # IMPORTANT: Uncheck "Expand variable reference" if it contains $ | ||
| # HARBOR_PASSWORD — Harbor robot account token (mask this) | ||
| # CHAINGUARD_USER — Chainguard registry username | ||
| # CHAINGUARD_PASSWORD — Chainguard registry token (mask this) | ||
| # ───────────────────────────────────────────────────────────────────────────── | ||
|
|
||
| include: | ||
| - project: 'scalegov/scalegov2-pipelines' | ||
| ref: main | ||
| file: '/templates/docker-build.yml' | ||
| - project: 'scalegov/scalegov2-pipelines' | ||
| ref: main | ||
| file: '/templates/scan.yml' | ||
|
|
||
| workflow: | ||
| rules: | ||
| - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' | ||
| - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' | ||
| - if: '$CI_COMMIT_TAG' | ||
| - if: '$CI_PIPELINE_SOURCE == "web"' | ||
| - when: never | ||
|
|
||
| variables: | ||
| SERVICE_NAME: "model-engine" | ||
| # All builds push to apps-dev. Promotion to apps-staging / apps-prod is | ||
| # handled by the scalegov2-promotion pipeline, not this build pipeline. | ||
| HARBOR_PROJECT: "apps-dev" | ||
| DOCKERFILE_PATH: "model-engine/Dockerfile.fips" | ||
|
|
||
| # ───────────────────────────────────────────────────────────────────────────── | ||
| # compute-tag — Semver + datetime + commit SHA tag | ||
| # | ||
| # Reads VERSION file and produces tags like: 1.0.0-20260401-a1b2c3d4 | ||
| # Sets IMAGE_TAG_OVERRIDE via dotenv artifact so the template's tag | ||
| # computation picks it up (highest precedence). | ||
| # ───────────────────────────────────────────────────────────────────────────── | ||
| compute-tag: | ||
| stage: .pre | ||
| image: alpine:latest | ||
| before_script: | ||
| - apk add --no-cache git | ||
| script: | ||
| - | | ||
| if [ -f VERSION ]; then | ||
| SEMVER="$(cat VERSION | tr -d ' \r\n')" | ||
| else | ||
| SEMVER="0.0.0" | ||
| fi | ||
| DATETIME="$(date -u +%Y%m%d)" | ||
| SHA_SHORT="${CI_COMMIT_SHORT_SHA:-local}" | ||
| IMAGE_TAG="${SEMVER}-${DATETIME}-${SHA_SHORT}" | ||
| echo "IMAGE_TAG_OVERRIDE=${IMAGE_TAG}" > tag.env | ||
| echo "Computed tag: ${IMAGE_TAG}" | ||
| artifacts: | ||
| reports: | ||
| dotenv: tag.env | ||
|
|
||
| # ───────────────────────────────────────────────────────────────────────────── | ||
| # Build job overrides | ||
| # | ||
| # The Dockerfile.fips base image (cgr.dev/scale.com/python-fips) lives in | ||
| # Scale's private Chainguard registry. We extend the template's before_script | ||
| # with a docker login to cgr.dev so the DinD daemon can pull it. | ||
| # ───────────────────────────────────────────────────────────────────────────── | ||
| build: | ||
| before_script: | ||
| - !reference [.docker-build-base, before_script] | ||
| - echo "${CHAINGUARD_PASSWORD}" | docker login -u "${CHAINGUARD_USER}" --password-stdin cgr.dev | ||
|
|
||
| build-mr: | ||
| before_script: | ||
| - !reference [.docker-build-base, before_script] | ||
| - echo "${CHAINGUARD_PASSWORD}" | docker login -u "${CHAINGUARD_USER}" --password-stdin cgr.dev | ||
osayandehenry marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 1.0.0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.