Browse Source

ref: remove self-hosted cloudbuild (#61727)

this is now built in GHA -> ghcr

<!-- Describe your PR here. -->
anthony sottile 1 year ago
parent
commit
21dfdf854f
3 changed files with 0 additions and 107 deletions
  1. 0 50
      self-hosted/builder.dockerfile
  2. 0 17
      self-hosted/builder.sh
  3. 0 40
      self-hosted/cloudbuild.yaml

+ 0 - 50
self-hosted/builder.dockerfile

@@ -1,50 +0,0 @@
-FROM python:3.8.18-slim-bullseye as sdist
-
-LABEL maintainer="oss@sentry.io"
-LABEL org.opencontainers.image.title="Sentry Wheel Builder"
-LABEL org.opencontainers.image.description="Python Wheel Builder for Sentry"
-LABEL org.opencontainers.image.url="https://sentry.io/"
-LABEL org.opencontainers.image.vendor="Functional Software, Inc."
-LABEL org.opencontainers.image.authors="oss@sentry.io"
-
-# Sane defaults for pip
-ENV PIP_NO_CACHE_DIR=1 \
-  PIP_DISABLE_PIP_VERSION_CHECK=1
-
-RUN apt-get update && apt-get install -y --no-install-recommends \
-  # Needed for fetching stuff
-  wget \
-  && rm -rf /var/lib/apt/lists/*
-
-# Get and set up Node for front-end asset building
-ENV VOLTA_VERSION=1.1.0 \
-  VOLTA_HOME=/.volta \
-  PATH=/.volta/bin:$PATH
-
-RUN wget "https://github.com/volta-cli/volta/releases/download/v$VOLTA_VERSION/volta-$VOLTA_VERSION-linux.tar.gz" \
-  && tar -xzf "volta-$VOLTA_VERSION-linux.tar.gz" -C /usr/local/bin \
-  # Running `volta -v` triggers setting up the shims in VOLTA_HOME (otherwise node won't work)
-  && volta -v \
-  && rm "volta-$VOLTA_VERSION-linux.tar.gz"
-
-WORKDIR /js
-
-COPY .volta.json package.json
-# Running `node -v` and `yarn -v` triggers Volta to install the versions set in the project
-RUN node -v && yarn -v
-
-COPY .volta.json package.json yarn.lock .
-RUN export YARN_CACHE_FOLDER="$(mktemp -d)" \
-  && yarn install --frozen-lockfile --production --quiet \
-  && rm -r "$YARN_CACHE_FOLDER"
-
-WORKDIR /workspace
-VOLUME ["/workspace/node_modules", "/workspace/build"]
-COPY self-hosted/builder.sh /builder.sh
-ENTRYPOINT [ "/builder.sh" ]
-
-ARG SOURCE_COMMIT
-ENV SENTRY_BUILD=${SOURCE_COMMIT:-unknown}
-LABEL org.opencontainers.image.revision=$SOURCE_COMMIT
-LABEL org.opencontainers.image.source="https://github.com/getsentry/sentry/tree/${SOURCE_COMMIT:-master}/"
-LABEL org.opencontainers.image.licenses="https://github.com/getsentry/sentry/blob/${SOURCE_COMMIT:-master}/LICENSE"

+ 0 - 17
self-hosted/builder.sh

@@ -1,17 +0,0 @@
-#!/bin/bash
-
-set -e
-
-if [[ ! -f setup.py ]]; then
-    >&2 echo "Cannot find setup.py, make sure you have mounted your source dir to /workspace"
-    exit 1
-fi
-
-mkdir -p ./node_modules
-echo "Populating node_modules cache..."
-cp -ur /js/node_modules/* ./node_modules/
-
-export YARN_CACHE_FOLDER="$(mktemp -d)"
-python setup.py bdist_wheel --build-number 0
-rm -r "$YARN_CACHE_FOLDER"
-cp requirements-frozen.txt dist/

+ 0 - 40
self-hosted/cloudbuild.yaml

@@ -1,40 +0,0 @@
-steps:
-  - name: 'gcr.io/kaniko-project/executor:v1.5.1'
-    id: builder-image
-    args:
-      [
-        '--cache=true',
-        '--use-new-run',
-        '--build-arg',
-        'SOURCE_COMMIT=$COMMIT_SHA',
-        '--destination=us.gcr.io/$PROJECT_ID/sentry-builder:$COMMIT_SHA',
-        '-f',
-        './self-hosted/builder.dockerfile',
-      ]
-    timeout: 180s
-  - name: 'us.gcr.io/$PROJECT_ID/sentry-builder:$COMMIT_SHA'
-    id: builder-run
-    env:
-      - 'SOURCE_COMMIT=$COMMIT_SHA'
-    timeout: 600s
-  - name: 'gcr.io/kaniko-project/executor:v1.5.1'
-    id: runtime-image
-    waitFor:
-      - builder-run
-    args:
-      [
-        '--cache=true',
-        '--use-new-run',
-        '--build-arg',
-        'SOURCE_COMMIT=$COMMIT_SHA',
-        '--destination=us.gcr.io/$PROJECT_ID/sentry:$COMMIT_SHA',
-        '-f',
-        './self-hosted/Dockerfile',
-      ]
-    timeout: 300s
-timeout: 2640s
-options:
-  # We need more memory for Webpack builds & e2e self-hosted tests
-  machineType: 'E2_HIGHCPU_8'
-  env:
-    - 'SENTRY_IMAGE=us.gcr.io/$PROJECT_ID/sentry:$COMMIT_SHA'