ci: Test a configure stage
This commit is contained in:
parent
b957af3edb
commit
429c70d383
2 changed files with 39 additions and 2 deletions
|
|
@ -1,13 +1,38 @@
|
|||
stages:
|
||||
- configure
|
||||
- build
|
||||
- test
|
||||
- package
|
||||
|
||||
# Set variables used for builds in CI, should probably set this in the build container if possible
|
||||
variables:
|
||||
AF_PATH: /usr/local
|
||||
# Use Docker-outside-of-Docker (DooD) by mounting the host's Docker socket
|
||||
DOCKER_HOST: unix:///var/run/docker.sock
|
||||
# Disable TLS as we're using the local socket
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
DOCKER_AUTH_CONFIG: '{"auths":{"gl.whitefoxdefense.com:5050":{"auth":"Z2l0bGFiK2RlcGxveS10b2tlbi04OmdsZHQtSnNiVFFoeXhpUWNxcHFXMndfYjY="}}}'
|
||||
LD_LIBRARY_PATH: /usr/local/lib
|
||||
# Experimental for the EKS runner
|
||||
# DOCKER_HOST: "tcp://docker:2375"
|
||||
|
||||
# Dynamically pull the build container image name from the devcontainer.json file.
|
||||
# This acts as a single-source-of-truth to keep local and CI builds unified.
|
||||
configure:
|
||||
stage: configure
|
||||
image: alpine:latest
|
||||
before_script:
|
||||
- apk add --no-cache jq
|
||||
script:
|
||||
- BUILD_IMAGE=$(jq -r '.image // .build.args.BASE_IMAGE' .devcontainer/devcontainer.json)
|
||||
- printf 'BUILD_IMAGE=%s' "$BUILD_IMAGE" > build_image.env
|
||||
- ls -la build_image.env
|
||||
- cat build_image.env
|
||||
artifacts:
|
||||
reports:
|
||||
dotenv: build_image.env
|
||||
tags:
|
||||
- test-ci-cd
|
||||
|
||||
# Build the Rust application using Nix
|
||||
build:
|
||||
|
|
@ -54,8 +79,6 @@ test:
|
|||
build-docker-image:
|
||||
stage: package
|
||||
image: nixos/nix:latest
|
||||
services:
|
||||
# No docker:dind service - we'll use the host's Docker daemon
|
||||
before_script:
|
||||
# Install Docker CLI in the Nix container
|
||||
- nix-env -iA nixpkgs.docker
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue