Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions pants/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ARG PY_VERSION=3.11
FROM python:${PY_VERSION}-bookworm

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get -y upgrade \
&& apt-get -y install --no-install-recommends \
curl ca-certificates

ENV PATH="/root/.local/bin:$PATH"
RUN curl --proto '=https' --tlsv1.2 -fsSL https://static.pantsbuild.org/setup/get-pants.sh | bash

ENTRYPOINT [ "pants" ]
21 changes: 21 additions & 0 deletions pants/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Pants

The [pants](https://pantsbuild.org) build system is an open-source mutilingual build tool.


## Building this builder

gcloud builds submit . --config=cloudbuild.yaml --substitutions=_PY_VERSION="3.11"

## Using Pants

Assuming you built and pushed the pants builder for python 3.11, an example usage might
look like:

```
steps:
- name: gcr.io/$PROJECT_ID/pants:3.11
args:
- package
- path/to/my:package
```
11 changes: 11 additions & 0 deletions pants/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# yaml-language-server: $schema=https://json.schemastore.org/cloudbuild
steps:
- name: gcr.io/cloud-builders/docker
args: ['build', '.', '--tag=gcr.io/$PROJECT_ID/pants:${_PY_VERSION}', '--build-arg', 'PY_VERSION=${_PY_VERSION}']
- name: gcr.io/$PROJECT_ID/pants:${_PY_VERSION}
env:
- PANTS_BOOTSTRAP_VERSION=report
substitutions:
_PY_VERSION: "3.11"
images: ['gcr.io/$PROJECT_ID/pants:${_PY_VERSION}']
tags: ['cloud-builders-community']