Unverified Commit 2a9ae5ef authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Add CI pipeline for building Cilium proxy

parent ca00140b
Loading
Loading
Loading
Loading
Loading

.gitlab-ci.yml

0 → 100644
+18 −0
Original line number Diff line number Diff line
spec:
  inputs:
    git-ref:
      description: The git commit to build from https://github.com/cilium/proxy
      default: main

---

workflow:
  rules:
    - if: $CI_PIPELINE_SOURCE == "web"

include:
  - local: .gitlab/ci/cilium-envoy.yaml
    inputs:
      git-ref: $[[ inputs.git-ref ]]
    rules:
      - if: $CI_PIPELINE_SOURCE == "web"
+46 −0
Original line number Diff line number Diff line
spec:
  inputs:
    git-ref:
      description: The git commit to build from https://github.com/cilium/proxy
      default: main

    envoy-version:
      description: The release of Envoy to build into the Cilium proxy
      default: 1.36.5

---

Get Cilium-Envoy Source:
  stage: .pre
  image:
    name: docker.io/alpine/git
    entrypoint: ["/bin/sh", "-c"]
  script:
    - git clone https://github.com/cilium/proxy envoy
      --revision=$[[ inputs.git-ref ]]
      --depth=1 --no-tags
    - GIT_DIR=envoy/.git git rev-parse HEAD | tee envoy/SOURCE_VERSION
    - BUILDER_HASH=`cd envoy; git ls-tree --full-tree HEAD -- ./Dockerfile.builder | awk '{ print $3 }'`
    - echo >source.env "BUILDER_HASH=$BUILDER_HASH"
  artifacts:
    paths: [envoy]
    expire_in: "20 min"
    reports:
      dotenv: source.env

Build Image:
  stage: build
  image: docker.kodo.org.uk/ci-images/buildkit/buildctl
  needs:
    - job: Get Cilium-Envoy Source
      artifacts: true
  timeout: 5 hours
  script:
    - buildctl build
      --frontend dockerfile.v0
      --local context=envoy
      --local dockerfile=envoy
      --opt platform=linux/amd64,linux/arm64
      --opt build-arg:BUILDER_BASE=quay.io/cilium/cilium-envoy-builder:$BUILDER_HASH
      --opt build-arg:BAZEL_BUILD_OPTS="--define tcmalloc=disabled"
      --output type=image,push=true,name=$CI_REGISTRY_IMAGE/cilium-envoy:test