github.com/tilt-dev/tilt@v0.36.0/.circleci/config.yml (about)

     1  version: 2.1
     2  orbs:
     3    slack: circleci/slack@3.4.0
     4    shellcheck: circleci/shellcheck@2.2.2
     5    win: circleci/windows@5.0.0
     6    gcp-cli: circleci/gcp-cli@3.0.1
     7    kubernetes: circleci/kubernetes@0.9.1
     8    go: circleci/go@1.7.1
     9  jobs:
    10    build-linux:
    11      resource_class: medium+
    12      docker:
    13        - image: docker/tilt-ci@sha256:24c582b02189c68cf5980f49d238ca9a540b576aa0487de35a3cd739704c4c8b
    14      # apiserver code generation scripts require being in GOPATH
    15      working_directory: /home/circleci/go/src/github.com/tilt-dev/tilt
    16      steps:
    17        - checkout
    18        - run: echo 'export PATH=~/go/bin:$PATH' >> $BASH_ENV
    19        - setup_remote_docker
    20        - run: docker pull registry:2
    21        - run: make install
    22        - run: make lint
    23        - run: make test_install_version_check
    24        - run: make wire-check
    25        - run: ./scripts/check-codegen.sh
    26        - run: make test-go
    27        - store_test_results:
    28            path: test-results
    29        - slack/notify-on-failure:
    30            only_for_branches: master
    31    build-js:
    32      docker:
    33        - image: cimg/node:22.14.0
    34      steps:
    35        - checkout
    36        - run: make check-js
    37        - run:
    38            name: Run jest with JUnit Reporter
    39            command: make test-js
    40            environment:
    41              JEST_JUNIT_OUTPUT_DIR: "reports/junit/js-test-results.xml"
    42        - run: make test-storybook
    43        - store_test_results:
    44            path: web/reports/junit
    45        - slack/notify-on-failure:
    46            only_for_branches: master
    47    check-docs:
    48      docker:
    49        - image: docker/tilt-ci@sha256:24c582b02189c68cf5980f49d238ca9a540b576aa0487de35a3cd739704c4c8b
    50      steps:
    51        - checkout
    52        - setup_remote_docker
    53        - run: mkdir -p ../tilt.build && git clone git@github.com:tilt-dev/tilt.build ../tilt.build
    54        - run: make install
    55        - run: |
    56            set -ex
    57            cd ../tilt.build
    58            tilt dump cli-docs --dir="./docs/cli"
    59            tilt dump api-docs --dir="./api"
    60            make cli-toc
    61            make api
    62        - slack/notify-on-failure:
    63            only_for_branches: master
    64    build-windows:
    65      executor:
    66        name: win/default
    67        size: "large"
    68      steps:
    69        - run: |
    70            choco install -y make kustomize kubernetes-helm docker-compose
    71            choco upgrade -y --allow-downgrade golang --version=1.24.1
    72  
    73            # mingw 13 seems to have broken gcc installs
    74            # https://community.chocolatey.org/packages/mingw#comment-6290804217
    75            choco install -y mingw --version 12.2.0.03042023 --allow-downgrade
    76        - run: go install gotest.tools/gotestsum@latest
    77        - checkout
    78        # Check to make sure Windows binaries compile
    79        - run:
    80            command: go install -mod vendor ./cmd/tilt
    81            shell: bash.exe
    82            environment:
    83              CGO_ENABLED: '1'
    84              CGO_LDFLAGS: -static
    85        - run:
    86            command: PATH="$HOME/go/bin:$PATH" make shorttestsum
    87            shell: bash.exe
    88            environment:
    89              CGO_ENABLED: '1'
    90              CGO_LDFLAGS: -static
    91        - run: iex ./scripts/install.ps1
    92        - store_test_results:
    93            path: test-results
    94    build-integration:
    95      resource_class: medium+
    96      docker:
    97        - image: docker/tilt-integration-ci@sha256:475f7d5834f21d48df45963499dff7cf4be0e1ac9717117c7677b6714f0e7ba6
    98      steps:
    99        - checkout
   100        - run: echo 'export PATH=/go/bin:$PATH' >> $BASH_ENV
   101        - setup_remote_docker
   102        - run: ctlptl create cluster kind --registry=ctlptl-registry && make build-js integration
   103        - store_test_results:
   104            path: test-results
   105        - slack/notify-on-failure:
   106            only_for_branches: master
   107    test-extensions:
   108      resource_class: large
   109      docker:
   110        - image: "docker/tilt-extensions-ci@sha256:c22a39c287c7c3afba182f4f46044475b43bd2d4e2bb89f41136eae7d4f4b94d"
   111      steps:
   112        - checkout
   113        - run: echo 'export PATH=/go/bin:$PATH' >> $BASH_ENV
   114        - setup_remote_docker
   115        - run: ctlptl create cluster kind --registry=ctlptl-registry && make build-js install test-extensions
   116        - slack/notify-on-failure:
   117            only_for_branches: master
   118    # NOTE(nicks): Tilt is on Docker's legacy CircleCI plan,
   119    # which has lots of credits but does not have access to MacOS
   120    # Apple Silicon runners. The MacOS Intel runners have been
   121    # decommissioned.
   122    #
   123    # build-macos:
   124    #   resource_class: "macos.x86.medium.gen2"
   125    #   macos:
   126    #     xcode: "15.0.0"
   127  
   128    #   steps:
   129    #     - checkout
   130    #     - go/install:
   131    #         version: "1.22.2"
   132    #     - run: curl -fsSL "https://github.com/gotestyourself/gotestsum/releases/download/v1.7.0/gotestsum_1.7.0_darwin_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin gotestsum
   133    #     # We can't run the container tests on macos because nested
   134    #     # VMs don't work on circleci.
   135    #     - run: mkdir -p test-results
   136    #     # Check to make sure binaries compile
   137    #     - run: go install -mod vendor ./cmd/tilt
   138    #     # Only run watch tests, because these are currently the only tests that are OS-specific.
   139    #     # In other Tilt tests, we mock out OS-specific components.
   140    #     - run: gotestsum --format standard-quiet --junitfile test-results/unit-tests.xml -- -mod vendor ./internal/watch/...
   141    #     - store_test_results:
   142    #         path: test-results
   143    #     - slack/notify-on-failure:
   144    #         only_for_branches: master
   145    release-dry-run:
   146      resource_class: medium+
   147      docker:
   148        # keep image in sync with build.toast.yml
   149        - image: "docker/tilt-releaser@sha256:2dcf9df09bd9b8c5d51659868b045bea5ee8830fe4638cb59b7bff825d82dd01"
   150      steps:
   151        - setup_remote_docker
   152        # https://discuss.circleci.com/t/arm-version-of-remote-docker/41624
   153        - run: ssh remote-docker "sudo apt-get update; sudo apt-get install -y qemu-user-static binfmt-support"
   154        - checkout
   155        - run: make build-js
   156        - run:
   157            command: goreleaser --verbose --clean --skip=publish --snapshot
   158            no_output_timeout: 20m
   159        - slack/notify-on-failure:
   160            only_for_branches: main
   161    release:
   162      resource_class: medium+
   163      docker:
   164        # keep image in sync with build.toast.yml
   165        - image: "docker/tilt-releaser@sha256:2dcf9df09bd9b8c5d51659868b045bea5ee8830fe4638cb59b7bff825d82dd01"
   166      environment:
   167        DOCKER_CLI_EXPERIMENTAL: enabled
   168      steps:
   169        - setup_remote_docker
   170        # https://discuss.circleci.com/t/arm-version-of-remote-docker/41624
   171        - run: ssh remote-docker "sudo apt-get update; sudo apt-get install -y qemu-user-static binfmt-support"
   172        - slack/notify:
   173            message: "A Tilt release has started!"
   174        - checkout
   175        - run:
   176            command: ./scripts/release-ci.sh
   177            no_output_timeout: 20m
   178        - slack/status
   179  workflows:
   180    version: 2
   181    shellcheck:
   182      jobs:
   183        - shellcheck/check:
   184            dir: scripts
   185            exclude: SC2001
   186    build:
   187      # The linux job is cheaper than the others, so run that first.
   188      jobs:
   189        - build-linux
   190        - build-js:
   191            requires:
   192              - build-linux
   193              # - build-macos:
   194              #     requires:
   195              #       - build-linux
   196        - build-integration:
   197            requires:
   198              - build-linux
   199        - test-extensions:
   200            context:
   201              - Tilt Pulumi Context
   202            requires:
   203              - build-linux
   204        - build-windows:
   205            requires:
   206              - build-linux
   207        - check-docs:
   208            requires:
   209              - build-linux
   210        - release-dry-run:
   211            context: Tilt Slack Context
   212            requires:
   213              - build-linux
   214            filters:
   215              branches:
   216                only: master
   217    release:
   218      jobs:
   219        - release:
   220            context:
   221              - Tilt Slack Context
   222              - Tilt Release CLI Context
   223              - Tilt Docker Login Context
   224              - Tilt Cloud Login Context
   225              - Tilt Deploy Context
   226            filters:
   227              branches:
   228                only: never-release-on-a-branch
   229              tags:
   230                only: /v[0-9]+.[0-9]+.[0-9]+/