├── .github └── CODEOWNERS ├── .kokoro ├── build.sh ├── release │ ├── common.cfg │ ├── elixir.cfg │ ├── go.cfg │ ├── java.cfg │ ├── node.cfg │ ├── python.cfg │ └── ruby.cfg └── sync-triggers.sh ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── cloudbuild.yaml ├── common ├── cloudbuild-airlock.yaml ├── cloudbuild-structure-test.yaml └── cloudbuild.yaml ├── elixir ├── Dockerfile ├── README.md ├── cloudbuild-container-build-test.yaml ├── cloudbuild-release.yaml ├── cloudbuild-test.yaml ├── cloudbuild.yaml ├── elixir110.yaml ├── elixir111.yaml ├── elixir112.yaml ├── elixir113.yaml ├── elixir114.yaml ├── elixir115.yaml ├── elixir116.yaml ├── elixir16.yaml ├── elixir17.yaml ├── elixir18.yaml ├── elixir19.yaml └── plt_builder │ ├── .formatter.exs │ ├── .gitignore │ ├── README.md │ ├── config │ └── config.exs │ ├── lib │ └── plt_builder.ex │ ├── mix.exs │ ├── plts │ ├── elixir110 │ │ └── .gitkeep │ ├── elixir111 │ │ └── .gitkeep │ ├── elixir112 │ │ └── .gitkeep │ ├── elixir113 │ │ └── .gitkeep │ ├── elixir114 │ │ └── .gitkeep │ ├── elixir115 │ │ └── .gitkeep │ ├── elixir116 │ │ └── .gitkeep │ ├── elixir16 │ │ └── .gitkeep │ ├── elixir17 │ │ └── .gitkeep │ ├── elixir18 │ │ └── .gitkeep │ └── elixir19 │ │ └── .gitkeep │ └── test │ ├── plt_builder_test.exs │ └── test_helper.exs ├── go ├── README.md ├── cloudbuild-release.yaml ├── cloudbuild-test.yaml ├── cloudbuild.yaml ├── go123.yaml ├── go123 │ └── Dockerfile ├── go124-release.yaml ├── go124-release │ └── Dockerfile ├── go124.yaml └── go124 │ └── Dockerfile ├── java ├── README.md ├── cloudbuild-release.yaml ├── cloudbuild-test.yaml ├── cloudbuild.yaml ├── java11.yaml ├── java11 │ └── Dockerfile ├── java11014.yaml ├── java11014 │ └── Dockerfile ├── java17.yaml ├── java17 │ └── Dockerfile ├── java21.yaml ├── java21 │ └── Dockerfile ├── java8-airlock.yaml ├── java8-airlock │ └── Dockerfile ├── java8.yaml └── java8 │ └── Dockerfile ├── node ├── 18-puppeteer │ └── Dockerfile ├── 18-user │ ├── Dockerfile │ └── requirements.txt ├── README.md ├── cloudbuild-release.yaml ├── cloudbuild-test.yaml ├── cloudbuild.yaml └── requirements.in ├── php ├── README.md ├── cloudbuild-release.yaml ├── cloudbuild-test.yaml ├── cloudbuild.yaml ├── php │ └── Dockerfile ├── php81.yaml ├── php81 │ └── Dockerfile ├── php82.yaml ├── php82 │ └── Dockerfile ├── php83.yaml ├── php83 │ └── Dockerfile ├── release.yaml └── release │ └── Dockerfile ├── python ├── cloud-devrel-kokoro-resources │ ├── google-cloud-python │ │ └── autosynth │ │ │ ├── Dockerfile │ │ │ ├── makefile │ │ │ ├── requirements.in │ │ │ └── requirements.txt │ ├── python-base │ │ ├── Dockerfile │ │ ├── Makefile │ │ ├── requirements.in │ │ └── requirements.txt │ └── python │ │ ├── Dockerfile │ │ ├── Makefile │ │ ├── requirements.in │ │ └── requirements.txt ├── cloudbuild-release.yaml ├── cloudbuild-test.yaml ├── cloudbuild.yaml └── googleapis │ └── python-multi │ ├── Dockerfile │ ├── requirements.in │ └── requirements.txt ├── renovate.json ├── ruby ├── cloudbuild-release.yaml ├── cloudbuild-test.yaml ├── cloudbuild.yaml ├── multi │ └── Dockerfile ├── release.yaml ├── release │ ├── .toys.rb │ └── Dockerfile └── windows │ └── Dockerfile └── syft ├── Dockerfile ├── airlock └── Dockerfile ├── cloudbuild-release.yaml ├── cloudbuild-test.yaml └── syft.yaml /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Code owners file. 2 | # This file controls who is tagged for review for any given pull request. 3 | # 4 | # For syntax help see: 5 | # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax 6 | 7 | * @googleapis/cloud-client-library-release-automation-team 8 | /elixir @googleapis/yoshi-elixir @googleapis/cloud-client-library-release-automation-team 9 | /go @googleapis/yoshi-go @googleapis/cloud-client-library-release-automation-team 10 | /java @googleapis/yoshi-java @googleapis/cloud-java-team-teamsync @googleapis/cloud-client-library-release-automation-team 11 | /node @googleapis/jsteam @googleapis/cloud-client-library-release-automation-team 12 | /python @googleapis/yoshi-python @googleapis/cloud-client-library-release-automation-team 13 | /ruby @googleapis/ruby-team @googleapis/cloud-client-library-release-automation-team 14 | /php @googleapis/yoshi-php @googleapis/cloud-client-library-release-automation-team 15 | /syft @googleapis/cloud-client-library-release-automation-team 16 | -------------------------------------------------------------------------------- /.kokoro/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2018 Google LLC 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -eo pipefail 18 | 19 | # Disable buffering, so that the logs stream through. 20 | export PYTHONUNBUFFERED=1 21 | 22 | gcloud builds submit --config ${LANGUAGE}/cloudbuild.yaml . 23 | -------------------------------------------------------------------------------- /.kokoro/release/common.cfg: -------------------------------------------------------------------------------- 1 | # Format: //devtools/kokoro/config/proto/build.proto 2 | 3 | # Build logs will be here 4 | action { 5 | define_artifacts { 6 | regex: "**/*sponge_log.xml" 7 | } 8 | } 9 | 10 | build_file: "testing-infra-docker/.kokoro/build.sh" -------------------------------------------------------------------------------- /.kokoro/release/elixir.cfg: -------------------------------------------------------------------------------- 1 | # Format: //devtools/kokoro/config/proto/build.proto 2 | 3 | # Specify the build directory 4 | env_vars: { 5 | key: "LANGUAGE" 6 | value: "elixir" 7 | } 8 | -------------------------------------------------------------------------------- /.kokoro/release/go.cfg: -------------------------------------------------------------------------------- 1 | # Format: //devtools/kokoro/config/proto/build.proto 2 | 3 | # Specify the build directory 4 | env_vars: { 5 | key: "LANGUAGE" 6 | value: "go" 7 | } 8 | -------------------------------------------------------------------------------- /.kokoro/release/java.cfg: -------------------------------------------------------------------------------- 1 | # Format: //devtools/kokoro/config/proto/build.proto 2 | 3 | # Specify the build directory 4 | env_vars: { 5 | key: "LANGUAGE" 6 | value: "java" 7 | } 8 | -------------------------------------------------------------------------------- /.kokoro/release/node.cfg: -------------------------------------------------------------------------------- 1 | # Format: //devtools/kokoro/config/proto/build.proto 2 | 3 | # Specify the build directory 4 | env_vars: { 5 | key: "LANGUAGE" 6 | value: "node" 7 | } 8 | -------------------------------------------------------------------------------- /.kokoro/release/python.cfg: -------------------------------------------------------------------------------- 1 | # Format: //devtools/kokoro/config/proto/build.proto 2 | 3 | # Specify the build config file 4 | env_vars: { 5 | key: "LANGUAGE" 6 | value: "python" 7 | } 8 | -------------------------------------------------------------------------------- /.kokoro/release/ruby.cfg: -------------------------------------------------------------------------------- 1 | # Format: //devtools/kokoro/config/proto/build.proto 2 | 3 | # Specify the build config file 4 | env_vars: { 5 | key: "LANGUAGE" 6 | value: "ruby" 7 | } 8 | -------------------------------------------------------------------------------- /.kokoro/sync-triggers.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2020 Google LLC 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # This script ensures that a Cloud Build trigger exists for each non-root 17 | # cloudbuild.yaml file. Each is triggered on a push to main for any file 18 | # changed in the directory containing that cloudbuild.yaml file. 19 | 20 | set -eo pipefail 21 | 22 | if [[ $# -ne 1 ]] 23 | then 24 | echo "Usage: $0 " 25 | exit 1 26 | fi 27 | 28 | project=$1 29 | 30 | # change this configuration for testing 31 | branch="main" 32 | repoOwner="googleapis" 33 | repoName="testing-infra-docker" 34 | 35 | # find all non-root cloudbuild.yaml configs 36 | for config in $(find -- */ -name 'cloudbuild.yaml' | sort -u) 37 | do 38 | directory=$(dirname "${config}") 39 | triggerName=$(dirname "${config}" | sed 's/\//-/g') 40 | 41 | # test to see if the deployment trigger already exists 42 | if gcloud beta builds triggers describe "${triggerName}" --project="${project}" &>/dev/null 43 | then 44 | # trigger already exists, skip 45 | continue 46 | fi 47 | 48 | echo "Syncing trigger for ${directory}" 49 | 50 | # create the trigger 51 | gcloud beta builds triggers create github \ 52 | --project="${project}" \ 53 | --repo-name="${repoName}" \ 54 | --repo-owner="${repoOwner}" \ 55 | --description="Build testing docker images in ${directory}" \ 56 | --included-files="${directory}/**" \ 57 | --name="${triggerName}" \ 58 | --branch-pattern="${branch}" \ 59 | --build-config="${config}" 60 | 61 | # trigger the first deployment 62 | gcloud beta builds triggers run "${triggerName}" \ 63 | --project="${project}" \ 64 | --branch="${branch}" 65 | done 66 | 67 | # find all non-root cloudbuild-test.yaml configs 68 | for config in $(find -- */ -name 'cloudbuild-test.yaml' | sort -u) 69 | do 70 | directory=$(dirname "${config}") 71 | triggerName=$(dirname "${config}" | sed 's/\//-/g')-presubmit 72 | 73 | # test to see if the deployment trigger already exists 74 | if gcloud beta builds triggers describe "${triggerName}" --project="${project}" &>/dev/null 75 | then 76 | # trigger already exists, skip 77 | continue 78 | fi 79 | 80 | echo "Syncing test trigger for ${directory}" 81 | 82 | # create the trigger 83 | gcloud beta builds triggers create github \ 84 | --project="${project}" \ 85 | --repo-name="${repoName}" \ 86 | --repo-owner="${repoOwner}" \ 87 | --description="Build testing docker images in ${directory}" \ 88 | --included-files="${directory}/**" \ 89 | --name="${triggerName}" \ 90 | --pull-request-pattern="${branch}" \ 91 | --build-config="${config}" 92 | done 93 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Code of Conduct 2 | 3 | As contributors and maintainers of this project, 4 | and in the interest of fostering an open and welcoming community, 5 | we pledge to respect all people who contribute through reporting issues, 6 | posting feature requests, updating documentation, 7 | submitting pull requests or patches, and other activities. 8 | 9 | We are committed to making participation in this project 10 | a harassment-free experience for everyone, 11 | regardless of level of experience, gender, gender identity and expression, 12 | sexual orientation, disability, personal appearance, 13 | body size, race, ethnicity, age, religion, or nationality. 14 | 15 | Examples of unacceptable behavior by participants include: 16 | 17 | * The use of sexualized language or imagery 18 | * Personal attacks 19 | * Trolling or insulting/derogatory comments 20 | * Public or private harassment 21 | * Publishing other's private information, 22 | such as physical or electronic 23 | addresses, without explicit permission 24 | * Other unethical or unprofessional conduct. 25 | 26 | Project maintainers have the right and responsibility to remove, edit, or reject 27 | comments, commits, code, wiki edits, issues, and other contributions 28 | that are not aligned to this Code of Conduct. 29 | By adopting this Code of Conduct, 30 | project maintainers commit themselves to fairly and consistently 31 | applying these principles to every aspect of managing this project. 32 | Project maintainers who do not follow or enforce the Code of Conduct 33 | may be permanently removed from the project team. 34 | 35 | This code of conduct applies both within project spaces and in public spaces 36 | when an individual is representing the project or its community. 37 | 38 | Instances of abusive, harassing, or otherwise unacceptable behavior 39 | may be reported by opening an issue 40 | or contacting one or more of the project maintainers. 41 | 42 | This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, 43 | available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) 44 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | We'd love to accept your patches and contributions to this project. There are 4 | just a few small guidelines you need to follow. 5 | 6 | ## Contributor License Agreement 7 | 8 | Contributions to this project must be accompanied by a Contributor License 9 | Agreement. You (or your employer) retain the copyright to your contribution; 10 | this simply gives us permission to use and redistribute your contributions as 11 | part of the project. Head over to to see 12 | your current agreements on file or to sign a new one. 13 | 14 | You generally only need to submit a CLA once, so if you've already submitted one 15 | (even if it was for a different project), you probably don't need to do it 16 | again. 17 | 18 | ## Code reviews 19 | 20 | All submissions, including submissions by project members, require review. We 21 | use GitHub pull requests for this purpose. Consult 22 | [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more 23 | information on using pull requests. 24 | 25 | ## Community Guidelines 26 | 27 | This project follows 28 | [Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is not an officially supported Google product. 2 | 3 | This repository has Docker images used for testing in Google client libraries. 4 | 5 | ## Updating Images 6 | 7 | 1. Send a PR to this repo. 8 | 2. Once the PR is merged, Cloud Build will rebuild the images for any images that were updated. 9 | See the project ``cloud-devrel-kokoro-resources`` to edit or add Cloud Build triggers. -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). 4 | 5 | The Google Security Team will respond within 5 working days of your report on g.co/vulnz. 6 | 7 | We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue. 8 | -------------------------------------------------------------------------------- /cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2020 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | steps: 16 | - name: gcr.io/google.com/cloudsdktool/cloud-sdk 17 | id: "sync-triggers" 18 | entrypoint: bash 19 | args: 20 | - "-e" 21 | - "./.kokoro/sync-triggers.sh" 22 | - "$PROJECT_ID" 23 | -------------------------------------------------------------------------------- /common/cloudbuild-airlock.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | - name: 'gcr.io/cloud-builders/docker' 18 | # go/airlock/howto_docker#example-gcb-dockerfile-in-docker-build-support 19 | id: buildx-create 20 | args: 21 | - buildx 22 | - create 23 | - --name=buildx-builder 24 | - --driver=docker-container 25 | - --driver-opt 26 | - network=cloudbuild 27 | - --use 28 | - name: gcr.io/cloud-builders/docker 29 | # go/airlock/howto_docker#example-gcb-dockerfile-in-docker-build-support 30 | id: buildx-create 31 | # https://docs.docker.com/build/builders/drivers/#loading-to-local-image-store 32 | args: ["buildx", "build", "--add-host=metadata.google.internal:169.254.169.254", 33 | "--load", 34 | "-t", "us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME}", "."] 35 | dir: '${_IMAGE_SOURCE_PATH}' 36 | id: '${_IMAGE_NAME}' 37 | waitFor: ["buildx-create"] 38 | options: 39 | machineType: 'E2_HIGHCPU_8' 40 | requestedVerifyOption: VERIFIED # For provenance attestation generation 41 | images: 42 | - us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME} 43 | -------------------------------------------------------------------------------- /common/cloudbuild-structure-test.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # GCB config for generating docker images. 16 | # 17 | # Parameters 18 | # _IMAGE_NAME: Name of the image. E.g. python-multi 19 | # _IMAGE_SOURCE_PATH: Path to Dockerfile. E.g. python/googleapis/python-multi 20 | # _PROJECT_ID: Name of GCB project. E.g. cloud-sdk-release-custom-pool 21 | 22 | timeout: 7200s # 2 hours 23 | steps: 24 | - name: gcr.io/cloud-builders/docker 25 | args: [ 26 | 'build', '-t', 27 | 'us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME}', 28 | '.'] 29 | dir: '${_IMAGE_SOURCE_PATH}' 30 | id: '${_IMAGE_NAME}' 31 | waitFor: ['-'] 32 | - name: gcr.io/gcp-runtimes/structure_test 33 | args: [ 34 | "-i", "us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME}", 35 | "--config", "${_STRUCTURE_TEST_CONFIG}", "-v"] 36 | waitFor: ["${_IMAGE_NAME}"] 37 | 38 | options: 39 | machineType: 'E2_HIGHCPU_8' 40 | requestedVerifyOption: VERIFIED # For provenance attestation generation 41 | 42 | images: 43 | - us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME} 44 | -------------------------------------------------------------------------------- /common/cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # GCB config for generating docker images. 16 | # 17 | # Parameters 18 | # _IMAGE_NAME: Name of the image. E.g. python-multi 19 | # _IMAGE_SOURCE_PATH: Path to Dockerfile. E.g. python/googleapis/python-multi 20 | # _PROJECT_ID: Name of GCB project. E.g. cloud-sdk-release-custom-pool 21 | 22 | timeout: 7200s # 2 hours 23 | steps: 24 | - name: gcr.io/cloud-builders/docker 25 | args: [ 26 | 'build', '-t', 27 | 'us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME}', 28 | '.'] 29 | dir: '${_IMAGE_SOURCE_PATH}' 30 | id: '${_IMAGE_NAME}' 31 | waitFor: ['-'] 32 | 33 | options: 34 | machineType: 'E2_HIGHCPU_8' 35 | requestedVerifyOption: VERIFIED # For provenance attestation generation 36 | 37 | images: 38 | - us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME} 39 | -------------------------------------------------------------------------------- /elixir/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Step 1: create a core image with hex and rebar installed 16 | ARG BASE_IMAGE 17 | FROM ${BASE_IMAGE} as core 18 | 19 | RUN mix local.rebar --force && \ 20 | mix local.hex --force 21 | 22 | ENTRYPOINT [] 23 | CMD ["/bin/bash"] 24 | 25 | # Step 2: build the elixir and erlang core plt files 26 | FROM core AS plt-builder 27 | 28 | ARG SHORT_VERSION 29 | 30 | RUN mkdir -p /opt/plt_builder 31 | WORKDIR /opt/plt_builder 32 | COPY plt_builder /opt/plt_builder 33 | 34 | RUN for file in plts/elixir${SHORT_VERSION}/*.plt ; do \ 35 | if [ -f $file ] ; then \ 36 | cp $file /root/.mix ; \ 37 | fi ; \ 38 | done ; \ 39 | mix deps.get ; \ 40 | mix dialyzer --plt 41 | 42 | # Step 3: build the testing images with the pre-build plt files 43 | FROM core 44 | 45 | ARG NODEJS_VERSION=20.11.1 \ 46 | DOCKER_VERSION=24.0.9 47 | 48 | COPY --from=plt-builder /root/.mix /root/.mix 49 | 50 | RUN mkdir -p /opt/nodejs && \ 51 | curl -s https://nodejs.org/dist/v${NODEJS_VERSION}/node-v${NODEJS_VERSION}-linux-x64.tar.gz \ 52 | | tar xzf - --directory=/opt/nodejs --strip-components=1 && \ 53 | mkdir -p /opt/docker/bin && \ 54 | curl -sL https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz \ 55 | | tar xzf - --directory=/opt/docker/bin --strip-components=1 56 | 57 | ENV PATH=/opt/nodejs/bin:/opt/docker/bin:$PATH 58 | -------------------------------------------------------------------------------- /elixir/README.md: -------------------------------------------------------------------------------- 1 | # Elixir Docker Images 2 | 3 | This directory contains the Docker images for running Elixir tests for the 4 | Google API toolchains. The primary use case for this images is to run tests 5 | on Kokoro via Trampoline. 6 | 7 | ## Supported Versions 8 | 9 | Our Elixir client libraries currently support Elixir 1.6+. 10 | 11 | ## Building Images 12 | 13 | You can build all of the test images by running: 14 | 15 | gcloud builds submit --config=cloudbuild.yaml . 16 | 17 | You can publish the images by running: 18 | 19 | gcloud builds submit --project=cloud-devrel-kokoro-resources \ 20 | --config=cloudbuild.yaml --machine-type=e2-highcpu-8 . 21 | -------------------------------------------------------------------------------- /elixir/cloudbuild-container-build-test.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | - name: gcr.io/cloud-builders/docker 18 | args: [ 19 | 'build', '-t', 20 | 'us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME}', 21 | '--build-arg', 'BASE_IMAGE=elixir:1.14', '--build-arg', 'SHORT_VERSION=114', 22 | '.'] 23 | dir: 'elixir' 24 | id: '${_IMAGE_NAME}' 25 | waitFor: ['-'] 26 | - name: gcr.io/gcp-runtimes/container-structure-test 27 | args: [ 28 | 'test', '--image', "us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME}", 29 | "--config", "${_CONTAINER_STRUCTURE_TEST_CONFIG}"] 30 | waitFor: ["${_IMAGE_NAME}"] 31 | options: 32 | machineType: 'E2_HIGHCPU_8' 33 | requestedVerifyOption: VERIFIED # For provenance attestation generation 34 | images: 35 | - us-central1-docker.pkg.dev/${_PROJECT_ID}/release-images-dev/${_IMAGE_NAME} 36 | -------------------------------------------------------------------------------- /elixir/cloudbuild-release.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | 18 | # Fetch cached plt files 19 | - name: gcr.io/cloud-builders/gsutil 20 | args: ['cp', '-r', 'gs://release-image-cache2/elixir-artifacts/elixir*', '/workspace/elixir/plt_builder/plts/'] 21 | id: load-plts 22 | allowFailure: true 23 | waitFor: ['-'] 24 | 25 | # Elixir 1.14 build 26 | - name: gcr.io/cloud-builders/docker 27 | args: ['build', '-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/release-images/elixir114', '--build-arg', 'BASE_IMAGE=elixir:1.14', '--build-arg', 'SHORT_VERSION=114', 'elixir/'] 28 | id: elixir114-build 29 | waitFor: [load-plts] 30 | - name: gcr.io/gcp-runtimes/container-structure-test 31 | args: ['test', '--image', 'us-central1-docker.pkg.dev/$PROJECT_ID/release-images/elixir114', '--config', '/workspace/elixir/elixir114.yaml'] 32 | id: elixir114-test 33 | waitFor: ['elixir114-build'] 34 | - name: us-central1-docker.pkg.dev/$PROJECT_ID/release-images/elixir114 35 | args: ['/bin/bash', '-c', 'cp /root/.mix/*.plt /workspace/elixir/plt_builder/plts/elixir114'] 36 | id: elixir114-extract-plts 37 | waitFor: ['elixir114-test'] 38 | 39 | # Push cached plt files 40 | - name: gcr.io/cloud-builders/gsutil 41 | args: ['cp', '-r', '/workspace/elixir/plt_builder/plts/elixir*', 'gs://release-image-cache2/elixir-artifacts/'] 42 | waitFor: [ 43 | 'elixir114-extract-plts', 44 | ] 45 | 46 | images: 47 | - us-central1-docker.pkg.dev/$PROJECT_ID/release-images/elixir114 48 | 49 | options: 50 | logging: CLOUD_LOGGING_ONLY 51 | -------------------------------------------------------------------------------- /elixir/elixir110.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2019 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 2.0.0 16 | commandTests: 17 | - name: "elixir version" 18 | command: "elixir" 19 | args: ["--version"] 20 | expectedOutput: ["Elixir 1.9"] 21 | - name: "otp version" 22 | command: "elixir" 23 | args: ["--version"] 24 | expectedOutput: ["Erlang/OTP 22"] 25 | - name: "node version" 26 | command: "node" 27 | args: ["--version"] 28 | expectedOutput: ["20"] 29 | - name: "docker version" 30 | command: "docker" 31 | args: ["version"] 32 | expectedOutput: ["24.0"] 33 | exitCode: 1 34 | -------------------------------------------------------------------------------- /elixir/elixir111.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2019 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 2.0.0 16 | commandTests: 17 | - name: "elixir version" 18 | command: "elixir" 19 | args: ["--version"] 20 | expectedOutput: ["Elixir 1.11"] 21 | - name: "otp version" 22 | command: "elixir" 23 | args: ["--version"] 24 | expectedOutput: ["Erlang/OTP 23"] 25 | - name: "node version" 26 | command: "node" 27 | args: ["--version"] 28 | expectedOutput: ["20"] 29 | - name: "docker version" 30 | command: "docker" 31 | args: ["version"] 32 | expectedOutput: ["24.0"] 33 | exitCode: 1 34 | -------------------------------------------------------------------------------- /elixir/elixir112.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2019 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 2.0.0 16 | commandTests: 17 | - name: "elixir version" 18 | command: "elixir" 19 | args: ["--version"] 20 | expectedOutput: ["Elixir 1.12"] 21 | - name: "otp version" 22 | command: "elixir" 23 | args: ["--version"] 24 | expectedOutput: ["Erlang/OTP 24"] 25 | - name: "node version" 26 | command: "node" 27 | args: ["--version"] 28 | expectedOutput: ["20"] 29 | - name: "docker version" 30 | command: "docker" 31 | args: ["version"] 32 | expectedOutput: ["24.0"] 33 | exitCode: 1 34 | -------------------------------------------------------------------------------- /elixir/elixir113.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2019 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 2.0.0 16 | commandTests: 17 | - name: "elixir version" 18 | command: "elixir" 19 | args: ["--version"] 20 | expectedOutput: ["Elixir 1.13"] 21 | - name: "otp version" 22 | command: "elixir" 23 | args: ["--version"] 24 | expectedOutput: ["Erlang/OTP 24"] 25 | - name: "node version" 26 | command: "node" 27 | args: ["--version"] 28 | expectedOutput: ["20"] 29 | - name: "docker version" 30 | command: "docker" 31 | args: ["version"] 32 | expectedOutput: ["24.0"] 33 | exitCode: 1 34 | -------------------------------------------------------------------------------- /elixir/elixir114.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2019 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 2.0.0 16 | commandTests: 17 | - name: "elixir version" 18 | command: "elixir" 19 | args: ["--version"] 20 | expectedOutput: ["Elixir 1.14"] 21 | - name: "otp version" 22 | command: "elixir" 23 | args: ["--version"] 24 | expectedOutput: ["Erlang/OTP 26"] 25 | - name: "node version" 26 | command: "node" 27 | args: ["--version"] 28 | expectedOutput: ["20"] 29 | - name: "docker version" 30 | command: "docker" 31 | args: ["version"] 32 | expectedOutput: ["24.0"] 33 | exitCode: 1 34 | -------------------------------------------------------------------------------- /elixir/elixir115.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2019 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 2.0.0 16 | commandTests: 17 | - name: "elixir version" 18 | command: "elixir" 19 | args: ["--version"] 20 | expectedOutput: ["Elixir 1.15"] 21 | - name: "otp version" 22 | command: "elixir" 23 | args: ["--version"] 24 | expectedOutput: ["Erlang/OTP 26"] 25 | - name: "node version" 26 | command: "node" 27 | args: ["--version"] 28 | expectedOutput: ["20"] 29 | - name: "docker version" 30 | command: "docker" 31 | args: ["version"] 32 | expectedOutput: ["24.0"] 33 | exitCode: 1 34 | -------------------------------------------------------------------------------- /elixir/elixir116.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2019 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 2.0.0 16 | commandTests: 17 | - name: "elixir version" 18 | command: "elixir" 19 | args: ["--version"] 20 | expectedOutput: ["Elixir 1.16"] 21 | - name: "otp version" 22 | command: "elixir" 23 | args: ["--version"] 24 | expectedOutput: ["Erlang/OTP 26"] 25 | - name: "node version" 26 | command: "node" 27 | args: ["--version"] 28 | expectedOutput: ["20"] 29 | - name: "docker version" 30 | command: "docker" 31 | args: ["version"] 32 | expectedOutput: ["24.0"] 33 | exitCode: 1 34 | -------------------------------------------------------------------------------- /elixir/elixir16.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 2.0.0 16 | commandTests: 17 | - name: "elixir version" 18 | command: "elixir" 19 | args: ["--version"] 20 | expectedOutput: ["Elixir 1.6"] 21 | - name: "otp version" 22 | command: "elixir" 23 | args: ["--version"] 24 | expectedOutput: ["Erlang/OTP 20"] 25 | - name: "node version" 26 | command: "node" 27 | args: ["--version"] 28 | expectedOutput: ["20"] 29 | - name: "docker version" 30 | command: "docker" 31 | args: ["version"] 32 | expectedOutput: ["24.0"] 33 | exitCode: 1 34 | -------------------------------------------------------------------------------- /elixir/elixir17.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 2.0.0 16 | commandTests: 17 | - name: "elixir version" 18 | command: "elixir" 19 | args: ["--version"] 20 | expectedOutput: ["Elixir 1.7"] 21 | - name: "otp version" 22 | command: "elixir" 23 | args: ["--version"] 24 | expectedOutput: ["Erlang/OTP 21"] 25 | - name: "node version" 26 | command: "node" 27 | args: ["--version"] 28 | expectedOutput: ["20"] 29 | - name: "docker version" 30 | command: "docker" 31 | args: ["version"] 32 | expectedOutput: ["24.0"] 33 | exitCode: 1 34 | -------------------------------------------------------------------------------- /elixir/elixir18.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2019 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 2.0.0 16 | commandTests: 17 | - name: "elixir version" 18 | command: "elixir" 19 | args: ["--version"] 20 | expectedOutput: ["Elixir 1.8"] 21 | - name: "otp version" 22 | command: "elixir" 23 | args: ["--version"] 24 | expectedOutput: ["Erlang/OTP 21"] 25 | - name: "node version" 26 | command: "node" 27 | args: ["--version"] 28 | expectedOutput: ["20"] 29 | - name: "docker version" 30 | command: "docker" 31 | args: ["version"] 32 | expectedOutput: ["24.0"] 33 | exitCode: 1 34 | -------------------------------------------------------------------------------- /elixir/elixir19.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2019 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 2.0.0 16 | commandTests: 17 | - name: "elixir version" 18 | command: "elixir" 19 | args: ["--version"] 20 | expectedOutput: ["Elixir 1.9"] 21 | - name: "otp version" 22 | command: "elixir" 23 | args: ["--version"] 24 | expectedOutput: ["Erlang/OTP 22"] 25 | - name: "node version" 26 | command: "node" 27 | args: ["--version"] 28 | expectedOutput: ["20"] 29 | - name: "docker version" 30 | command: "docker" 31 | args: ["version"] 32 | expectedOutput: ["24.0"] 33 | exitCode: 1 34 | -------------------------------------------------------------------------------- /elixir/plt_builder/.formatter.exs: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Used by "mix format" 16 | [ 17 | inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] 18 | ] 19 | -------------------------------------------------------------------------------- /elixir/plt_builder/.gitignore: -------------------------------------------------------------------------------- 1 | # The directory Mix will write compiled artifacts to. 2 | /_build/ 3 | 4 | # If you run "mix test --cover", coverage assets end up here. 5 | /cover/ 6 | 7 | # The directory Mix downloads your dependencies sources to. 8 | /deps/ 9 | 10 | # Where 3rd-party dependencies like ExDoc output generated docs. 11 | /doc/ 12 | 13 | # Ignore .fetch files in case you like to edit your project deps locally. 14 | /.fetch 15 | 16 | # If the VM crashes, it generates a dump, let's ignore it too. 17 | erl_crash.dump 18 | 19 | # Also ignore archive artifacts (built via "mix archive.build"). 20 | *.ez 21 | 22 | # Ignore package tarball (built via "mix hex.build"). 23 | plt_builder-*.tar 24 | 25 | -------------------------------------------------------------------------------- /elixir/plt_builder/README.md: -------------------------------------------------------------------------------- 1 | # PltBuilder 2 | 3 | **TODO: Add description** 4 | 5 | ## Installation 6 | 7 | If [available in Hex](https://hex.pm/docs/publish), the package can be installed 8 | by adding `plt_builder` to your list of dependencies in `mix.exs`: 9 | 10 | ```elixir 11 | def deps do 12 | [ 13 | {:plt_builder, "~> 0.1.0"} 14 | ] 15 | end 16 | ``` 17 | 18 | Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc) 19 | and published on [HexDocs](https://hexdocs.pm). Once published, the docs can 20 | be found at [https://hexdocs.pm/plt_builder](https://hexdocs.pm/plt_builder). 21 | 22 | -------------------------------------------------------------------------------- /elixir/plt_builder/config/config.exs: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # This file is responsible for configuring your application 16 | # and its dependencies with the aid of the Mix.Config module. 17 | use Mix.Config 18 | 19 | # This configuration is loaded before any dependency and is restricted 20 | # to this project. If another project depends on this project, this 21 | # file won't be loaded nor affect the parent project. For this reason, 22 | # if you want to provide default values for your application for 23 | # 3rd-party users, it should be done in your "mix.exs" file. 24 | 25 | # You can configure your application as: 26 | # 27 | # config :plt_builder, key: :value 28 | # 29 | # and access this configuration in your application as: 30 | # 31 | # Application.get_env(:plt_builder, :key) 32 | # 33 | # You can also configure a 3rd-party app: 34 | # 35 | # config :logger, level: :info 36 | # 37 | 38 | # It is also possible to import configuration files, relative to this 39 | # directory. For example, you can emulate configuration per environment 40 | # by uncommenting the line below and defining dev.exs, test.exs and such. 41 | # Configuration from the imported file will override the ones defined 42 | # here (which is why it is important to import them last). 43 | # 44 | # import_config "#{Mix.env()}.exs" 45 | -------------------------------------------------------------------------------- /elixir/plt_builder/lib/plt_builder.ex: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | defmodule PltBuilder do 16 | @moduledoc """ 17 | Documentation for PltBuilder. 18 | """ 19 | 20 | @doc """ 21 | Hello world. 22 | 23 | ## Examples 24 | 25 | iex> PltBuilder.hello() 26 | :world 27 | 28 | """ 29 | def hello do 30 | :world 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /elixir/plt_builder/mix.exs: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | defmodule PltBuilder.MixProject do 16 | use Mix.Project 17 | 18 | def project do 19 | [ 20 | app: :plt_builder, 21 | version: "0.1.0", 22 | elixir: "~> 1.6", 23 | start_permanent: Mix.env() == :prod, 24 | deps: deps() 25 | ] 26 | end 27 | 28 | # Run "mix help compile.app" to learn about applications. 29 | def application do 30 | [ 31 | extra_applications: [:logger] 32 | ] 33 | end 34 | 35 | # Run "mix help deps" to learn about dependencies. 36 | defp deps do 37 | [ 38 | {:dialyxir, "~> 1.0", only: [:dev], runtime: false} 39 | ] 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /elixir/plt_builder/plts/elixir110/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/testing-infra-docker/b7c76e8d3d7a5112c27c0281be6aeb7416bdbe0b/elixir/plt_builder/plts/elixir110/.gitkeep -------------------------------------------------------------------------------- /elixir/plt_builder/plts/elixir111/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/testing-infra-docker/b7c76e8d3d7a5112c27c0281be6aeb7416bdbe0b/elixir/plt_builder/plts/elixir111/.gitkeep -------------------------------------------------------------------------------- /elixir/plt_builder/plts/elixir112/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/testing-infra-docker/b7c76e8d3d7a5112c27c0281be6aeb7416bdbe0b/elixir/plt_builder/plts/elixir112/.gitkeep -------------------------------------------------------------------------------- /elixir/plt_builder/plts/elixir113/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/testing-infra-docker/b7c76e8d3d7a5112c27c0281be6aeb7416bdbe0b/elixir/plt_builder/plts/elixir113/.gitkeep -------------------------------------------------------------------------------- /elixir/plt_builder/plts/elixir114/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/testing-infra-docker/b7c76e8d3d7a5112c27c0281be6aeb7416bdbe0b/elixir/plt_builder/plts/elixir114/.gitkeep -------------------------------------------------------------------------------- /elixir/plt_builder/plts/elixir115/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/testing-infra-docker/b7c76e8d3d7a5112c27c0281be6aeb7416bdbe0b/elixir/plt_builder/plts/elixir115/.gitkeep -------------------------------------------------------------------------------- /elixir/plt_builder/plts/elixir116/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/testing-infra-docker/b7c76e8d3d7a5112c27c0281be6aeb7416bdbe0b/elixir/plt_builder/plts/elixir116/.gitkeep -------------------------------------------------------------------------------- /elixir/plt_builder/plts/elixir16/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/testing-infra-docker/b7c76e8d3d7a5112c27c0281be6aeb7416bdbe0b/elixir/plt_builder/plts/elixir16/.gitkeep -------------------------------------------------------------------------------- /elixir/plt_builder/plts/elixir17/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/testing-infra-docker/b7c76e8d3d7a5112c27c0281be6aeb7416bdbe0b/elixir/plt_builder/plts/elixir17/.gitkeep -------------------------------------------------------------------------------- /elixir/plt_builder/plts/elixir18/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/testing-infra-docker/b7c76e8d3d7a5112c27c0281be6aeb7416bdbe0b/elixir/plt_builder/plts/elixir18/.gitkeep -------------------------------------------------------------------------------- /elixir/plt_builder/plts/elixir19/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/testing-infra-docker/b7c76e8d3d7a5112c27c0281be6aeb7416bdbe0b/elixir/plt_builder/plts/elixir19/.gitkeep -------------------------------------------------------------------------------- /elixir/plt_builder/test/plt_builder_test.exs: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | defmodule PltBuilderTest do 16 | use ExUnit.Case 17 | doctest PltBuilder 18 | 19 | test "greets the world" do 20 | assert PltBuilder.hello() == :world 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /elixir/plt_builder/test/test_helper.exs: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | ExUnit.start() 16 | -------------------------------------------------------------------------------- /go/README.md: -------------------------------------------------------------------------------- 1 | # Go Docker images 2 | 3 | This directory contains the Docker images for running Go tests for the Google API toolchains. 4 | The primary use case for these images is to run tests on Kokoro via Trampoline. 5 | 6 | ## Running images 7 | 8 | You can manually run the Docker images on Cloud Build: 9 | 10 | ```shell 11 | gcloud builds submit --config=cloudbuild.yaml . 12 | ``` 13 | 14 | ## Publishing images 15 | 16 | You can manually publish the images: 17 | 18 | ```shell 19 | # first, auth. make sure you're in the cloud-dpe-testing-working-group googlegroup to have access 20 | gcloud auth login 21 | gcloud builds submit \ 22 | --timeout 1h \ 23 | --project=cloud-devrel-kokoro-resources \ 24 | --config=go/cloudbuild.yaml . 25 | ``` 26 | -------------------------------------------------------------------------------- /go/cloudbuild-release.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # note: /workspace is a special directory in the docker image where all the files in this folder 16 | # get placed on your behalf 17 | 18 | timeout: 7200s # 2 hours 19 | steps: 20 | # Go 1.24 build 21 | - name: gcr.io/cloud-builders/docker 22 | args: ["build", "-t", "us-central1-docker.pkg.dev/$PROJECT_ID/release-images/go124", "."] 23 | dir: go/go124-release 24 | id: go124-build 25 | waitFor: ["-"] 26 | - name: gcr.io/gcp-runtimes/structure_test 27 | args: 28 | [ 29 | "-i", 30 | "us-central1-docker.pkg.dev/$PROJECT_ID/release-images/go124", 31 | "--config", 32 | "/workspace/go/go124.yaml", 33 | "-v", 34 | ] 35 | waitFor: ["go124-build"] 36 | 37 | images: 38 | - us-central1-docker.pkg.dev/$PROJECT_ID/release-images/go124 39 | 40 | options: 41 | logging: CLOUD_LOGGING_ONLY 42 | -------------------------------------------------------------------------------- /go/cloudbuild-test.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2020 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # note: /workspace is a special directory in the docker image where all the files in this folder 16 | # get placed on your behalf 17 | 18 | timeout: 7200s 19 | steps: 20 | # Go 1.23 build 21 | - name: gcr.io/cloud-builders/docker 22 | args: ["build", "-t", "us-central1-docker.pkg.dev/$PROJECT_ID/go123", "."] 23 | dir: go/go123 24 | id: go123-build 25 | waitFor: ["-"] 26 | - name: gcr.io/gcp-runtimes/structure_test 27 | args: 28 | [ 29 | "-i", 30 | "us-central1-docker.pkg.dev/$PROJECT_ID/go123", 31 | "--config", 32 | "/workspace/go/go123.yaml", 33 | "-v", 34 | ] 35 | waitFor: ["go123-build"] 36 | 37 | # Go 1.24 build 38 | - name: gcr.io/cloud-builders/docker 39 | args: ["build", "-t", "us-central1-docker.pkg.dev/$PROJECT_ID/go124", "."] 40 | dir: go/go124 41 | id: go124-build 42 | waitFor: ["-"] 43 | - name: gcr.io/gcp-runtimes/structure_test 44 | args: 45 | [ 46 | "-i", 47 | "us-central1-docker.pkg.dev/$PROJECT_ID/go124", 48 | "--config", 49 | "/workspace/go/go124.yaml", 50 | "-v", 51 | ] 52 | waitFor: ["go124-build"] 53 | 54 | # Go 1.24 release build 55 | - name: gcr.io/cloud-builders/docker 56 | args: ["build", "-t", "us-central1-docker.pkg.dev/$PROJECT_ID/release-images/go124", "."] 57 | dir: go/go124-release 58 | id: go124-release-build 59 | waitFor: ["-"] 60 | - name: gcr.io/gcp-runtimes/structure_test 61 | args: 62 | [ 63 | "-i", 64 | "us-central1-docker.pkg.dev/$PROJECT_ID/release-images/go124", 65 | "--config", 66 | "/workspace/go/go124-release.yaml", 67 | "-v", 68 | ] 69 | waitFor: ["go124-release-build"] 70 | -------------------------------------------------------------------------------- /go/cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # note: /workspace is a special directory in the docker image where all the files in this folder 16 | # get placed on your behalf 17 | 18 | timeout: 7200s # 2 hours 19 | steps: 20 | # Go 1.22 build 21 | - name: gcr.io/cloud-builders/docker 22 | args: ["build", "-t", "gcr.io/$PROJECT_ID/go123", "."] 23 | dir: go/go123 24 | id: go123-build 25 | waitFor: ["-"] 26 | - name: gcr.io/gcp-runtimes/structure_test 27 | args: 28 | [ 29 | "-i", 30 | "gcr.io/$PROJECT_ID/go123", 31 | "--config", 32 | "/workspace/go/go123.yaml", 33 | "-v", 34 | ] 35 | waitFor: ["go123-build"] 36 | 37 | # Go 1.24 build 38 | - name: gcr.io/cloud-builders/docker 39 | args: ["build", "-t", "gcr.io/$PROJECT_ID/go124", "."] 40 | dir: go/go124 41 | id: go124-build 42 | waitFor: ["-"] 43 | - name: gcr.io/gcp-runtimes/structure_test 44 | args: 45 | [ 46 | "-i", 47 | "gcr.io/$PROJECT_ID/go124", 48 | "--config", 49 | "/workspace/go/go124.yaml", 50 | "-v", 51 | ] 52 | waitFor: ["go124-build"] 53 | 54 | images: 55 | - gcr.io/$PROJECT_ID/go123 56 | - gcr.io/$PROJECT_ID/go124 57 | 58 | options: 59 | logging: CLOUD_LOGGING_ONLY 60 | -------------------------------------------------------------------------------- /go/go123.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "version" 18 | command: ["go", "version"] 19 | expectedOutput: ["go version go1.23"] 20 | - name: "gcloud" 21 | command: ["gcloud", "version"] 22 | expectedOutput: ["Google Cloud SDK"] 23 | -------------------------------------------------------------------------------- /go/go123/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM golang:1.23 16 | 17 | # Install dependencies 18 | RUN set -ex; \ 19 | apt-get update -y; \ 20 | apt-get install -y \ 21 | unzip wget vim \ 22 | # for docker 23 | ca-certificates curl gnupg 24 | 25 | RUN install -m 0755 -d /etc/apt/keyrings && \ 26 | curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ 27 | chmod a+r /etc/apt/keyrings/docker.gpg && \ 28 | echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ 29 | "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ 30 | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ 31 | apt-get update 32 | RUN apt-get install -y docker-ce docker-ce-cli containerd.io 33 | 34 | RUN rm -rf /var/lib/apt/lists/* 35 | 36 | # Install protoc 37 | RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/protoc-3.13.0-linux-x86_64.zip 38 | RUN unzip protoc-3.13.0-linux-x86_64.zip 39 | RUN mv bin/protoc /bin/protoc && which protoc 40 | 41 | # Install gcloud SDK 42 | RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ 43 | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && \ 44 | apt-get install google-cloud-sdk -y 45 | 46 | # Install tools used in build 47 | RUN (export GOTOOLCHAIN='auto' && \ 48 | go install honnef.co/go/tools/cmd/staticcheck@latest && \ 49 | go install github.com/jstemmer/go-junit-report@latest && \ 50 | go install golang.org/x/lint/golint@latest && \ 51 | go install golang.org/x/tools/cmd/goimports@latest) 52 | 53 | WORKDIR $GOPATH 54 | -------------------------------------------------------------------------------- /go/go124-release.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "version" 18 | command: ["go", "version"] 19 | expectedOutput: ["go version go1.24"] 20 | - name: "gcloud" 21 | command: ["gcloud", "version"] 22 | expectedOutput: ["Google Cloud SDK"] 23 | - name: "python3" 24 | command: ["python3", "--version"] 25 | expectedOutput: ["Python 3.9.13"] 26 | - name: "jq" 27 | command: ["jq", "--version"] 28 | expectedOutput: ["jq-"] 29 | - name: "uuidgen" 30 | command: ["uuidgen", "--version"] 31 | expectedOutput: ["uuidgen"] 32 | - name: "git" 33 | command: ["git", "--version"] 34 | expectedOutput: ["git version"] 35 | - name: "zip" 36 | command: ["zip", "--version"] 37 | expectedOutput: ["This is Zip"] 38 | -------------------------------------------------------------------------------- /go/go124-release/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM golang:1.24 16 | 17 | # Install dependencies 18 | RUN set -ex; \ 19 | apt-get update -y; \ 20 | apt-get install -y \ 21 | unzip wget vim jq zip \ 22 | # for docker 23 | ca-certificates curl gnupg \ 24 | # for SBOM generation 25 | uuid-runtime 26 | 27 | RUN install -m 0755 -d /etc/apt/keyrings && \ 28 | curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ 29 | chmod a+r /etc/apt/keyrings/docker.gpg && \ 30 | echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ 31 | "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ 32 | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ 33 | apt-get update 34 | RUN apt-get install -y docker-ce docker-ce-cli containerd.io 35 | 36 | RUN rm -rf /var/lib/apt/lists/* 37 | 38 | # Install protoc 39 | RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/protoc-3.13.0-linux-x86_64.zip 40 | RUN unzip protoc-3.13.0-linux-x86_64.zip 41 | RUN mv bin/protoc /bin/protoc && which protoc 42 | 43 | # Install gcloud SDK 44 | RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ 45 | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && \ 46 | apt-get install google-cloud-sdk -y 47 | 48 | # Install tools used in build 49 | RUN (export GOTOOLCHAIN='auto' && \ 50 | go install honnef.co/go/tools/cmd/staticcheck@latest && \ 51 | go install github.com/jstemmer/go-junit-report@latest && \ 52 | go install golang.org/x/lint/golint@latest && \ 53 | go install golang.org/x/tools/cmd/goimports@latest) 54 | 55 | # Install pyenv 56 | RUN apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ 57 | libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ 58 | xz-utils tk-dev libffi-dev liblzma-dev python3-openssl 59 | RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv 60 | 61 | ENV PATH /root/.pyenv/bin:$PATH 62 | ENV PATH /root/.pyenv/shims:$PATH 63 | 64 | RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> .bashrc && \ 65 | echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> .bashrc && \ 66 | echo 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc 67 | 68 | # Install python 69 | RUN pyenv install 3.9.13 && \ 70 | pyenv global 3.9.13 && \ 71 | python3 -m pip install --upgrade pip setuptools 72 | 73 | WORKDIR $GOPATH 74 | -------------------------------------------------------------------------------- /go/go124.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "version" 18 | command: ["go", "version"] 19 | expectedOutput: ["go version go1.24"] 20 | - name: "gcloud" 21 | command: ["gcloud", "version"] 22 | expectedOutput: ["Google Cloud SDK"] 23 | -------------------------------------------------------------------------------- /go/go124/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM golang:1.24 16 | 17 | # Install dependencies 18 | RUN set -ex; \ 19 | apt-get update -y; \ 20 | apt-get install -y \ 21 | unzip wget vim \ 22 | # for docker 23 | ca-certificates curl gnupg 24 | 25 | RUN install -m 0755 -d /etc/apt/keyrings && \ 26 | curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ 27 | chmod a+r /etc/apt/keyrings/docker.gpg && \ 28 | echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ 29 | "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ 30 | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ 31 | apt-get update 32 | RUN apt-get install -y docker-ce docker-ce-cli containerd.io 33 | 34 | RUN rm -rf /var/lib/apt/lists/* 35 | 36 | # Install protoc 37 | RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/protoc-3.13.0-linux-x86_64.zip 38 | RUN unzip protoc-3.13.0-linux-x86_64.zip 39 | RUN mv bin/protoc /bin/protoc && which protoc 40 | 41 | # Install gcloud SDK 42 | RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ 43 | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && \ 44 | apt-get install google-cloud-sdk -y 45 | 46 | # Install tools used in build 47 | RUN (export GOTOOLCHAIN='auto' && \ 48 | go install honnef.co/go/tools/cmd/staticcheck@latest && \ 49 | go install github.com/jstemmer/go-junit-report@latest && \ 50 | go install golang.org/x/lint/golint@latest && \ 51 | go install golang.org/x/tools/cmd/goimports@latest) 52 | 53 | WORKDIR $GOPATH 54 | -------------------------------------------------------------------------------- /java/README.md: -------------------------------------------------------------------------------- 1 | # Java Docker Images 2 | 3 | This directory contains the Docker images for running Java tests for the 4 | Google API toolchains. The primary use case for this images is to run tests 5 | on Kokoro via Trampoline. 6 | 7 | ## Supported Versions 8 | 9 | Our Java client libraries currently support Java 8+. 10 | 11 | ## Supported Tools 12 | 13 | * gcloud SDK 14 | * Maven 3.* 15 | * Gradle 4.9 16 | 17 | ## Building Images 18 | 19 | You can build all of the test images by running: 20 | 21 | gcloud builds submit --config=cloudbuild.yaml . 22 | 23 | You can publish the images by running: 24 | 25 | gcloud builds submit --project=cloud-devrel-kokoro-resources --config=cloudbuild.yaml . 26 | -------------------------------------------------------------------------------- /java/cloudbuild-release.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | - name: "gcr.io/cloud-builders/docker" 18 | # go/airlock/howto_docker#example-gcb-dockerfile-in-docker-build-support 19 | id: buildx-create 20 | args: 21 | - buildx 22 | - create 23 | - --name=buildx-builder 24 | - --driver=docker-container 25 | - --driver-opt 26 | - network=cloudbuild 27 | - --use 28 | # Java 8 Airlock build 29 | - name: gcr.io/cloud-builders/docker 30 | # go/airlock/howto_docker#example-gcb-dockerfile-in-docker-build-support 31 | id: buildx-create 32 | # https://docs.docker.com/build/builders/drivers/#loading-to-local-image-store 33 | args: ["buildx", "build", "--add-host=metadata.google.internal:169.254.169.254", 34 | "--load", 35 | "-t", "us-central1-docker.pkg.dev/$PROJECT_ID/release-images/java8-airlock", "."] 36 | dir: java/java8-airlock 37 | id: java8-airlock-build 38 | waitFor: ["buildx-create"] 39 | - name: gcr.io/gcp-runtimes/structure_test 40 | args: 41 | ["-i", "us-central1-docker.pkg.dev/$PROJECT_ID/release-images/java8-airlock", "--config", "java/java8-airlock.yaml", "-v"] 42 | waitFor: ["java8-airlock-build"] 43 | # Java 8 build 44 | - name: gcr.io/cloud-builders/docker 45 | args: ["build", "-t", "us-central1-docker.pkg.dev/$PROJECT_ID/release-images/java8", "."] 46 | dir: java/java8 47 | id: java8-build 48 | waitFor: ["-"] 49 | - name: gcr.io/gcp-runtimes/structure_test 50 | args: 51 | ["-i", "us-central1-docker.pkg.dev/$PROJECT_ID/release-images/java8", "--config", "java/java8.yaml", "-v"] 52 | waitFor: ["java8-build"] 53 | 54 | # Java 17 build specifically for java-storage 55 | - name: gcr.io/cloud-builders/docker 56 | args: ["build", "-t", "us-central1-docker.pkg.dev/$PROJECT_ID/release-images/java17", "."] 57 | dir: java/java17 58 | id: java17-build 59 | # Without waiting Java 8, you would get a conflict error "daemon: Conflict. The container name "/buildx_buildkit_buildx-builder0" is already in use by container" 60 | waitFor: ["java8-build"] 61 | - name: gcr.io/gcp-runtimes/structure_test 62 | args: 63 | ["-i", "us-central1-docker.pkg.dev/$PROJECT_ID/release-images/java17", "--config", "java/java17.yaml", "-v"] 64 | waitFor: ["java17-build"] 65 | 66 | images: 67 | - us-central1-docker.pkg.dev/$PROJECT_ID/release-images/java8 68 | - us-central1-docker.pkg.dev/$PROJECT_ID/release-images/java8-airlock 69 | - us-central1-docker.pkg.dev/$PROJECT_ID/release-images/java17 70 | 71 | options: 72 | logging: CLOUD_LOGGING_ONLY 73 | -------------------------------------------------------------------------------- /java/cloudbuild-test.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2020 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | substitutions: 17 | _GRAALVM_VERSION: '22.3.3' 18 | steps: 19 | - name: "gcr.io/cloud-builders/docker" 20 | # go/airlock/howto_docker#example-gcb-dockerfile-in-docker-build-support 21 | id: buildx-create 22 | args: 23 | - buildx 24 | - create 25 | - --name=buildx-builder 26 | - --driver=docker-container 27 | - --driver-opt 28 | - network=cloudbuild 29 | - --use 30 | # Java 8 Airlock build 31 | - name: gcr.io/cloud-builders/docker 32 | # go/airlock/howto_docker#example-gcb-dockerfile-in-docker-build-support 33 | # https://docs.docker.com/build/builders/drivers/#loading-to-local-image-store 34 | args: ["buildx", "build", "--add-host=metadata.google.internal:169.254.169.254", 35 | "--load", 36 | "-t", "java8-airlock-local", 37 | "."] 38 | dir: java/java8-airlock 39 | id: java8-airlock-build 40 | waitFor: ["buildx-create"] 41 | env: 42 | - 'DOCKER_BUILDKIT=1' 43 | - 'COMPOSE_DOCKER_CLI_BUILD=1' 44 | - name: gcr.io/cloud-builders/docker 45 | args: ["image", "ls"] 46 | id: java8-airlock-build-check 47 | waitFor: ["java8-airlock-build"] 48 | - name: gcr.io/gcp-runtimes/structure_test 49 | args: 50 | ["-i", "java8-airlock-local", "--config", "java/java8-airlock.yaml", "-v"] 51 | waitFor: ["java8-airlock-build"] 52 | # Java 8 build 53 | - name: gcr.io/cloud-builders/docker 54 | args: ["build", "-t", "gcr.io/$PROJECT_ID/java8", "."] 55 | dir: java/java8 56 | id: java8-build 57 | waitFor: ["-"] 58 | - name: gcr.io/gcp-runtimes/structure_test 59 | args: 60 | ["-i", "gcr.io/$PROJECT_ID/java8", "--config", "java/java8.yaml", "-v"] 61 | waitFor: ["java8-build"] 62 | 63 | # Java 11 build 64 | - name: gcr.io/cloud-builders/docker 65 | args: ["build", "-t", "gcr.io/$PROJECT_ID/java11", "."] 66 | dir: java/java11 67 | id: java11-build 68 | waitFor: ["-"] 69 | - name: gcr.io/gcp-runtimes/structure_test 70 | args: 71 | ["-i", "gcr.io/$PROJECT_ID/java11", "--config", "java/java11.yaml", "-v"] 72 | waitFor: ["java11-build"] 73 | - name: gcr.io/cloud-builders/docker 74 | args: 75 | [ 76 | "tag", 77 | "gcr.io/$PROJECT_ID/java11", 78 | "gcr.io/cloud-devrel-public-resources/java11", 79 | ] 80 | waitFor: ["java11-build"] 81 | 82 | # Java 11.0.14 build 83 | - name: gcr.io/cloud-builders/docker 84 | args: ["build", "-t", "gcr.io/$PROJECT_ID/java11014", "."] 85 | dir: java/java11014 86 | id: java11014-build 87 | waitFor: ["-"] 88 | - name: gcr.io/gcp-runtimes/structure_test 89 | args: 90 | ["-i", "gcr.io/$PROJECT_ID/java11014", "--config", "java/java11014.yaml", "-v"] 91 | waitFor: ["java11014-build"] 92 | - name: gcr.io/cloud-builders/docker 93 | args: 94 | [ 95 | "tag", 96 | "gcr.io/$PROJECT_ID/java11014", 97 | "gcr.io/cloud-devrel-public-resources/java11014", 98 | ] 99 | waitFor: ["java11014-build"] 100 | 101 | # Java 17 build 102 | - name: gcr.io/cloud-builders/docker 103 | args: ["build", "-t", "gcr.io/$PROJECT_ID/java17", "."] 104 | dir: java/java17 105 | id: java17-build 106 | # Without waiting Java 8, you would get a conflict error "daemon: Conflict. The container name "/buildx_buildkit_buildx-builder0" is already in use by container" 107 | waitFor: ["buildx-create", "java8-build"] 108 | - name: gcr.io/gcp-runtimes/structure_test 109 | args: 110 | ["-i", "gcr.io/$PROJECT_ID/java17", "--config", "java/java17.yaml", "-v"] 111 | waitFor: ["java17-build"] 112 | - name: gcr.io/cloud-builders/docker 113 | args: 114 | [ 115 | "tag", 116 | "gcr.io/$PROJECT_ID/java17", 117 | "gcr.io/cloud-devrel-public-resources/java17", 118 | ] 119 | waitFor: ["java17-build"] 120 | -------------------------------------------------------------------------------- /java/cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | substitutions: 17 | _GRAALVM_VERSION: '22.3.3' 18 | steps: 19 | # Java 8 build 20 | - name: gcr.io/cloud-builders/docker 21 | args: ["build", "-t", "gcr.io/$PROJECT_ID/java8", "."] 22 | dir: java/java8 23 | id: java8-build 24 | waitFor: ["-"] 25 | - name: gcr.io/gcp-runtimes/structure_test 26 | args: 27 | ["-i", "gcr.io/$PROJECT_ID/java8", "--config", "java/java8.yaml", "-v"] 28 | waitFor: ["java8-build"] 29 | - name: gcr.io/cloud-builders/docker 30 | args: 31 | [ 32 | "tag", 33 | "gcr.io/$PROJECT_ID/java8", 34 | "gcr.io/cloud-devrel-public-resources/java8", 35 | ] 36 | - name: gcr.io/cloud-builders/docker 37 | # The tag for image scanning (b/314943422) 38 | args: 39 | [ 40 | "tag", 41 | "gcr.io/$PROJECT_ID/java8", 42 | "gcr.io/cloud-devrel-public-resources/java8:infrastructure-public-image-$SHORT_SHA", 43 | ] 44 | waitFor: ["java8-build"] 45 | 46 | 47 | # Java 11 build 48 | - name: gcr.io/cloud-builders/docker 49 | args: ["build", "-t", "gcr.io/$PROJECT_ID/java11", "."] 50 | dir: java/java11 51 | id: java11-build 52 | waitFor: ["-"] 53 | - name: gcr.io/gcp-runtimes/structure_test 54 | args: 55 | ["-i", "gcr.io/$PROJECT_ID/java11", "--config", "java/java11.yaml", "-v"] 56 | waitFor: ["java11-build"] 57 | - name: gcr.io/cloud-builders/docker 58 | args: 59 | [ 60 | "tag", 61 | "gcr.io/$PROJECT_ID/java11", 62 | "gcr.io/cloud-devrel-public-resources/java11", 63 | ] 64 | - name: gcr.io/cloud-builders/docker 65 | # The tag for image scanning (b/314943422) 66 | args: 67 | [ 68 | "tag", 69 | "gcr.io/$PROJECT_ID/java11", 70 | "gcr.io/cloud-devrel-public-resources/java11:infrastructure-public-image-$SHORT_SHA", 71 | ] 72 | waitFor: ["java11-build"] 73 | 74 | # Java 11.0.14 build 75 | - name: gcr.io/cloud-builders/docker 76 | args: ["build", "-t", "gcr.io/$PROJECT_ID/java11014", "."] 77 | dir: java/java11014 78 | id: java11014-build 79 | waitFor: ["-"] 80 | - name: gcr.io/gcp-runtimes/structure_test 81 | args: 82 | ["-i", "gcr.io/$PROJECT_ID/java11014", "--config", "java/java11014.yaml", "-v"] 83 | waitFor: ["java11014-build"] 84 | - name: gcr.io/cloud-builders/docker 85 | args: 86 | [ 87 | "tag", 88 | "gcr.io/$PROJECT_ID/java11014", 89 | "gcr.io/cloud-devrel-public-resources/java11014", 90 | ] 91 | - name: gcr.io/cloud-builders/docker 92 | # The tag for image scanning (b/314943422) 93 | args: 94 | [ 95 | "tag", 96 | "gcr.io/$PROJECT_ID/java11014", 97 | "gcr.io/cloud-devrel-public-resources/java11014:infrastructure-public-image-$SHORT_SHA", 98 | ] 99 | waitFor: ["java11014-build"] 100 | 101 | # Java 17 build 102 | - name: gcr.io/cloud-builders/docker 103 | args: ["build", "-t", "gcr.io/$PROJECT_ID/java17", "."] 104 | dir: java/java17 105 | id: java17-build 106 | waitFor: ["-"] 107 | - name: gcr.io/gcp-runtimes/structure_test 108 | args: 109 | ["-i", "gcr.io/$PROJECT_ID/java17", "--config", "java/java17.yaml", "-v"] 110 | waitFor: ["java17-build"] 111 | - name: gcr.io/cloud-builders/docker 112 | args: 113 | [ 114 | "tag", 115 | "gcr.io/$PROJECT_ID/java17", 116 | "gcr.io/cloud-devrel-public-resources/java17", 117 | ] 118 | - name: gcr.io/cloud-builders/docker 119 | # The tag for image scanning (b/314943422) 120 | args: 121 | [ 122 | "tag", 123 | "gcr.io/$PROJECT_ID/java17", 124 | "gcr.io/cloud-devrel-public-resources/java17:infrastructure-public-image-$SHORT_SHA", 125 | ] 126 | waitFor: ["java17-build"] 127 | # Java 21 build 128 | - name: gcr.io/cloud-builders/docker 129 | args: ["build", "-t", "gcr.io/$PROJECT_ID/java21", "."] 130 | dir: java/java21 131 | id: java21-build 132 | waitFor: ["-"] 133 | - name: gcr.io/gcp-runtimes/structure_test 134 | args: 135 | ["-i", "gcr.io/$PROJECT_ID/java21", "--config", "java/java21.yaml", "-v"] 136 | waitFor: ["java17-build"] 137 | - name: gcr.io/cloud-builders/docker 138 | args: 139 | [ 140 | "tag", 141 | "gcr.io/$PROJECT_ID/java21", 142 | "gcr.io/cloud-devrel-public-resources/java21", 143 | ] 144 | - name: gcr.io/cloud-builders/docker 145 | # The tag for image scanning (b/314943422) 146 | args: 147 | [ 148 | "tag", 149 | "gcr.io/$PROJECT_ID/java21", 150 | "gcr.io/cloud-devrel-public-resources/java21:infrastructure-public-image-$SHORT_SHA", 151 | ] 152 | waitFor: ["java21-build"] 153 | images: 154 | - gcr.io/$PROJECT_ID/java8 155 | - gcr.io/cloud-devrel-public-resources/java8 156 | - gcr.io/$PROJECT_ID/java11 157 | - gcr.io/cloud-devrel-public-resources/java11 158 | - gcr.io/$PROJECT_ID/java11014 159 | - gcr.io/cloud-devrel-public-resources/java11014 160 | - gcr.io/$PROJECT_ID/java17 161 | - gcr.io/cloud-devrel-public-resources/java17 162 | - gcr.io/$PROJECT_ID/java21 163 | - gcr.io/cloud-devrel-public-resources/java21 164 | 165 | options: 166 | logging: CLOUD_LOGGING_ONLY 167 | -------------------------------------------------------------------------------- /java/java11.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "version" 18 | command: ["java", "-version"] 19 | # java -version outputs to stderr... 20 | expectedError: ["(java|openjdk) version \"11.*\""] 21 | - name: "maven" 22 | command: ["mvn", "-version"] 23 | expectedOutput: ["Apache Maven 3.8.*"] 24 | - name: "gradle" 25 | command: ["gradle", "-version"] 26 | expectedOutput: ["Gradle 4.9"] 27 | - name: "gcloud" 28 | command: ["gcloud", "version"] 29 | expectedOutput: ["Google Cloud SDK"] 30 | - name: "AppEngine SDK" 31 | command: ["mvn", "dependency:get", "-Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65", "-o", "-DremoteRepositories=file:~/.m2"] 32 | expectedOutput: ["BUILD SUCCESS"] 33 | - name: "Google Play Services" 34 | command: ["mvn", "dependency:get", "-Dartifact=com.google.android.google-play-services:google-play-services:1", "-o", "-DremoteRepositories=file:~/.m2"] 35 | expectedOutput: ["BUILD SUCCESS"] 36 | - name: "xmllint tool" 37 | command: ["xmllint", "--version"] 38 | expectedError: ["using libxml version"] 39 | - name: "python" 40 | command: ["python", "--version"] 41 | expectedOutput: ["Python 3.9.13"] 42 | - name: "docker" 43 | command: ["docker", "--version"] 44 | expectedOutput: ["Docker version *"] 45 | -------------------------------------------------------------------------------- /java/java11/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM openjdk:11-jdk 16 | 17 | RUN apt-get update && \ 18 | apt-get -y upgrade && \ 19 | apt-get install -y --no-install-recommends libxml2-utils apt-transport-https ca-certificates gnupg zip unzip && \ 20 | rm -rf /var/cache/apt 21 | 22 | RUN wget -q https://archive.apache.org/dist/maven/maven-3/3.8.1/binaries/apache-maven-3.8.1-bin.zip -O /tmp/maven.zip && \ 23 | unzip /tmp/maven.zip -d /tmp/maven && \ 24 | mv /tmp/maven/apache-maven-3.8.1 /usr/local/lib/maven && \ 25 | rm /tmp/maven.zip && \ 26 | ln -s $JAVA_HOME/lib $JAVA_HOME/conf 27 | 28 | RUN wget -q https://services.gradle.org/distributions/gradle-4.9-bin.zip -O /tmp/gradle.zip && \ 29 | mkdir -p /usr/local/lib/gradle && \ 30 | unzip -q /tmp/gradle.zip -d /usr/local/lib/gradle && \ 31 | rm /tmp/gradle.zip 32 | 33 | ENV PATH $PATH:/usr/local/lib/maven/bin:/usr/local/lib/gradle/gradle-4.9/bin 34 | 35 | # Install gcloud SDK 36 | RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ 37 | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && \ 38 | apt-get install google-cloud-sdk -y 39 | 40 | # Install google-play-services version 1 41 | RUN mkdir -p /tmp/playservices && \ 42 | wget -q https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/8.3.0/play-services-basement-8.3.0.aar -O /tmp/play-services-basement.aar && \ 43 | unzip -q /tmp/play-services-basement.aar -d /tmp/playservices && \ 44 | mvn install:install-file \ 45 | -Dfile=/tmp/playservices/classes.jar \ 46 | -DgroupId=com.google.android.google-play-services \ 47 | -DartifactId=google-play-services \ 48 | -Dversion=1 \ 49 | -Dpackaging=jar 50 | 51 | # Install the appengine SDK 52 | RUN mvn dependency:get -Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65 53 | 54 | # Adding the package path to local 55 | ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin 56 | 57 | # Install pyenv 58 | RUN apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ 59 | libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ 60 | xz-utils tk-dev libffi-dev liblzma-dev python3-openssl 61 | RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv 62 | 63 | ENV PATH /root/.pyenv/bin:$PATH 64 | ENV PATH /root/.pyenv/shims:$PATH 65 | 66 | RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> .bashrc && \ 67 | echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> .bashrc && \ 68 | echo 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc 69 | 70 | # Install python 71 | RUN pyenv install 3.9.13 && \ 72 | pyenv global 3.9.13 && \ 73 | python3 -m pip install --upgrade pip setuptools 74 | 75 | # Add Graphviz 76 | RUN apt-get update -y && \ 77 | apt-get install -y graphviz && \ 78 | rm -rf /var/lib/apt/lists/* 79 | 80 | # Add imagemagick 81 | RUN apt-get update -y && \ 82 | apt-get install -y imagemagick && \ 83 | rm -rf /var/lib/apt/lists/* 84 | 85 | # Install docker 86 | RUN apt-get update && apt-get install -y \ 87 | apt-transport-https \ 88 | ca-certificates \ 89 | curl \ 90 | gnupg-agent \ 91 | lsb-release \ 92 | software-properties-common && \ 93 | curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \ 94 | add-apt-repository \ 95 | "deb [arch=amd64] https://download.docker.com/linux/debian \ 96 | $(lsb_release -cs) \ 97 | stable" && \ 98 | apt-get update && \ 99 | apt-get install -y docker-ce docker-ce-cli containerd.io 100 | 101 | # Install Terraform 102 | RUN apt-get update && apt-get install -y gnupg software-properties-common curl && \ 103 | curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - && \ 104 | apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" && \ 105 | apt-get update && apt-get install terraform 106 | 107 | # jq and xmlstarlet used to modify json and xml files 108 | RUN apt-get -y install jq 109 | RUN apt-get -y install xmlstarlet 110 | 111 | # Install chrome dependencies. 112 | RUN echo "Y" | apt install libnss3 \ 113 | && echo "Y" | apt install libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev libgconf-2-4 \ 114 | && rm -rf /var/lib/apt/lists/* 115 | 116 | # Install Chrome. 117 | RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub -o /tmp/google.pub \ 118 | && cat /tmp/google.pub | apt-key add -; rm /tmp/google.pub \ 119 | && echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/google.list \ 120 | && mkdir -p /usr/share/desktop-directories \ 121 | && apt-get -y update && apt-get install -y google-chrome-stable 122 | 123 | # Disable the SUID sandbox so that Chrome can launch without being in a privileged container. 124 | RUN dpkg-divert --add --rename --divert /opt/google/chrome/google-chrome.real /opt/google/chrome/google-chrome \ 125 | && echo "#!/bin/bash\nexec /opt/google/chrome/google-chrome.real --no-sandbox --disable-setuid-sandbox \"\$@\"" > /opt/google/chrome/google-chrome \ 126 | && chmod 755 /opt/google/chrome/google-chrome \ 127 | && ln -fs /opt/google/chrome/google-chrome /usr/bin/google-chrome 128 | 129 | # Install chrome driver. 130 | RUN mkdir -p /opt/selenium \ 131 | && curl http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip -o /opt/selenium/chromedriver_linux64.zip \ 132 | && cd /opt/selenium; unzip /opt/selenium/chromedriver_linux64.zip; rm -rf chromedriver_linux64.zip; ln -fs /opt/selenium/chromedriver /usr/local/bin/chromedriver; 133 | 134 | WORKDIR /workspace 135 | -------------------------------------------------------------------------------- /java/java11014.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "version" 18 | command: ["java", "-version"] 19 | # java -version outputs to stderr... 20 | expectedError: ["(java|openjdk) version \"11.*\""] 21 | - name: "maven" 22 | command: ["mvn", "-version"] 23 | expectedOutput: ["Apache Maven 3.8.*"] 24 | - name: "gradle" 25 | command: ["gradle", "-version"] 26 | expectedOutput: ["Gradle 4.9"] 27 | - name: "gcloud" 28 | command: ["gcloud", "version"] 29 | expectedOutput: ["Google Cloud SDK"] 30 | - name: "AppEngine SDK" 31 | command: ["mvn", "dependency:get", "-Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65", "-o", "-DremoteRepositories=file:~/.m2"] 32 | expectedOutput: ["BUILD SUCCESS"] 33 | - name: "Google Play Services" 34 | command: ["mvn", "dependency:get", "-Dartifact=com.google.android.google-play-services:google-play-services:1", "-o", "-DremoteRepositories=file:~/.m2"] 35 | expectedOutput: ["BUILD SUCCESS"] 36 | - name: "xmllint tool" 37 | command: ["xmllint", "--version"] 38 | expectedError: ["using libxml version"] 39 | - name: "python" 40 | command: ["python", "--version"] 41 | expectedOutput: ["Python 3.6.12"] 42 | - name: "docker" 43 | command: ["docker", "--version"] 44 | expectedOutput: ["Docker version *"] 45 | -------------------------------------------------------------------------------- /java/java11014/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM eclipse-temurin:11 16 | 17 | RUN apt-get update && \ 18 | apt-get -y upgrade && \ 19 | apt-get install wget && \ 20 | apt-get install unzip && \ 21 | apt -y install git && \ 22 | apt-get install -y --no-install-recommends libxml2-utils apt-transport-https ca-certificates gnupg && \ 23 | rm -rf /var/cache/apt 24 | 25 | RUN wget -q https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.zip -O /tmp/maven.zip && \ 26 | unzip /tmp/maven.zip -d /tmp/maven && \ 27 | mv /tmp/maven/apache-maven-3.8.4 /usr/local/lib/maven && \ 28 | rm /tmp/maven.zip && \ 29 | ln -s $JAVA_HOME/lib $JAVA_HOME/conf 30 | 31 | RUN wget -q https://services.gradle.org/distributions/gradle-4.9-bin.zip -O /tmp/gradle.zip && \ 32 | mkdir -p /usr/local/lib/gradle && \ 33 | unzip -q /tmp/gradle.zip -d /usr/local/lib/gradle && \ 34 | rm /tmp/gradle.zip 35 | 36 | ENV PATH $PATH:/usr/local/lib/maven/bin:/usr/local/lib/gradle/gradle-4.9/bin 37 | 38 | # Install gcloud SDK 39 | RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ 40 | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && \ 41 | apt-get install google-cloud-sdk -y 42 | 43 | # Install google-play-services version 1 44 | RUN mkdir -p /tmp/playservices && \ 45 | wget -q https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/8.3.0/play-services-basement-8.3.0.aar -O /tmp/play-services-basement.aar && \ 46 | unzip -q /tmp/play-services-basement.aar -d /tmp/playservices && \ 47 | mvn install:install-file \ 48 | -Dfile=/tmp/playservices/classes.jar \ 49 | -DgroupId=com.google.android.google-play-services \ 50 | -DartifactId=google-play-services \ 51 | -Dversion=1 \ 52 | -Dpackaging=jar 53 | 54 | # Install the appengine SDK 55 | RUN mvn dependency:get -Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65 56 | 57 | # Adding the package path to local 58 | ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin 59 | 60 | # Install pyenv 61 | RUN apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ 62 | libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ 63 | xz-utils tk-dev libffi-dev liblzma-dev python3-openssl 64 | RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv 65 | 66 | ENV PATH /root/.pyenv/bin:$PATH 67 | ENV PATH /root/.pyenv/shims:$PATH 68 | 69 | RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> .bashrc && \ 70 | echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> .bashrc && \ 71 | echo 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc 72 | 73 | # Install python 74 | RUN pyenv install 3.6.12 && \ 75 | pyenv global 3.6.12 && \ 76 | python3 -m pip install --upgrade pip setuptools 77 | 78 | # Install docker 79 | RUN apt-get update && apt-get install -y \ 80 | apt-transport-https \ 81 | ca-certificates \ 82 | curl \ 83 | gnupg-agent \ 84 | lsb-release \ 85 | software-properties-common && \ 86 | curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \ 87 | add-apt-repository \ 88 | "deb [arch=amd64] https://download.docker.com/linux/debian \ 89 | bullseye \ 90 | stable" && \ 91 | apt-get update && \ 92 | apt-get install -y docker-ce docker-ce-cli containerd.io 93 | 94 | # Install Terraform 95 | RUN apt-get update && apt-get install -y gnupg software-properties-common curl && \ 96 | curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - && \ 97 | apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" && \ 98 | apt-get update && apt-get install terraform 99 | 100 | WORKDIR /workspace -------------------------------------------------------------------------------- /java/java17.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "version" 18 | command: ["java", "-version"] 19 | # java -version outputs to stderr... 20 | expectedError: ["(java|openjdk) version \"17.*\""] 21 | - name: "maven" 22 | command: ["mvn", "-version"] 23 | expectedOutput: ["Apache Maven 3.9.*"] 24 | - name: "gradle" 25 | command: ["gradle", "-version"] 26 | expectedOutput: ["Gradle 4.9"] 27 | - name: "gcloud" 28 | command: ["gcloud", "version"] 29 | expectedOutput: ["Google Cloud SDK"] 30 | - name: "AppEngine SDK" 31 | command: ["mvn", "dependency:get", "-Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65", "-o", "-DremoteRepositories=file:~/.m2"] 32 | expectedOutput: ["BUILD SUCCESS"] 33 | - name: "Google Play Services" 34 | command: ["mvn", "dependency:get", "-Dartifact=com.google.android.google-play-services:google-play-services:1", "-o", "-DremoteRepositories=file:~/.m2"] 35 | expectedOutput: ["BUILD SUCCESS"] 36 | - name: "xmllint tool" 37 | command: ["xmllint", "--version"] 38 | expectedError: ["using libxml version"] 39 | - name: "python" 40 | command: ["python", "--version"] 41 | expectedOutput: ["Python 3.9.13"] 42 | - name: "docker" 43 | command: ["docker", "--version"] 44 | expectedOutput: ["Docker version *"] 45 | -------------------------------------------------------------------------------- /java/java17/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # eclipse-temurin:17 as of Jan 9th, 2025 16 | # https://hub.docker.com/layers/library/eclipse-temurin/17/images/sha256-227c7dac267fde2625cee1dd978006a09c3f2048544b72597160620675da2668 17 | FROM us-docker.pkg.dev/artifact-foundry-prod/docker-3p-trusted/eclipse-temurin@sha256:7fccb2a944c8caed3a1f7e56a02ca52cebe5a95e06cb3e4fd35e26b9a6e7dfeb 18 | 19 | # TODO(suztomo): Update this to source them from Airlock 20 | RUN apt-get update && \ 21 | apt-get -y upgrade && \ 22 | apt-get install wget && \ 23 | apt-get install unzip && \ 24 | apt -y install git && \ 25 | apt-get install -y --no-install-recommends libxml2-utils apt-transport-https ca-certificates gnupg zip unzip && \ 26 | rm -rf /var/cache/apt 27 | 28 | ENV MAVEN_HOME=/usr/share/maven 29 | 30 | # 3.9.9-eclipse-temurin-11-alpine 31 | COPY --from=us-docker.pkg.dev/artifact-foundry-prod/docker-3p-trusted/maven@sha256:d3f04985c6a68415e36c0a6468d0f8316f27d4dbee77bc459257ba444224bd9f ${MAVEN_HOME} ${MAVEN_HOME} 32 | 33 | # TODO(suztomo): Do we use Gradle? 34 | RUN wget -q https://services.gradle.org/distributions/gradle-4.9-bin.zip -O /tmp/gradle.zip && \ 35 | mkdir -p /usr/local/lib/gradle && \ 36 | unzip -q /tmp/gradle.zip -d /usr/local/lib/gradle && \ 37 | rm /tmp/gradle.zip 38 | 39 | ENV PATH $PATH:${MAVEN_HOME}/bin:/usr/local/lib/gradle/gradle-4.9/bin 40 | 41 | # Install gcloud SDK 42 | RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ 43 | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && \ 44 | apt-get install google-cloud-sdk -y 45 | 46 | # Install google-play-services version 1 47 | RUN mkdir -p /tmp/playservices && \ 48 | wget -q https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/8.3.0/play-services-basement-8.3.0.aar -O /tmp/play-services-basement.aar && \ 49 | unzip -q /tmp/play-services-basement.aar -d /tmp/playservices && \ 50 | mvn -V install:install-file \ 51 | -Dfile=/tmp/playservices/classes.jar \ 52 | -DgroupId=com.google.android.google-play-services \ 53 | -DartifactId=google-play-services \ 54 | -Dversion=1 \ 55 | -Dpackaging=jar 56 | 57 | # Install the appengine SDK 58 | RUN mvn -V dependency:get -Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65 59 | 60 | # Adding the package path to local 61 | ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin 62 | 63 | # Install pyenv 64 | RUN apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ 65 | libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ 66 | xz-utils tk-dev libffi-dev liblzma-dev python3-openssl 67 | RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv 68 | 69 | ENV PATH /root/.pyenv/bin:$PATH 70 | ENV PATH /root/.pyenv/shims:$PATH 71 | 72 | RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> .bashrc && \ 73 | echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> .bashrc && \ 74 | echo 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc 75 | 76 | # Install python 77 | RUN pyenv install 3.9.13 && \ 78 | pyenv global 3.9.13 && \ 79 | python3 -m pip install --upgrade pip setuptools 80 | 81 | # Add Graphviz for Cloud Run samples 82 | RUN apt-get update -y && \ 83 | apt-get install -y graphviz && \ 84 | rm -rf /var/lib/apt/lists/* 85 | 86 | # Add imagemagick for Cloud Run samples 87 | RUN apt-get update -y && \ 88 | apt-get install -y imagemagick && \ 89 | rm -rf /var/lib/apt/lists/* 90 | 91 | # Install docker 92 | RUN apt-get update && apt-get install -y \ 93 | apt-transport-https \ 94 | ca-certificates \ 95 | curl \ 96 | gnupg-agent \ 97 | lsb-release \ 98 | software-properties-common && \ 99 | curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \ 100 | add-apt-repository \ 101 | "deb [arch=amd64] https://download.docker.com/linux/debian \ 102 | bullseye \ 103 | stable" && \ 104 | apt-get update && \ 105 | apt-get install -y docker-ce docker-ce-cli containerd.io 106 | 107 | # Install Terraform 108 | RUN apt-get update && apt-get install -y gnupg software-properties-common curl && \ 109 | curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - && \ 110 | apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" && \ 111 | apt-get update && apt-get install terraform 112 | 113 | # jq and xmlstarlet used to modify json and xml files 114 | RUN apt-get -y install jq 115 | RUN apt-get -y install xmlstarlet 116 | 117 | WORKDIR /workspace 118 | -------------------------------------------------------------------------------- /java/java21.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "version" 18 | command: ["java", "-version"] 19 | # java -version outputs to stderr... 20 | expectedError: ["(java|openjdk) version \"21.*\""] 21 | - name: "maven" 22 | command: ["mvn", "-version"] 23 | expectedOutput: ["Apache Maven 3.8.*"] 24 | - name: "gradle" 25 | command: ["gradle", "-version"] 26 | expectedOutput: ["Gradle 4.9"] 27 | - name: "gcloud" 28 | command: ["gcloud", "version"] 29 | expectedOutput: ["Google Cloud SDK"] 30 | - name: "AppEngine SDK" 31 | command: ["mvn", "dependency:get", "-Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65", "-o", "-DremoteRepositories=file:~/.m2"] 32 | expectedOutput: ["BUILD SUCCESS"] 33 | - name: "Google Play Services" 34 | command: ["mvn", "dependency:get", "-Dartifact=com.google.android.google-play-services:google-play-services:1", "-o", "-DremoteRepositories=file:~/.m2"] 35 | expectedOutput: ["BUILD SUCCESS"] 36 | - name: "xmllint tool" 37 | command: ["xmllint", "--version"] 38 | expectedError: ["using libxml version"] 39 | - name: "python" 40 | command: ["python", "--version"] 41 | expectedOutput: ["Python 3.9.13"] 42 | - name: "docker" 43 | command: ["docker", "--version"] 44 | expectedOutput: ["Docker version *"] 45 | -------------------------------------------------------------------------------- /java/java21/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM eclipse-temurin:21 16 | 17 | RUN apt-get update && \ 18 | apt-get -y upgrade && \ 19 | apt-get install wget && \ 20 | apt-get install unzip && \ 21 | apt -y install git && \ 22 | apt-get install -y --no-install-recommends libxml2-utils apt-transport-https ca-certificates gnupg zip unzip && \ 23 | rm -rf /var/cache/apt 24 | 25 | RUN wget -q https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.zip -O /tmp/maven.zip && \ 26 | unzip /tmp/maven.zip -d /tmp/maven && \ 27 | mv /tmp/maven/apache-maven-3.8.4 /usr/local/lib/maven && \ 28 | rm /tmp/maven.zip && \ 29 | ln -s $JAVA_HOME/lib $JAVA_HOME/conf 30 | 31 | RUN wget -q https://services.gradle.org/distributions/gradle-4.9-bin.zip -O /tmp/gradle.zip && \ 32 | mkdir -p /usr/local/lib/gradle && \ 33 | unzip -q /tmp/gradle.zip -d /usr/local/lib/gradle && \ 34 | rm /tmp/gradle.zip 35 | 36 | ENV PATH $PATH:/usr/local/lib/maven/bin:/usr/local/lib/gradle/gradle-4.9/bin 37 | 38 | # Install gcloud SDK 39 | RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ 40 | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && \ 41 | apt-get install google-cloud-sdk -y 42 | 43 | # Install google-play-services version 1 44 | RUN mkdir -p /tmp/playservices && \ 45 | wget -q https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/8.3.0/play-services-basement-8.3.0.aar -O /tmp/play-services-basement.aar && \ 46 | unzip -q /tmp/play-services-basement.aar -d /tmp/playservices && \ 47 | mvn install:install-file \ 48 | -Dfile=/tmp/playservices/classes.jar \ 49 | -DgroupId=com.google.android.google-play-services \ 50 | -DartifactId=google-play-services \ 51 | -Dversion=1 \ 52 | -Dpackaging=jar 53 | 54 | # Install the appengine SDK 55 | RUN mvn dependency:get -Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65 56 | 57 | # Adding the package path to local 58 | ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin 59 | 60 | # Install pyenv 61 | RUN apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ 62 | libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ 63 | xz-utils tk-dev libffi-dev liblzma-dev python3-openssl 64 | RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv 65 | 66 | ENV PATH /root/.pyenv/bin:$PATH 67 | ENV PATH /root/.pyenv/shims:$PATH 68 | 69 | RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> .bashrc && \ 70 | echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> .bashrc && \ 71 | echo 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc 72 | 73 | # Install python 74 | RUN pyenv install 3.9.13 && \ 75 | pyenv global 3.9.13 && \ 76 | python3 -m pip install --upgrade pip setuptools 77 | 78 | # Add Graphviz for Cloud Run samples 79 | RUN apt-get update -y && \ 80 | apt-get install -y graphviz && \ 81 | rm -rf /var/lib/apt/lists/* 82 | 83 | # Add imagemagick for Cloud Run samples 84 | RUN apt-get update -y && \ 85 | apt-get install -y imagemagick && \ 86 | rm -rf /var/lib/apt/lists/* 87 | 88 | # Install docker 89 | RUN apt-get update && apt-get install -y \ 90 | apt-transport-https \ 91 | ca-certificates \ 92 | curl \ 93 | gnupg-agent \ 94 | lsb-release \ 95 | software-properties-common && \ 96 | curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \ 97 | add-apt-repository \ 98 | "deb [arch=amd64] https://download.docker.com/linux/debian \ 99 | bullseye \ 100 | stable" && \ 101 | apt-get update && \ 102 | apt-get install -y docker-ce docker-ce-cli containerd.io 103 | 104 | # Install Terraform 105 | RUN apt-get update && apt-get install -y gnupg software-properties-common curl && \ 106 | curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - && \ 107 | apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" && \ 108 | apt-get update && apt-get install terraform 109 | 110 | # jq and xmlstarlet used to modify json and xml files 111 | RUN apt-get -y install jq 112 | RUN apt-get -y install xmlstarlet 113 | 114 | WORKDIR /workspace 115 | -------------------------------------------------------------------------------- /java/java8-airlock.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "version" 18 | command: ["java", "-version"] 19 | # java -version outputs to stderr... 20 | expectedError: ["(java|openjdk) version \"1.8.*\""] 21 | - name: "maven" 22 | command: ["mvn", "-version"] 23 | expectedOutput: ["Apache Maven 3.9.*"] 24 | - name: "gcloud" 25 | command: ["gcloud", "version"] 26 | expectedOutput: ["Google Cloud SDK"] 27 | - name: "xmllint tool" 28 | command: ["xmllint", "--version"] 29 | expectedError: ["using libxml version"] 30 | -------------------------------------------------------------------------------- /java/java8-airlock/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLCRG 2 | # 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # The file is copied by the previous step in Cloud Build yaml file 17 | # INCLUDE+ Dockerfile.ubuntu-bookworm.airlock 18 | 19 | # openjdk:8-jdk as of January 23th, 2025 20 | FROM us-docker.pkg.dev/artifact-foundry-prod/docker-3p-trusted/openjdk@sha256:3af2ac94130765b73fc8f1b42ffc04f77996ed8210c297fcfa28ca880ff0a217 as mybootstrap 21 | 22 | RUN apt-get update && \ 23 | apt-get install --no-install-recommends -y --allow-change-held-packages \ 24 | gnupg curl ca-certificates apt-utils && \ 25 | curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \ 26 | echo 'deb http://packages.cloud.google.com/apt apt-transport-artifact-registry-stable main' | tee -a /etc/apt/sources.list.d/artifact-registry.list 27 | 28 | RUN apt-get update && apt-get install apt-transport-artifact-registry 29 | 30 | # ca-certificates is required for https 31 | RUN apt-get update && \ 32 | apt-get install --no-install-recommends -y --allow-change-held-packages \ 33 | ca-certificates 34 | 35 | # Remove all other apt sources, silence errors if file doesn't exist 36 | RUN rm -f /etc/apt/sources.list.d/* /etc/apt/sources.list 37 | 38 | # If GOOGLE_APPLICATION_CREDENTIALS is passed in docker build command use it, if not leave it unset to support GCE Metadata in CI builds 39 | ARG GOOGLE_APPLICATION_CREDENTIALS 40 | 41 | # You can override the repository URL with: 42 | # --build-arg="APT_REPO=ar+https://us-apt.pkg.dev/remote/artifact-foundry-prod/debian-3p-remote-bullseye bullseye main" . 43 | # This is convinient when you want to pass a special Airlock repository 44 | # that initiates software package imports. 45 | ARG APT_REPO="ar+https://us-apt.pkg.dev/projects/artifact-foundry-prod standard-debian-bullseye-3p-l1 main" 46 | 47 | # The container image is "bullseye". So use matching configuration from: 48 | # go/airlock/howto_debian?DEBIAN_REPOSITORY=bullseye&APT_REPOSITORY=bullseye-3p-l1#apt-debian-standard-repositories 49 | RUN --mount=type=secret,id=credentials \ 50 | echo "deb ${APT_REPO}" | \ 51 | tee -a /etc/apt/sources.list.d/artifact-registry.list && \ 52 | apt-get update 53 | 54 | RUN --mount=type=secret,id=credentials \ 55 | apt install -y python3.9 python3-pip 56 | 57 | RUN python3 --version 58 | # Install python setuptools 59 | RUN python3 -m pip install setuptools 60 | 61 | # Everything after this is for your image, if you build FROM a base image with Airlock already configured 62 | RUN --mount=type=secret,id=credentials \ 63 | apt install -y --no-install-recommends libxml2-utils apt-transport-https ca-certificates gnupg zip unzip 64 | 65 | ENV MAVEN_HOME=/usr/share/maven 66 | # 3.9.9-eclipse-temurin-11-alpine 67 | COPY --from=us-docker.pkg.dev/artifact-foundry-prod/docker-3p-trusted/maven@sha256:d3f04985c6a68415e36c0a6468d0f8316f27d4dbee77bc459257ba444224bd9f ${MAVEN_HOME} ${MAVEN_HOME} 68 | 69 | ENV PATH $PATH:${MAVEN_HOME}/bin 70 | 71 | # jq and xmlstarlet used to modify json and xml files 72 | RUN --mount=type=secret,id=credentials \ 73 | apt-get -y install jq 74 | RUN --mount=type=secret,id=credentials \ 75 | apt-get -y install xmlstarlet 76 | 77 | # Installing JDK 11 to build projects that depend on graal-sdk 22.1.0 or higher 78 | # (requiring Java 11+). Still we target Java 8 for the compiled class files. 79 | RUN --mount=type=secret,id=credentials \ 80 | apt-get install -y openjdk-11-jdk 81 | # JDK 11 is used only when explicitly selected in the build file 82 | ENV JAVA8_HOME=/usr/local/openjdk-8 83 | ENV JAVA11_HOME=/usr/lib/jvm/java-11-openjdk-amd64 84 | 85 | # TODO(b/390675031) The following packages are still downloading outside Airlock 86 | 87 | # Install gcloud SDK 88 | RUN --mount=type=secret,id=credentials \ 89 | echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ 90 | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && \ 91 | apt install -y google-cloud-sdk 92 | 93 | # Adding the package path to local 94 | ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin 95 | 96 | WORKDIR /workspace 97 | -------------------------------------------------------------------------------- /java/java8.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "version" 18 | command: ["java", "-version"] 19 | # java -version outputs to stderr... 20 | expectedError: ["(java|openjdk) version \"1.8.*\""] 21 | - name: "maven" 22 | command: ["mvn", "-version"] 23 | expectedOutput: ["Apache Maven 3.9.*"] 24 | - name: "gcloud" 25 | command: ["gcloud", "version"] 26 | expectedOutput: ["Google Cloud SDK"] 27 | - name: "AppEngine SDK" 28 | command: ["mvn", "dependency:get", "-Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65", "-o", "-DremoteRepositories=file:~/.m2"] 29 | expectedOutput: ["BUILD SUCCESS"] 30 | - name: "Google Play Services" 31 | command: ["mvn", "dependency:get", "-Dartifact=com.google.android.google-play-services:google-play-services:1", "-o", "-DremoteRepositories=file:~/.m2"] 32 | expectedOutput: ["BUILD SUCCESS"] 33 | - name: "xmllint tool" 34 | command: ["xmllint", "--version"] 35 | expectedError: ["using libxml version"] 36 | - name: "python" 37 | command: ["python3", "--version"] 38 | expectedOutput: ["Python 3.9"] 39 | - name: "docker" 40 | command: ["docker", "--version"] 41 | expectedOutput: ["Docker version *"] 42 | -------------------------------------------------------------------------------- /java/java8/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # openjdk:8-jdk as of January 23th, 2025 16 | FROM us-docker.pkg.dev/artifact-foundry-prod/docker-3p-trusted/openjdk@sha256:3af2ac94130765b73fc8f1b42ffc04f77996ed8210c297fcfa28ca880ff0a217 17 | 18 | # TODO(suztomo): Update this to source them from Airlock 19 | RUN apt-get update && \ 20 | apt-get -y upgrade && \ 21 | apt-get install -y --no-install-recommends libxml2-utils apt-transport-https ca-certificates gnupg zip unzip && \ 22 | rm -rf /var/cache/apt 23 | 24 | ENV MAVEN_HOME=/usr/share/maven 25 | # 3.9.9-eclipse-temurin-11-alpine 26 | COPY --from=us-docker.pkg.dev/artifact-foundry-prod/docker-3p-trusted/maven@sha256:d3f04985c6a68415e36c0a6468d0f8316f27d4dbee77bc459257ba444224bd9f ${MAVEN_HOME} ${MAVEN_HOME} 27 | 28 | # TODO(suztomo): Do we use Gradle? 29 | RUN wget -q https://services.gradle.org/distributions/gradle-4.9-bin.zip -O /tmp/gradle.zip && \ 30 | mkdir -p /usr/local/lib/gradle && \ 31 | unzip -q /tmp/gradle.zip -d /usr/local/lib/gradle && \ 32 | rm /tmp/gradle.zip 33 | 34 | ENV PATH $PATH:${MAVEN_HOME}/bin:/usr/local/lib/gradle/gradle-4.9/bin 35 | 36 | # Install gcloud SDK 37 | RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ 38 | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && \ 39 | apt-get install google-cloud-sdk -y 40 | 41 | # Install google-play-services version 1 42 | RUN mkdir -p /tmp/playservices && \ 43 | wget -q https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/8.3.0/play-services-basement-8.3.0.aar -O /tmp/play-services-basement.aar && \ 44 | unzip -q /tmp/play-services-basement.aar -d /tmp/playservices && \ 45 | mvn -V install:install-file \ 46 | -Dfile=/tmp/playservices/classes.jar \ 47 | -DgroupId=com.google.android.google-play-services \ 48 | -DartifactId=google-play-services \ 49 | -Dversion=1 \ 50 | -Dpackaging=jar 51 | 52 | # Install the appengine SDK 53 | RUN mvn -V dependency:get -Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65 54 | 55 | # Adding the package path to local 56 | ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin 57 | 58 | # Install pyenv 59 | RUN apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ 60 | libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ 61 | xz-utils tk-dev libffi-dev liblzma-dev python3-openssl 62 | RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv 63 | 64 | ENV PATH /root/.pyenv/bin:$PATH 65 | ENV PATH /root/.pyenv/shims:$PATH 66 | 67 | RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> .bashrc && \ 68 | echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> .bashrc && \ 69 | echo 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc 70 | 71 | # Install python 72 | RUN pyenv install 3.9.13 && \ 73 | pyenv global 3.9.13 && \ 74 | python3 -m pip install --upgrade pip setuptools 75 | 76 | # Install docker 77 | RUN apt-get update && apt-get install -y \ 78 | apt-transport-https \ 79 | ca-certificates \ 80 | curl \ 81 | gnupg-agent \ 82 | lsb-release \ 83 | software-properties-common && \ 84 | curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \ 85 | add-apt-repository \ 86 | "deb [arch=amd64] https://download.docker.com/linux/debian \ 87 | $(lsb_release -cs) \ 88 | stable" && \ 89 | apt-get update && \ 90 | apt-get install -y docker-ce docker-ce-cli containerd.io 91 | 92 | # Install Terraform 93 | RUN apt-get update && apt-get install -y gnupg software-properties-common curl && \ 94 | curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - && \ 95 | apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" && \ 96 | apt-get update && apt-get install terraform 97 | 98 | # jq and xmlstarlet used to modify json and xml files 99 | RUN apt-get -y install jq 100 | RUN apt-get -y install xmlstarlet 101 | 102 | # Installing JDK 11 to build projects that depend on graal-sdk 22.1.0 or higher 103 | # (requiring Java 11+). Still we target Java 8 for the compiled class files. 104 | RUN apt-get install -y openjdk-11-jdk 105 | # JDK 11 is used only when explicitly selected in the build file 106 | ENV JAVA8_HOME=/usr/local/openjdk-8 107 | ENV JAVA11_HOME=/usr/lib/jvm/java-11-openjdk-amd64 108 | 109 | WORKDIR /workspace 110 | -------------------------------------------------------------------------------- /node/18-puppeteer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:18 2 | 3 | # Taken from 4 | # https://github.com/GoogleChrome/puppeteer/blob/main/docs/troubleshooting.md#running-puppeteer-in-docker 5 | 6 | # See https://crbug.com/795759 7 | RUN apt-get update && apt-get install -yq libgconf-2-4 8 | 9 | # Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others) 10 | # Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer 11 | # installs, work. 12 | RUN apt-get update && apt-get install -y wget --no-install-recommends \ 13 | && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ 14 | && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ 15 | && apt-get update \ 16 | && apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 libxtst6 \ 17 | --no-install-recommends \ 18 | && rm -rf /var/lib/apt/lists/* \ 19 | && rm -rf /src/*.deb 20 | 21 | # It's a good idea to use dumb-init to help prevent zombie chrome processes. 22 | ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 /usr/local/bin/dumb-init 23 | RUN chmod +x /usr/local/bin/dumb-init 24 | 25 | 26 | # Install pyenv dependencies 27 | RUN apt-get update && apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ 28 | libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ 29 | xz-utils tk-dev libffi-dev liblzma-dev python3-openssl 30 | 31 | # Run everything after as non-privileged user. 32 | USER node 33 | 34 | # Install pyenv 35 | RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv 36 | 37 | RUN echo 'export PATH="/home/node/.pyenv/bin:$PATH"' >> ~/.profile && \ 38 | echo 'export PATH="/home/node/.pyenv/shims:$PATH"' >> ~/.profile && \ 39 | echo 'eval "$(pyenv init -)"' >> ~/.profile && \ 40 | echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.profile 41 | 42 | ENV PATH="/home/node/.pyenv/bin:/home/node/.pyenv/shims:${PATH}" 43 | 44 | # Install python 45 | RUN pyenv install 3.10.13 && \ 46 | pyenv global 3.10.13 && \ 47 | python3 -m pip install --upgrade pip setuptools 48 | 49 | # Setup Cloud SDK 50 | WORKDIR /home/node 51 | ENV CLOUD_SDK_VERSION=438.0.0 \ 52 | CLOUDSDK_PYTHON=/usr/bin/python3 \ 53 | PATH=/home/node/google-cloud-sdk/bin:$PATH 54 | RUN set -ex; \ 55 | curl -LO https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz; \ 56 | tar xzf google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz; \ 57 | rm google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz 58 | RUN set -ex; \ 59 | ./google-cloud-sdk/install.sh; \ 60 | gcloud config set core/disable_usage_reporting true; \ 61 | gcloud config set component_manager/disable_update_check true; \ 62 | gcloud --quiet components update; \ 63 | gcloud --quiet components install beta 64 | 65 | 66 | ENTRYPOINT ["dumb-init", "--"] 67 | -------------------------------------------------------------------------------- /node/18-user/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM node:18-bookworm 16 | 17 | # Add Graphviz 18 | RUN set -ex; \ 19 | apt-get update -y; \ 20 | apt-get install -y \ 21 | graphviz \ 22 | apt-transport-https \ 23 | ca-certificates \ 24 | curl \ 25 | gnupg-agent \ 26 | lsb-release \ 27 | software-properties-common \ 28 | ; \ 29 | rm -rf /var/lib/apt/lists/* 30 | 31 | 32 | # Install docker 33 | RUN install -m 0755 -d /etc/apt/keyrings && \ 34 | curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc && \ 35 | chmod a+r /etc/apt/keyrings/docker.asc && \ 36 | echo \ 37 | "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ 38 | $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ 39 | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ 40 | apt-get update -y && \ 41 | apt-get install -y docker-ce docker-ce-cli containerd.io 42 | 43 | 44 | # Setup protoc 45 | RUN curl -L https://github.com/protocolbuffers/protobuf/releases/download/v3.10.1/protoc-3.10.1-linux-x86_64.zip > /tmp/protoc-3.10.1-linux-x86_64.zip && \ 46 | cd /usr/local && unzip /tmp/protoc-3.10.1-linux-x86_64.zip && rm -f /tmp/protoc-3.10.1-linux-x86_64.zip && \ 47 | chmod -R o+rX /usr/local/include/google /usr/local/bin/protoc 48 | 49 | 50 | # Install pyenv dependencies 51 | RUN apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ 52 | libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ 53 | xz-utils tk-dev libffi-dev liblzma-dev python3-openssl 54 | 55 | USER node 56 | 57 | # Setup npm and ensure anyone can read/write to the global, shared config 58 | ENV NPM_CONFIG_PREFIX=/home/node/.npm-global 59 | RUN mkdir -p $NPM_CONFIG_PREFIX && chmod 777 $NPM_CONFIG_PREFIX 60 | RUN npm config -g set update-notifier false 61 | RUN npm i -g npm@`npm --version` 62 | 63 | # Install pyenv 64 | RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \ 65 | echo 'export PATH="/home/node/.pyenv/bin:$PATH"' >> ~/.profile && \ 66 | echo 'export PATH="/home/node/.pyenv/shims:$PATH"' >> ~/.profile && \ 67 | echo 'eval "$(pyenv init -)"' >> ~/.profile && \ 68 | echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.profile 69 | 70 | ENV PATH="/home/node/.pyenv/bin:/home/node/.pyenv/shims:${PATH}" 71 | 72 | # Install python 73 | RUN pyenv install 3.12.10 && \ 74 | pyenv global 3.12.10 && \ 75 | python3 -m pip install --upgrade pip setuptools 76 | 77 | # Install gcp-uploader and gcp-releasetool and their dependencies. 78 | COPY requirements.txt requirements.txt 79 | RUN python3 -m pip install --require-hashes -r requirements.txt 80 | 81 | # Setup Cloud SDK 82 | WORKDIR /home/node 83 | ENV CLOUD_SDK_VERSION=520.0.0 \ 84 | CLOUDSDK_PYTHON=/home/node/.pyenv/shims/python3 \ 85 | PATH=/home/node/google-cloud-sdk/bin:$PATH 86 | RUN set -ex; \ 87 | curl -LO https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz; \ 88 | tar xzf google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz; \ 89 | rm google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz 90 | RUN set -ex; \ 91 | ./google-cloud-sdk/install.sh; \ 92 | gcloud config set core/disable_usage_reporting true; \ 93 | gcloud config set component_manager/disable_update_check true; \ 94 | gcloud --quiet components update; \ 95 | gcloud --quiet components install beta 96 | 97 | WORKDIR / 98 | -------------------------------------------------------------------------------- /node/README.md: -------------------------------------------------------------------------------- 1 | # nodejs-test 2 | > The docker images for running Node.js Kokoro builds for Cloud client libraries. 3 | 4 | Based on the [official](https://hub.docker.com/_/node/) Node.js community-maintained docker images. 5 | 6 | Defaults to start container as user `node` because running `node` as root causes [issues](http://syskall.com/dont-run-node-dot-js-as-root/). 7 | 8 | Also install `python3.7` and `pip3` to run Yoshi tools. 9 | 10 | ## Docker Registry 11 | This image is available at `gcr.io/cloud-devrel-kokoro-resources/node`. You can try it out by running: 12 | 13 | ```sh 14 | $ docker run --rm -it gcr.io/cloud-devrel-kokoro-resources/node:10-user 15 | ``` 16 | 17 | The images are tagged with the suffix `-user` to avoid confusion over images that runs as `root`. 18 | 19 | ## Questions 20 | Please reach out to `node-team@google.com` with any questions! 21 | -------------------------------------------------------------------------------- /node/cloudbuild-release.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | 18 | # Node 18 19 | - name: gcr.io/cloud-builders/docker 20 | args: ['build', '-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/release-images/node18', '.'] 21 | dir: 'node/18-user' 22 | waitFor: ['-'] 23 | # Node 18 puppeteer 24 | - name: gcr.io/cloud-builders/docker 25 | args: ['build', '-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/release-images/node18-puppeteer', '.'] 26 | dir: 'node/18-puppeteer' 27 | waitFor: ['-'] 28 | 29 | images: 30 | - us-central1-docker.pkg.dev/$PROJECT_ID/release-images/node18 31 | - us-central1-docker.pkg.dev/$PROJECT_ID/release-images/node18-puppeteer 32 | 33 | options: 34 | logging: CLOUD_LOGGING_ONLY 35 | -------------------------------------------------------------------------------- /node/cloudbuild-test.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2020 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | 18 | # Node 18 19 | - name: gcr.io/cloud-builders/docker 20 | args: ['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/node:18-user', '.'] 21 | dir: 'node/18-user' 22 | waitFor: ['-'] 23 | 24 | # Node 18 25 | - name: gcr.io/cloud-builders/docker 26 | args: ['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/node:18-user', '.'] 27 | dir: 'node/18-puppeteer' 28 | waitFor: ['-'] 29 | -------------------------------------------------------------------------------- /node/cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | 18 | # Node 18 19 | - name: gcr.io/cloud-builders/docker 20 | args: ['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/node:18-user', '-t', 'gcr.io/cloud-devrel-public-resources/node:18-user', '.'] 21 | dir: 'node/18-user' 22 | waitFor: ['-'] 23 | # Node 18 24 | - name: gcr.io/cloud-builders/docker 25 | args: ['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/node:18-puppeteer', '-t', 'gcr.io/cloud-devrel-public-resources/node:18-puppeteer', '.'] 26 | dir: 'node/18-puppeteer' 27 | waitFor: ['-'] 28 | 29 | images: 30 | - gcr.io/cloud-devrel-kokoro-resources/node 31 | - gcr.io/cloud-devrel-public-resources/node 32 | 33 | options: 34 | logging: CLOUD_LOGGING_ONLY 35 | -------------------------------------------------------------------------------- /node/requirements.in: -------------------------------------------------------------------------------- 1 | gcp-docuploader 2 | gcp-releasetool 3 | importlib-metadata 4 | typing-extensions -------------------------------------------------------------------------------- /php/README.md: -------------------------------------------------------------------------------- 1 | # php-test 2 | > The docker images for running PHP Kokoro builds for Cloud repositories. 3 | 4 | ## Docker Registry 5 | The images for individual versions of PHP are available at `gcr.io/cloud-devrel-kokoro-resources/php##`. 6 | You can try them out by running: 7 | 8 | ```sh 9 | $ docker run --rm -it gcr.io/cloud-devrel-kokoro-resources/php81 10 | $ docker run --rm -it gcr.io/cloud-devrel-kokoro-resources/php82 11 | $ docker run --rm -it gcr.io/cloud-devrel-kokoro-resources/php83 12 | ``` 13 | 14 | An image containing all [supported versions][php-version-support] of PHP is available 15 | at `gcr.io/cloud-devrel-kokoro-resources/php`. You can try it out by running" 16 | 17 | ```sh 18 | $ docker run --rm -it gcr.io/cloud-devrel-kokoro-resources/php 19 | ``` 20 | 21 | When using the image, switching between versions of PHP is done using [PHPBrew][phpbrew]: 22 | 23 | ```sh 24 | # Switch to PHP 8.0 25 | phpbrew switch $(phpbrew list | grep 8.0) 26 | ``` 27 | 28 | [php-version-support]: https://www.php.net/supported-versions.php 29 | [phpbrew]: https://github.com/phpbrew/phpbrew 30 | 31 | ## Questions 32 | Please reach out to `php-cloud@google.com` with any questions! 33 | 34 | 35 | ## Building Images 36 | 37 | You can build all of the test images by running: 38 | 39 | gcloud builds submit --config=cloudbuild.yaml . 40 | 41 | You can publish the images by running: 42 | 43 | gcloud builds submit --project=cloud-devrel-kokoro-resources --config=cloudbuild.yaml . 44 | -------------------------------------------------------------------------------- /php/cloudbuild-release.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # note: all local files are placed under /workspace and are required in path 16 | 17 | timeout: 21600s # 6 hours 18 | options: 19 | machineType: 'E2_HIGHCPU_8' 20 | logging: CLOUD_LOGGING_ONLY 21 | steps: 22 | 23 | # PHP 8.1 24 | - id: 'build-php81' 25 | name: gcr.io/cloud-builders/docker 26 | args: 27 | ['build', '-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/release-images/php81', '.'] 28 | dir: 'php/php81' 29 | waitFor: ['-'] 30 | 31 | - name: gcr.io/gcp-runtimes/structure_test 32 | args: 33 | ['-i', 'us-central1-docker.pkg.dev/$PROJECT_ID/release-images/php81', '--config', '/workspace/php/php81.yaml', '-v'] 34 | waitFor: ['build-php81'] 35 | 36 | 37 | # PHP release 38 | - id: 'build-release' 39 | name: gcr.io/cloud-builders/docker 40 | args: 41 | ['build', '-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/release-images/php-release', '.'] 42 | dir: 'php/release' 43 | waitFor: ['-'] 44 | - name: gcr.io/gcp-runtimes/structure_test 45 | args: 46 | ['-i', 'us-central1-docker.pkg.dev/$PROJECT_ID/release-images/php-release', '--config', '/workspace/php/release.yaml', '-v'] 47 | waitFor: ['build-release'] 48 | 49 | images: 50 | - us-central1-docker.pkg.dev/$PROJECT_ID/release-images/php81 51 | - us-central1-docker.pkg.dev/$PROJECT_ID/release-images/php-release 52 | -------------------------------------------------------------------------------- /php/cloudbuild-test.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2020 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # note: all local files are placed under /workspace and are required in path 16 | 17 | timeout: 28800s # 8 hours 18 | options: 19 | machineType: 'E2_HIGHCPU_8' 20 | steps: 21 | 22 | # PHP 8.1 23 | - id: 'build-php81' 24 | name: gcr.io/cloud-builders/docker 25 | args: 26 | ['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/php81', '-t', 'gcr.io/cloud-devrel-public-resources/php81', '.'] 27 | dir: 'php/php81' 28 | waitFor: ['-'] 29 | 30 | - name: gcr.io/gcp-runtimes/structure_test 31 | args: 32 | ['-i', 'gcr.io/cloud-devrel-kokoro-resources/php81', '--config', '/workspace/php/php81.yaml', '-v'] 33 | waitFor: ['build-php81'] 34 | 35 | # PHP 8.2 36 | - id: 'build-php82' 37 | name: gcr.io/cloud-builders/docker 38 | args: 39 | ['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/php82', '-t', 'gcr.io/cloud-devrel-public-resources/php82', '.'] 40 | dir: 'php/php82' 41 | waitFor: ['-'] 42 | 43 | - name: gcr.io/gcp-runtimes/structure_test 44 | args: 45 | ['-i', 'gcr.io/cloud-devrel-kokoro-resources/php82', '--config', '/workspace/php/php82.yaml', '-v'] 46 | waitFor: ['build-php82'] 47 | 48 | # PHP 8.0 49 | - id: 'build-php83' 50 | name: gcr.io/cloud-builders/docker 51 | args: 52 | ['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/php83', '-t', 'gcr.io/cloud-devrel-public-resources/php83', '.'] 53 | dir: 'php/php83' 54 | waitFor: ['-'] 55 | 56 | - name: gcr.io/gcp-runtimes/structure_test 57 | args: 58 | ['-i', 'gcr.io/cloud-devrel-kokoro-resources/php83', '--config', '/workspace/php/php83.yaml', '-v'] 59 | waitFor: ['build-php83'] 60 | 61 | # PHP release 62 | - id: 'build-php-release' 63 | name: gcr.io/cloud-builders/docker 64 | args: 65 | ['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/release', '-t', 'gcr.io/cloud-devrel-public-resources/release', '.'] 66 | dir: 'php/release' 67 | waitFor: ['-'] 68 | 69 | - name: gcr.io/gcp-runtimes/structure_test 70 | args: 71 | ['-i', 'gcr.io/cloud-devrel-kokoro-resources/release', '--config', '/workspace/php/release.yaml', '-v'] 72 | waitFor: ['build-php-release'] 73 | -------------------------------------------------------------------------------- /php/cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # note: all local files are placed under /workspace and are required in path 16 | 17 | timeout: 21600s # 6 hours 18 | options: 19 | machineType: 'E2_HIGHCPU_8' 20 | logging: CLOUD_LOGGING_ONLY 21 | steps: 22 | 23 | # PHP 8.1 24 | - id: 'build-php81' 25 | name: gcr.io/cloud-builders/docker 26 | args: 27 | ['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/php81', '-t', 'gcr.io/cloud-devrel-public-resources/php81', '.'] 28 | dir: 'php/php81' 29 | waitFor: ['-'] 30 | 31 | - name: gcr.io/gcp-runtimes/structure_test 32 | args: 33 | ['-i', 'gcr.io/cloud-devrel-kokoro-resources/php81', '--config', '/workspace/php/php81.yaml', '-v'] 34 | waitFor: ['build-php81'] 35 | 36 | # PHP 8.2 37 | - id: 'build-php82' 38 | name: gcr.io/cloud-builders/docker 39 | args: 40 | ['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/php82', '-t', 'gcr.io/cloud-devrel-public-resources/php82', '.'] 41 | dir: 'php/php82' 42 | waitFor: ['-'] 43 | 44 | - name: gcr.io/gcp-runtimes/structure_test 45 | args: 46 | ['-i', 'gcr.io/cloud-devrel-kokoro-resources/php82', '--config', '/workspace/php/php82.yaml', '-v'] 47 | waitFor: ['build-php82'] 48 | 49 | # PHP 8.0 50 | - id: 'build-php83' 51 | name: gcr.io/cloud-builders/docker 52 | args: 53 | ['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/php83', '-t', 'gcr.io/cloud-devrel-public-resources/php83', '.'] 54 | dir: 'php/php83' 55 | waitFor: ['-'] 56 | 57 | - name: gcr.io/gcp-runtimes/structure_test 58 | args: 59 | ['-i', 'gcr.io/cloud-devrel-kokoro-resources/php83', '--config', '/workspace/php/php83.yaml', '-v'] 60 | waitFor: ['build-php83'] 61 | 62 | images: 63 | - gcr.io/cloud-devrel-kokoro-resources/php81 64 | - gcr.io/cloud-devrel-public-resources/php81 65 | - gcr.io/cloud-devrel-kokoro-resources/php82 66 | - gcr.io/cloud-devrel-public-resources/php82 67 | - gcr.io/cloud-devrel-kokoro-resources/php83 68 | - gcr.io/cloud-devrel-public-resources/php83 69 | -------------------------------------------------------------------------------- /php/php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gcr.io/gcp-runtimes/ubuntu_20_0_4 2 | 3 | ENV PHPBREW_ROOT /root/.phpbrew 4 | ENV PHPBREW_HOME /root/.phpbrew 5 | ENV PHPBREW_SET_PROMPT 1 6 | 7 | # ENV DEBIAN_FRONTEND noninteractive 8 | RUN apt-get update \ 9 | && apt-get -qqy install git \ 10 | && apt-get -qqy install wget \ 11 | && apt-get -qqy install curl \ 12 | && apt-get -qqy install ant ant-contrib sqlite3 \ 13 | && apt-get -qqy install \ 14 | autoconf \ 15 | build-essential \ 16 | libbz2-dev \ 17 | libreadline-dev \ 18 | libsqlite3-dev \ 19 | libssl-dev \ 20 | libxml2-dev \ 21 | libxslt1-dev \ 22 | libonig-dev \ 23 | php7.2-cli \ 24 | php7.2-bz2 \ 25 | pkg-config \ 26 | libcurl4-gnutls-dev \ 27 | libzip-dev zip \ 28 | libmagickwand-dev \ 29 | php-imagick \ 30 | jq \ 31 | && apt-get clean -y \ 32 | && apt-get autoclean -y \ 33 | && apt-get autoremove -y \ 34 | && rm -rf /var/lib/{apt,dpkg,cache,log}/ \ 35 | && rm -rf /var/lib/apt/lists/* 36 | 37 | # Use a better shell 38 | RUN rm /bin/sh && ln -s /bin/bash /bin/sh 39 | 40 | # Install and initialize PHPBrew 41 | RUN mkdir -p /usr/bin/ \ 42 | && wget -q -O /usr/bin/phpbrew https://github.com/phpbrew/phpbrew/raw/master/phpbrew \ 43 | && chmod +x /usr/bin/phpbrew \ 44 | && phpbrew init \ 45 | && echo 'source $HOME/.phpbrew/bashrc' >> /root/.bashrc 46 | 47 | # Install PHP 8.0 48 | RUN phpbrew install "8.0" \ 49 | +default +bcmath +bz2 +calendar +cli +ctype +dom +fileinfo +filter +json \ 50 | +mbregex +mbstring +mhash +pcntl +pcre +pdo +phar +posix +readline +sockets \ 51 | +tokenizer +xml +curl +zip +openssl=yes +opcache +fpm +sqlite +mysql \ 52 | +default +intl +gettext 53 | 54 | # Install PHP 8.1 55 | RUN phpbrew install "8.1" \ 56 | +default +bcmath +bz2 +calendar +cli +ctype +dom +fileinfo +filter +json \ 57 | +mbregex +mbstring +mhash +pcntl +pcre +pdo +phar +posix +readline +sockets \ 58 | +tokenizer +xml +curl +zip +openssl=yes +opcache +fpm +sqlite +mysql \ 59 | +default +intl +gettext 60 | 61 | # Install PHP 8.2 62 | RUN phpbrew install "8.2" \ 63 | +default +bcmath +bz2 +calendar +cli +ctype +dom +fileinfo +filter +json \ 64 | +mbregex +mbstring +mhash +pcntl +pcre +pdo +phar +posix +readline +sockets \ 65 | +tokenizer +xml +curl +zip +openssl=yes +opcache +fpm +sqlite +mysql \ 66 | +default +intl +gettext 67 | 68 | # Install and enable Imagemagick extension for PHP 8.0, 8.1, and 8.2 69 | RUN source ~/.phpbrew/bashrc \ 70 | && phpbrew switch $(phpbrew list | grep 8.0) && phpbrew ext install imagick \ 71 | && phpbrew switch $(phpbrew list | grep 8.1) && phpbrew ext install imagick \ 72 | # On PHP 8.2, Imagemagick must be compiled from src because it is not yet 73 | # available via PECL 74 | && phpbrew switch $(phpbrew list | grep 8.2) \ 75 | && git clone https://github.com/Imagick/imagick /tmp/imagick \ 76 | && cd /tmp/imagick \ 77 | && phpize \ 78 | && ./configure \ 79 | && make \ 80 | && make install \ 81 | && phpbrew ext enable imagick 82 | 83 | # Install and enable gRPC/memcache/opcache extensions for PHP 8.0, 8.1, and 8.2 84 | RUN source ~/.phpbrew/bashrc \ 85 | && phpbrew each phpbrew ext install grpc \ 86 | && phpbrew each phpbrew ext install memcache \ 87 | && phpbrew each phpbrew ext enable opcache 88 | 89 | # Install composer 90 | RUN wget -q -O /usr/bin/composer https://getcomposer.org/composer.phar && chmod +x /usr/bin/composer 91 | 92 | # Install Google Cloud SDK 93 | RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz \ 94 | -o ${HOME}/google-cloud-sdk.tar.gz \ 95 | && tar xzf ${HOME}/google-cloud-sdk.tar.gz -C $HOME \ 96 | && ${HOME}/google-cloud-sdk/install.sh \ 97 | --usage-reporting false \ 98 | --path-update false \ 99 | --command-completion false \ 100 | && source ${HOME}/google-cloud-sdk/path.bash.inc 101 | 102 | # Install Cloud SQL proxy 103 | RUN wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O cloud_sql_proxy \ 104 | && chmod +x cloud_sql_proxy \ 105 | && mv cloud_sql_proxy /usr/local/bin 106 | 107 | # Make composer and gcloud bins available via the PATH variable 108 | ENV PATH="$PATH:/root/.config/composer/vendor/bin:/root/google-cloud-sdk/bin" 109 | 110 | # Configure Google Cloud SDK 111 | RUN gcloud config set app/promote_by_default false && \ 112 | gcloud config set disable_prompts true && \ 113 | gcloud -q components install app-engine-python && \ 114 | gcloud -q components update 115 | 116 | # Install php-cs-fixer 117 | RUN composer global require friendsofphp/php-cs-fixer 118 | -------------------------------------------------------------------------------- /php/php81.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "version" 18 | command: ["php", "-version"] 19 | expectedOutput: ["PHP 8.1"] 20 | - name: "required php extentions" 21 | command: ["php", "-m"] 22 | expectedOutput: ["grpc"] 23 | expectedOutput: ["sodium"] 24 | expectedOutput: ["pdo_sqlsrv"] 25 | - name: "composer" 26 | command: ["composer", "about"] 27 | expectedOutput: ["Composer - Dependency Manager for PHP - version"] 28 | - name: "gcloud" 29 | command: ["gcloud", "version"] 30 | expectedOutput: ["Google Cloud SDK"] 31 | -------------------------------------------------------------------------------- /php/php81/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gcr.io/gcp-runtimes/ubuntu_20_0_4 2 | ENV PHP_DIR=/opt/php81 3 | ENV PHP_SRC_DIR=/usr/local/src/php81-build 4 | ENV PATH=${PATH}:/usr/local/bin:${PHP_DIR}/bin 5 | ENV PHP_VERISON=8.1.18 6 | 7 | RUN apt-get update && \ 8 | apt-get -y install \ 9 | autoconf \ 10 | build-essential \ 11 | git-core \ 12 | jq \ 13 | libbz2-dev \ 14 | libcurl4-openssl-dev \ 15 | libc-client2007e \ 16 | libc-client2007e-dev \ 17 | libfcgi-dev \ 18 | libfcgi0ldbl \ 19 | libfreetype6-dev \ 20 | libicu-dev \ 21 | libjpeg-dev \ 22 | libkrb5-dev \ 23 | libmcrypt-dev \ 24 | libmagickwand-dev \ 25 | libpng-dev \ 26 | libpq-dev \ 27 | libsodium-dev \ 28 | libssl-dev \ 29 | libxml2-dev \ 30 | libxslt1-dev \ 31 | libzip-dev \ 32 | unixodbc-dev \ 33 | php-imagick \ 34 | python-ipaddress \ 35 | wget \ 36 | zip \ 37 | zlib1g-dev \ 38 | pkg-config \ 39 | sqlite3 \ 40 | libsqlite3-dev \ 41 | libonig-dev 42 | 43 | # Remove old version of PHP 44 | RUN apt purge -y php7.4-common 45 | 46 | RUN ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a && \ 47 | mkdir -p ${PHP_DIR} ${PHP_SRC_DIR} ${PHP_DIR}/lib/conf.d && \ 48 | cd ${PHP_SRC_DIR} && \ 49 | wget http://us1.php.net/get/php-$PHP_VERISON.tar.bz2/from/this/mirror \ 50 | -O php-$PHP_VERISON.tar.bz2 && \ 51 | tar jxf php-$PHP_VERISON.tar.bz2 && \ 52 | cd php-$PHP_VERISON && \ 53 | ./configure \ 54 | --prefix=${PHP_DIR} \ 55 | --with-config-file-scan-dir=${PHP_DIR}/lib/conf.d \ 56 | --with-pdo-pgsql \ 57 | --with-zlib-dir \ 58 | --enable-mbstring \ 59 | --enable-soap \ 60 | --enable-intl \ 61 | --enable-calendar \ 62 | --with-curl \ 63 | --with-zlib \ 64 | --with-pgsql \ 65 | --disable-rpath \ 66 | --with-bz2 \ 67 | --with-zlib \ 68 | --enable-sockets \ 69 | --enable-sysvsem \ 70 | --enable-sysvshm \ 71 | --enable-sysvmsg \ 72 | --enable-pcntl \ 73 | --enable-mbregex \ 74 | --enable-exif \ 75 | --enable-bcmath \ 76 | --with-mhash \ 77 | --with-pdo-mysql \ 78 | --with-sodium=shared \ 79 | --with-mysqli \ 80 | --with-openssl \ 81 | --with-fpm-user=www-data \ 82 | --with-fpm-group=www-data \ 83 | --with-libdir=/lib/x86_64-linux-gnu \ 84 | --enable-ftp \ 85 | --with-imap \ 86 | --with-imap-ssl \ 87 | --with-gettext \ 88 | --with-xsl \ 89 | --with-zip \ 90 | --with-kerberos \ 91 | --enable-fpm \ 92 | --with-pear && \ 93 | make && \ 94 | make install && \ 95 | pecl install grpc pdo_sqlsrv && \ 96 | cp php.ini-production ${PHP_DIR}/lib/php.ini && \ 97 | echo 'zend_extension=opcache.so' >> ${PHP_DIR}/lib/php.ini && \ 98 | echo 'extension=sodium' >> ${PHP_DIR}/lib/php.ini && \ 99 | echo 'extension=grpc.so' >> ${PHP_DIR}/lib/conf.d/ext-grpc.ini && \ 100 | git clone https://github.com/Imagick/imagick /tmp/imagick && cd /tmp/imagick && phpize && ./configure && make && make install && cd - && \ 101 | echo 'extension=imagick.so' >> ${PHP_DIR}/lib/conf.d/ext-imagick.ini && \ 102 | echo 'extension=pdo_sqlsrv.so' >> ${PHP_DIR}/lib/conf.d/ext-pdo_sqlsrv.ini && \ 103 | php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ 104 | php -r "if (hash_file('SHA384', 'composer-setup.php') === rtrim(file_get_contents('https://composer.github.io/installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ 105 | php composer-setup.php --filename=composer --install-dir=/usr/local/bin 106 | 107 | # Install phpunit globally 108 | RUN composer global require phpunit/phpunit:^8.0 109 | 110 | # Install Google Cloud SDK 111 | RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz \ 112 | -o ${HOME}/google-cloud-sdk.tar.gz \ 113 | && tar xzf ${HOME}/google-cloud-sdk.tar.gz -C $HOME \ 114 | && ${HOME}/google-cloud-sdk/install.sh \ 115 | --usage-reporting false \ 116 | --path-update false \ 117 | --command-completion false 118 | 119 | # Install Cloud SQL proxy 120 | RUN wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O cloud_sql_proxy \ 121 | && chmod +x cloud_sql_proxy \ 122 | && mv cloud_sql_proxy /usr/local/bin 123 | 124 | # Make composer and gcloud bins available via the PATH variable 125 | ENV PATH="$PATH:/root/.config/composer/vendor/bin:/root/google-cloud-sdk/bin" 126 | 127 | # Configure Google Cloud SDK 128 | RUN gcloud config set app/promote_by_default false && \ 129 | gcloud config set disable_prompts true && \ 130 | gcloud -q components install app-engine-python && \ 131 | gcloud -q components update 132 | 133 | # Build php-cs-fixer 134 | RUN composer global require friendsofphp/php-cs-fixer 135 | 136 | # Install Python3 137 | RUN wget https://www.python.org/ftp/python/3.9.14/Python-3.9.14.tgz \ 138 | && tar -xvf Python-3.9.14.tgz \ 139 | && ./Python-3.9.14/configure --enable-optimizations \ 140 | && make altinstall 141 | 142 | # Install pip 143 | RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ 144 | && python3.9 /tmp/get-pip.py \ 145 | && rm /tmp/get-pip.py \ 146 | && python3.9 -m pip 147 | -------------------------------------------------------------------------------- /php/php82.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "version" 18 | command: ["php", "-version"] 19 | expectedOutput: ["PHP 8.2"] 20 | - name: "required php extentions" 21 | command: ["php", "-m"] 22 | expectedOutput: ["grpc"] 23 | expectedOutput: ["pdo_sqlsrv"] 24 | - name: "composer" 25 | command: ["composer", "about"] 26 | expectedOutput: ["Composer - Dependency Manager for PHP - version"] 27 | - name: "gcloud" 28 | command: ["gcloud", "version"] 29 | expectedOutput: ["Google Cloud SDK"] 30 | -------------------------------------------------------------------------------- /php/php82/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gcr.io/gcp-runtimes/ubuntu_20_0_4 2 | ENV PHP_DIR=/opt/php82 3 | ENV PHP_SRC_DIR=/usr/local/src/php82-build 4 | ENV PATH=${PATH}:/usr/local/bin:${PHP_DIR}/bin 5 | ENV PHP_VERISON=8.2.6 6 | 7 | RUN apt-get update && \ 8 | apt-get -y install \ 9 | autoconf \ 10 | build-essential \ 11 | git-core \ 12 | jq \ 13 | libbz2-dev \ 14 | libcurl4-openssl-dev \ 15 | libc-client2007e \ 16 | libc-client2007e-dev \ 17 | libfcgi-dev \ 18 | libfcgi0ldbl \ 19 | libfreetype6-dev \ 20 | libicu-dev \ 21 | libjpeg-dev \ 22 | libkrb5-dev \ 23 | libmcrypt-dev \ 24 | libmagickwand-dev \ 25 | libpng-dev \ 26 | libpq-dev \ 27 | libssl-dev \ 28 | libxml2-dev \ 29 | libxslt1-dev \ 30 | libzip-dev \ 31 | unixodbc-dev \ 32 | php-imagick \ 33 | python-ipaddress \ 34 | wget \ 35 | zip \ 36 | zlib1g-dev \ 37 | pkg-config \ 38 | sqlite3 \ 39 | libsqlite3-dev \ 40 | libonig-dev 41 | 42 | # Remove old version of PHP 43 | RUN apt purge -y php7.4-common 44 | 45 | RUN ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a && \ 46 | mkdir -p ${PHP_DIR} ${PHP_SRC_DIR} ${PHP_DIR}/lib/conf.d && \ 47 | cd ${PHP_SRC_DIR} && \ 48 | wget http://us1.php.net/get/php-$PHP_VERISON.tar.bz2/from/this/mirror \ 49 | -O php-$PHP_VERISON.tar.bz2 && \ 50 | tar jxf php-$PHP_VERISON.tar.bz2 && \ 51 | cd php-$PHP_VERISON && \ 52 | ./configure \ 53 | --prefix=${PHP_DIR} \ 54 | --with-config-file-scan-dir=${PHP_DIR}/lib/conf.d \ 55 | --with-pdo-pgsql \ 56 | --with-zlib-dir \ 57 | --enable-mbstring \ 58 | --enable-soap \ 59 | --enable-intl \ 60 | --enable-calendar \ 61 | --with-curl \ 62 | --with-zlib \ 63 | --with-pgsql \ 64 | --disable-rpath \ 65 | --enable-inline-optimization \ 66 | --with-bz2 \ 67 | --with-zlib \ 68 | --enable-sockets \ 69 | --enable-sysvsem \ 70 | --enable-sysvshm \ 71 | --enable-sysvmsg \ 72 | --enable-pcntl \ 73 | --enable-mbregex \ 74 | --enable-exif \ 75 | --enable-bcmath \ 76 | --with-mhash \ 77 | --with-pdo-mysql \ 78 | --with-mysqli \ 79 | --with-openssl \ 80 | --with-fpm-user=www-data \ 81 | --with-fpm-group=www-data \ 82 | --with-libdir=/lib/x86_64-linux-gnu \ 83 | --enable-ftp \ 84 | --with-imap \ 85 | --with-imap-ssl \ 86 | --with-gettext \ 87 | --with-xmlrpc \ 88 | --with-xsl \ 89 | --with-zip \ 90 | --with-kerberos \ 91 | --enable-fpm \ 92 | --with-pear && \ 93 | make && \ 94 | make install && \ 95 | pecl install grpc pdo_sqlsrv && \ 96 | cp php.ini-production ${PHP_DIR}/lib/php.ini && \ 97 | echo 'zend_extension=opcache.so' >> ${PHP_DIR}/lib/php.ini && \ 98 | echo 'extension=grpc.so' >> ${PHP_DIR}/lib/conf.d/ext-grpc.ini && \ 99 | git clone https://github.com/Imagick/imagick /tmp/imagick && cd /tmp/imagick && phpize && ./configure && make && make install && cd - && \ 100 | echo 'extension=imagick.so' >> ${PHP_DIR}/lib/conf.d/ext-imagick.ini && \ 101 | echo 'extension=pdo_sqlsrv.so' >> ${PHP_DIR}/lib/conf.d/ext-pdo_sqlsrv.ini && \ 102 | php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ 103 | php -r "if (hash_file('SHA384', 'composer-setup.php') === rtrim(file_get_contents('https://composer.github.io/installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ 104 | php composer-setup.php --filename=composer --install-dir=/usr/local/bin 105 | 106 | # Install phpunit globally 107 | RUN composer global require phpunit/phpunit:^8.0 108 | 109 | # Install Google Cloud SDK 110 | RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz \ 111 | -o ${HOME}/google-cloud-sdk.tar.gz \ 112 | && tar xzf ${HOME}/google-cloud-sdk.tar.gz -C $HOME \ 113 | && ${HOME}/google-cloud-sdk/install.sh \ 114 | --usage-reporting false \ 115 | --path-update false \ 116 | --command-completion false 117 | 118 | # Install Cloud SQL proxy 119 | RUN wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O cloud_sql_proxy \ 120 | && chmod +x cloud_sql_proxy \ 121 | && mv cloud_sql_proxy /usr/local/bin 122 | 123 | # Make composer and gcloud bins available via the PATH variable 124 | ENV PATH="$PATH:/root/.config/composer/vendor/bin:/root/google-cloud-sdk/bin" 125 | 126 | # Configure Google Cloud SDK 127 | RUN gcloud config set app/promote_by_default false && \ 128 | gcloud config set disable_prompts true && \ 129 | gcloud -q components install app-engine-python && \ 130 | gcloud -q components update 131 | 132 | # Build php-cs-fixer 133 | RUN composer global require friendsofphp/php-cs-fixer 134 | -------------------------------------------------------------------------------- /php/php83.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "version" 18 | command: ["php", "-version"] 19 | expectedOutput: ["PHP 8.3"] 20 | - name: "required php extentions" 21 | command: ["php", "-m"] 22 | expectedOutput: ["grpc"] 23 | expectedOutput: ["pdo_sqlsrv"] 24 | - name: "composer" 25 | command: ["composer", "about"] 26 | expectedOutput: ["Composer - Dependency Manager for PHP - version"] 27 | - name: "gcloud" 28 | command: ["gcloud", "version"] 29 | expectedOutput: ["Google Cloud SDK"] 30 | -------------------------------------------------------------------------------- /php/php83/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gcr.io/gcp-runtimes/ubuntu_20_0_4 2 | ENV PHP_DIR=/opt/php83 3 | ENV PHP_SRC_DIR=/usr/local/src/php83-build 4 | ENV PATH=${PATH}:/usr/local/bin:${PHP_DIR}/bin 5 | ENV PHP_VERISON=8.3.7 6 | 7 | RUN apt-get update && \ 8 | apt-get -y install \ 9 | autoconf \ 10 | build-essential \ 11 | git-core \ 12 | jq \ 13 | libbz2-dev \ 14 | libcurl4-openssl-dev \ 15 | libc-client2007e \ 16 | libc-client2007e-dev \ 17 | libfcgi-dev \ 18 | libfcgi0ldbl \ 19 | libfreetype6-dev \ 20 | libicu-dev \ 21 | libjpeg-dev \ 22 | libkrb5-dev \ 23 | libmcrypt-dev \ 24 | libmagickwand-dev \ 25 | libpng-dev \ 26 | libpq-dev \ 27 | libssl-dev \ 28 | libxml2-dev \ 29 | libxslt1-dev \ 30 | libzip-dev \ 31 | unixodbc-dev \ 32 | php-imagick \ 33 | python-ipaddress \ 34 | wget \ 35 | zip \ 36 | zlib1g-dev \ 37 | pkg-config \ 38 | sqlite3 \ 39 | libsqlite3-dev \ 40 | libonig-dev 41 | 42 | # Remove old version of PHP 43 | RUN apt purge -y php7.4-common 44 | 45 | RUN ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a && \ 46 | mkdir -p ${PHP_DIR} ${PHP_SRC_DIR} ${PHP_DIR}/lib/conf.d && \ 47 | cd ${PHP_SRC_DIR} && \ 48 | wget http://us1.php.net/get/php-$PHP_VERISON.tar.bz2/from/this/mirror \ 49 | -O php-$PHP_VERISON.tar.bz2 && \ 50 | tar jxf php-$PHP_VERISON.tar.bz2 && \ 51 | cd php-$PHP_VERISON && \ 52 | ./configure \ 53 | --prefix=${PHP_DIR} \ 54 | --with-config-file-scan-dir=${PHP_DIR}/lib/conf.d \ 55 | --with-pdo-pgsql \ 56 | --with-zlib-dir \ 57 | --enable-mbstring \ 58 | --enable-soap \ 59 | --enable-intl \ 60 | --enable-calendar \ 61 | --with-curl \ 62 | --with-zlib \ 63 | --with-pgsql \ 64 | --disable-rpath \ 65 | --enable-inline-optimization \ 66 | --with-bz2 \ 67 | --with-zlib \ 68 | --enable-sockets \ 69 | --enable-sysvsem \ 70 | --enable-sysvshm \ 71 | --enable-sysvmsg \ 72 | --enable-pcntl \ 73 | --enable-mbregex \ 74 | --enable-exif \ 75 | --enable-bcmath \ 76 | --with-mhash \ 77 | --with-pdo-mysql \ 78 | --with-mysqli \ 79 | --with-openssl \ 80 | --with-fpm-user=www-data \ 81 | --with-fpm-group=www-data \ 82 | --with-libdir=/lib/x86_64-linux-gnu \ 83 | --enable-ftp \ 84 | --with-imap \ 85 | --with-imap-ssl \ 86 | --with-gettext \ 87 | --with-xmlrpc \ 88 | --with-xsl \ 89 | --with-zip \ 90 | --with-kerberos \ 91 | --enable-fpm \ 92 | --with-pear && \ 93 | make && \ 94 | make install && \ 95 | pecl install grpc pdo_sqlsrv-5.11.1 && \ 96 | cp php.ini-production ${PHP_DIR}/lib/php.ini && \ 97 | echo 'zend_extension=opcache.so' >> ${PHP_DIR}/lib/php.ini && \ 98 | echo 'extension=grpc.so' >> ${PHP_DIR}/lib/conf.d/ext-grpc.ini && \ 99 | git clone https://github.com/Imagick/imagick /tmp/imagick && cd /tmp/imagick && phpize && ./configure && make && make install && cd - && \ 100 | echo 'extension=imagick.so' >> ${PHP_DIR}/lib/conf.d/ext-imagick.ini && \ 101 | echo 'extension=pdo_sqlsrv.so' >> ${PHP_DIR}/lib/conf.d/ext-pdo_sqlsrv.ini && \ 102 | php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ 103 | php -r "if (hash_file('SHA384', 'composer-setup.php') === rtrim(file_get_contents('https://composer.github.io/installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ 104 | php composer-setup.php --filename=composer --install-dir=/usr/local/bin 105 | 106 | # Install phpunit globally 107 | RUN composer global require phpunit/phpunit:^8.0 108 | 109 | # Install Google Cloud SDK 110 | RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz \ 111 | -o ${HOME}/google-cloud-sdk.tar.gz \ 112 | && tar xzf ${HOME}/google-cloud-sdk.tar.gz -C $HOME \ 113 | && ${HOME}/google-cloud-sdk/install.sh \ 114 | --usage-reporting false \ 115 | --path-update false \ 116 | --command-completion false 117 | 118 | # Install Cloud SQL proxy 119 | RUN wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O cloud_sql_proxy \ 120 | && chmod +x cloud_sql_proxy \ 121 | && mv cloud_sql_proxy /usr/local/bin 122 | 123 | # Make composer and gcloud bins available via the PATH variable 124 | ENV PATH="$PATH:/root/.config/composer/vendor/bin:/root/google-cloud-sdk/bin" 125 | 126 | # Configure Google Cloud SDK 127 | RUN gcloud config set app/promote_by_default false && \ 128 | gcloud config set disable_prompts true && \ 129 | gcloud -q components install app-engine-python && \ 130 | gcloud -q components update 131 | 132 | # Build php-cs-fixer 133 | RUN composer global require friendsofphp/php-cs-fixer 134 | -------------------------------------------------------------------------------- /php/release.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "version" 18 | command: ["php", "-version"] 19 | expectedOutput: ["PHP 8.4"] 20 | - name: "required php extentions" 21 | command: ["php", "-m"] 22 | expectedOutput: ["grpc"] 23 | expectedOutput: ["sodium"] 24 | expectedOutput: ["pdo_sqlsrv"] 25 | - name: "composer" 26 | command: ["composer", "about"] 27 | expectedOutput: ["Composer - Dependency Manager for PHP - version"] 28 | - name: "gcloud" 29 | command: ["gcloud", "version"] 30 | expectedOutput: ["Google Cloud SDK"] 31 | - name: "jq" 32 | command: ["jq", "--version"] 33 | expectedOutput: ["jq-"] 34 | - name: "uuidgen" 35 | command: ["uuidgen", "--version"] 36 | expectedOutput: ["uuidgen"] 37 | - name: "git" 38 | command: ["git", "--version"] 39 | expectedOutput: ["git version"] 40 | - name: "zip" 41 | command: ["zip", "--version"] 42 | expectedOutput: ["This is Zip"] 43 | - name: "splitsh-lite" 44 | command: ["splitsh-lite", "--version"] 45 | # splitsh reports version to stderr 46 | expectedError: ["splitsh-lite version"] 47 | -------------------------------------------------------------------------------- /php/release/Dockerfile: -------------------------------------------------------------------------------- 1 | # Create a git-base image with the base libgit2-dev dependency 2 | # and git 3 | FROM marketplace.gcr.io/google/debian12:latest AS git-base 4 | RUN apt-get update && \ 5 | apt-get -y install \ 6 | build-essential \ 7 | git \ 8 | libgit2-dev 9 | 10 | # build the splitsh go binary (install golang) 11 | FROM git-base AS splitsh 12 | RUN mkdir /workspace 13 | WORKDIR /workspace 14 | 15 | # install golang 16 | ENV GO_VERSION=1.19.13 17 | ADD "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" /workspace/ 18 | RUN tar -zxf "go${GO_VERSION}.linux-amd64.tar.gz" 19 | ENV PATH="${PATH}:/workspace/go/bin/" \ 20 | GOROOT=/workspace/go 21 | 22 | RUN apt-get install -y pkg-config 23 | 24 | # compile splitsh go binary 25 | RUN git clone --depth 1 --branch v2.0.0 https://github.com/splitsh/lite.git /workspace/lite && \ 26 | cd /workspace/lite && \ 27 | go build -o /workspace/splitsh-lite github.com/splitsh/lite 28 | 29 | # build the php-release image 30 | FROM git-base 31 | ENV PHP_DIR=/opt/php84 32 | ENV PHP_SRC_DIR=/usr/local/src/php84-build 33 | ENV PATH=${PATH}:/usr/local/bin:${PHP_DIR}/bin 34 | ENV PHP_VERISON=8.4.3 35 | 36 | RUN apt-get update && \ 37 | apt-get -y install \ 38 | autoconf \ 39 | build-essential \ 40 | curl \ 41 | git-core \ 42 | jq \ 43 | libbz2-dev \ 44 | libcurl4-openssl-dev \ 45 | libc-client2007e \ 46 | libc-client2007e-dev \ 47 | libfcgi-dev \ 48 | libfcgi0ldbl \ 49 | libfreetype6-dev \ 50 | libicu-dev \ 51 | libjpeg-dev \ 52 | libkrb5-dev \ 53 | libmcrypt-dev \ 54 | libmagickwand-dev \ 55 | libpng-dev \ 56 | libpq-dev \ 57 | libsodium-dev \ 58 | libssl-dev \ 59 | libxml2-dev \ 60 | libxslt1-dev \ 61 | libzip-dev \ 62 | unixodbc-dev \ 63 | php-imagick \ 64 | wget \ 65 | zip \ 66 | zlib1g-dev \ 67 | pkg-config \ 68 | sqlite3 \ 69 | libsqlite3-dev \ 70 | libonig-dev \ 71 | uuid-runtime 72 | 73 | # Remove old version of PHP 74 | RUN apt purge -y php-common 75 | 76 | RUN ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a && \ 77 | mkdir -p ${PHP_DIR} ${PHP_SRC_DIR} ${PHP_DIR}/lib/conf.d && \ 78 | cd ${PHP_SRC_DIR} && \ 79 | wget http://us1.php.net/get/php-$PHP_VERISON.tar.bz2/from/this/mirror \ 80 | -O php-$PHP_VERISON.tar.bz2 && \ 81 | tar jxf php-$PHP_VERISON.tar.bz2 && \ 82 | cd php-$PHP_VERISON && \ 83 | ./configure \ 84 | --prefix=${PHP_DIR} \ 85 | --with-config-file-scan-dir=${PHP_DIR}/lib/conf.d \ 86 | --with-pdo-pgsql \ 87 | --with-zlib-dir \ 88 | --enable-mbstring \ 89 | --enable-soap \ 90 | --enable-intl \ 91 | --enable-calendar \ 92 | --with-curl \ 93 | --with-zlib \ 94 | --with-pgsql \ 95 | --disable-rpath \ 96 | --with-bz2 \ 97 | --with-zlib \ 98 | --enable-sockets \ 99 | --enable-sysvsem \ 100 | --enable-sysvshm \ 101 | --enable-sysvmsg \ 102 | --enable-pcntl \ 103 | --enable-mbregex \ 104 | --enable-exif \ 105 | --enable-bcmath \ 106 | --enable-dom \ 107 | --with-mhash \ 108 | --with-pdo-mysql \ 109 | --with-sodium=shared \ 110 | --with-mysqli \ 111 | --with-openssl \ 112 | --with-fpm-user=www-data \ 113 | --with-fpm-group=www-data \ 114 | --with-libdir=/lib/x86_64-linux-gnu \ 115 | --enable-ftp \ 116 | --with-imap \ 117 | --with-imap-ssl \ 118 | --with-gettext \ 119 | --with-xsl \ 120 | --with-zip \ 121 | --with-kerberos \ 122 | --enable-fpm \ 123 | --with-pear && \ 124 | make && \ 125 | make install && \ 126 | pecl install grpc pdo_sqlsrv && \ 127 | cp php.ini-production ${PHP_DIR}/lib/php.ini && \ 128 | echo 'zend_extension=opcache.so' >> ${PHP_DIR}/lib/php.ini && \ 129 | echo 'extension=sodium' >> ${PHP_DIR}/lib/php.ini && \ 130 | echo 'extension=grpc.so' >> ${PHP_DIR}/lib/conf.d/ext-grpc.ini && \ 131 | git clone https://github.com/Imagick/imagick /tmp/imagick && cd /tmp/imagick && phpize && ./configure && make && make install && cd - && \ 132 | echo 'extension=imagick.so' >> ${PHP_DIR}/lib/conf.d/ext-imagick.ini && \ 133 | echo 'extension=pdo_sqlsrv.so' >> ${PHP_DIR}/lib/conf.d/ext-pdo_sqlsrv.ini && \ 134 | php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ 135 | php -r "if (hash_file('SHA384', 'composer-setup.php') === rtrim(file_get_contents('https://composer.github.io/installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ 136 | php composer-setup.php --filename=composer --install-dir=/usr/local/bin 137 | 138 | # Install Google Cloud SDK 139 | RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz \ 140 | -o ${HOME}/google-cloud-sdk.tar.gz \ 141 | && tar xzf ${HOME}/google-cloud-sdk.tar.gz -C $HOME \ 142 | && ${HOME}/google-cloud-sdk/install.sh \ 143 | --usage-reporting false \ 144 | --path-update false \ 145 | --command-completion false 146 | 147 | # Make composer and gcloud bins available via the PATH variable 148 | ENV PATH="$PATH:/root/.config/composer/vendor/bin:/root/google-cloud-sdk/bin" 149 | 150 | # Configure Google Cloud SDK 151 | RUN gcloud config set app/promote_by_default false && \ 152 | gcloud config set disable_prompts true && \ 153 | gcloud -q components install app-engine-python && \ 154 | gcloud -q components update 155 | 156 | # Install phpunit and php-cs-fixer globally 157 | RUN composer global require \ 158 | phpunit/phpunit:^8.0 \ 159 | friendsofphp/php-cs-fixer 160 | 161 | # Install Python3 162 | RUN wget https://www.python.org/ftp/python/3.9.14/Python-3.9.14.tgz \ 163 | && tar -xvf Python-3.9.14.tgz \ 164 | && ./Python-3.9.14/configure --enable-optimizations \ 165 | && make altinstall 166 | 167 | # Install pip 168 | RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ 169 | && python3.9 /tmp/get-pip.py \ 170 | && rm /tmp/get-pip.py \ 171 | && python3.9 -m pip 172 | 173 | # add the splitsh-lite command 174 | COPY --from=splitsh /workspace/splitsh-lite /bin/splitsh-lite 175 | -------------------------------------------------------------------------------- /python/cloud-devrel-kokoro-resources/google-cloud-python/autosynth/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM gcr.io/cloud-devrel-kokoro-resources/google-cloud-ruby/autosynth:latest 16 | 17 | ENTRYPOINT /bin/bash 18 | 19 | # Install python 3.7 20 | RUN pyenv install 3.7.2 21 | RUN pyenv global 3.7.2 22 | 23 | COPY requirements.txt /requirements.txt 24 | RUN python -m pip install --require-hashes --no-cache-dir --no-deps -r /requirements.txt 25 | 26 | RUN pyenv rehash 27 | -------------------------------------------------------------------------------- /python/cloud-devrel-kokoro-resources/google-cloud-python/autosynth/makefile: -------------------------------------------------------------------------------- 1 | IMAGENAME=google-cloud-python/autosynth 2 | TAG=latest 3 | 4 | .PHONY: build 5 | build: 6 | docker build -t gcr.io/cloud-devrel-kokoro-resources/${IMAGENAME}:${TAG} . 7 | #docker tag gcr.io/cloud-devrel-kokoro-resources/${IMAGENAME}:${TAG} gcr.io/cloud-devrel-public-resources/${IMAGENAME}:${TAG} 8 | .PHONY: publish 9 | publish: build 10 | gcloud docker -- push gcr.io/cloud-devrel-kokoro-resources/${IMAGENAME}:${TAG} 11 | #gcloud docker -- push gcr.io/cloud-devrel-public-resources/${IMAGENAME}:${TAG} 12 | -------------------------------------------------------------------------------- /python/cloud-devrel-kokoro-resources/google-cloud-python/autosynth/requirements.in: -------------------------------------------------------------------------------- 1 | nox -------------------------------------------------------------------------------- /python/cloud-devrel-kokoro-resources/google-cloud-python/autosynth/requirements.txt: -------------------------------------------------------------------------------- 1 | # 2 | # This file is autogenerated by pip-compile with Python 3.10 3 | # by the following command: 4 | # 5 | # pip-compile --allow-unsafe --generate-hashes requirements.in 6 | # 7 | argcomplete==3.1.1 \ 8 | --hash=sha256:35fa893a88deea85ea7b20d241100e64516d6af6d7b0ae2bed1d263d26f70948 \ 9 | --hash=sha256:6c4c563f14f01440aaffa3eae13441c5db2357b5eec639abe7c0b15334627dff 10 | # via nox 11 | colorlog==6.7.0 \ 12 | --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ 13 | --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 14 | # via nox 15 | distlib==0.3.6 \ 16 | --hash=sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46 \ 17 | --hash=sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e 18 | # via virtualenv 19 | filelock==3.12.2 \ 20 | --hash=sha256:002740518d8aa59a26b0c76e10fb8c6e15eae825d34b6fdf670333fd7b938d81 \ 21 | --hash=sha256:cbb791cdea2a72f23da6ac5b5269ab0a0d161e9ef0100e653b69049a7706d1ec 22 | # via virtualenv 23 | nox==2023.4.22 \ 24 | --hash=sha256:0b1adc619c58ab4fa57d6ab2e7823fe47a32e70202f287d78474adcc7bda1891 \ 25 | --hash=sha256:46c0560b0dc609d7d967dc99e22cb463d3c4caf54a5fda735d6c11b5177e3a9f 26 | # via -r requirements.in 27 | packaging==23.1 \ 28 | --hash=sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61 \ 29 | --hash=sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f 30 | # via nox 31 | platformdirs==3.8.0 \ 32 | --hash=sha256:b0cabcb11063d21a0b261d557acb0a9d2126350e63b70cdf7db6347baea456dc \ 33 | --hash=sha256:ca9ed98ce73076ba72e092b23d3c93ea6c4e186b3f1c3dad6edd98ff6ffcca2e 34 | # via virtualenv 35 | virtualenv==20.23.1 \ 36 | --hash=sha256:34da10f14fea9be20e0fd7f04aba9732f84e593dac291b757ce42e3368a39419 \ 37 | --hash=sha256:8ff19a38c1021c742148edc4f81cb43d7f8c6816d2ede2ab72af5b84c749ade1 38 | # via 39 | # -r requirements.in 40 | # nox 41 | -------------------------------------------------------------------------------- /python/cloud-devrel-kokoro-resources/python-base/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: build 2 | build: 3 | docker build -t gcr.io/cloud-devrel-kokoro-resources/python-base:${TAG} . 4 | docker tag gcr.io/cloud-devrel-kokoro-resources/python-base:${TAG} gcr.io/cloud-devrel-public-resources/python-base:${TAG} 5 | .PHONY: publish 6 | publish: build 7 | gcloud docker -- push gcr.io/cloud-devrel-kokoro-resources/python-base:${TAG} 8 | gcloud docker -- push gcr.io/cloud-devrel-public-resources/python-base:${TAG} 9 | -------------------------------------------------------------------------------- /python/cloud-devrel-kokoro-resources/python-base/requirements.in: -------------------------------------------------------------------------------- 1 | virtualenv==20.26.6 2 | -------------------------------------------------------------------------------- /python/cloud-devrel-kokoro-resources/python-base/requirements.txt: -------------------------------------------------------------------------------- 1 | # 2 | # This file is autogenerated by pip-compile with Python 3.10 3 | # by the following command: 4 | # 5 | # pip-compile --allow-unsafe --generate-hashes requirements.in 6 | # 7 | distlib==0.3.9 \ 8 | --hash=sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87 \ 9 | --hash=sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403 10 | # via virtualenv 11 | filelock==3.16.1 \ 12 | --hash=sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0 \ 13 | --hash=sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435 14 | # via virtualenv 15 | platformdirs==4.3.6 \ 16 | --hash=sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907 \ 17 | --hash=sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb 18 | # via virtualenv 19 | virtualenv==20.26.6 \ 20 | --hash=sha256:280aede09a2a5c317e409a00102e7077c6432c5a38f0ef938e643805a7ad2c48 \ 21 | --hash=sha256:7345cc5b25405607a624d8418154577459c3e0277f5466dd79c49d5e492995f2 22 | # via -r requirements.in 23 | -------------------------------------------------------------------------------- /python/cloud-devrel-kokoro-resources/python/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM gcr.io/cloud-devrel-kokoro-resources/python-base:latest 16 | 17 | # Install libraries needed by third-party python packages that we depend on. 18 | RUN apt update \ 19 | && apt install -y \ 20 | graphviz \ 21 | libcurl4-openssl-dev \ 22 | libffi-dev \ 23 | libjpeg-dev \ 24 | libmagickwand-dev \ 25 | libmemcached-dev \ 26 | libmysqlclient-dev \ 27 | libpng-dev \ 28 | libpq-dev \ 29 | libssl-dev \ 30 | libxml2-dev \ 31 | libxslt1-dev \ 32 | openssl \ 33 | portaudio19-dev \ 34 | zlib1g-dev \ 35 | && apt clean 36 | 37 | RUN python3 --version 38 | RUN which python3 39 | 40 | # Setup Cloud SDK 41 | ENV CLOUD_SDK_VERSION 499.0.0 42 | 43 | # Use system python for cloud sdk. 44 | ENV CLOUDSDK_PYTHON python3.9 45 | RUN wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz 46 | RUN tar xzf google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz 47 | RUN /google-cloud-sdk/install.sh 48 | ENV PATH /google-cloud-sdk/bin:$PATH 49 | 50 | # Setup the user profile for pip 51 | ENV PATH ~/.local/bin:/root/.local/bin:$PATH 52 | 53 | # Install the current version of nox. 54 | COPY requirements.txt /requirements.txt 55 | RUN python3 -m pip install --require-hashes --no-cache-dir -r /requirements.txt 56 | 57 | CMD ["nox"] 58 | -------------------------------------------------------------------------------- /python/cloud-devrel-kokoro-resources/python/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: build 2 | build: 3 | docker build -t gcr.io/cloud-devrel-kokoro-resources/python:${TAG} . 4 | docker tag gcr.io/cloud-devrel-kokoro-resources/python:${TAG} gcr.io/cloud-devrel-public-resources/python:${TAG} 5 | 6 | .PHONY: publish 7 | publish: build 8 | gcloud docker -- push gcr.io/cloud-devrel-kokoro-resources/python:${TAG} 9 | gcloud docker -- push gcr.io/cloud-devrel-public-resources/python:${TAG} 10 | -------------------------------------------------------------------------------- /python/cloud-devrel-kokoro-resources/python/requirements.in: -------------------------------------------------------------------------------- 1 | nox 2 | virtualenv==20.26.6 3 | -------------------------------------------------------------------------------- /python/cloud-devrel-kokoro-resources/python/requirements.txt: -------------------------------------------------------------------------------- 1 | # 2 | # This file is autogenerated by pip-compile with Python 3.10 3 | # by the following command: 4 | # 5 | # pip-compile --allow-unsafe --generate-hashes requirements.in 6 | # 7 | argcomplete==3.5.1 \ 8 | --hash=sha256:1a1d148bdaa3e3b93454900163403df41448a248af01b6e849edc5ac08e6c363 \ 9 | --hash=sha256:eb1ee355aa2557bd3d0145de7b06b2a45b0ce461e1e7813f5d066039ab4177b4 10 | # via nox 11 | colorlog==6.9.0 \ 12 | --hash=sha256:5906e71acd67cb07a71e779c47c4bcb45fb8c2993eebe9e5adcd6a6f1b283eff \ 13 | --hash=sha256:bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2 14 | # via nox 15 | distlib==0.3.9 \ 16 | --hash=sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87 \ 17 | --hash=sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403 18 | # via virtualenv 19 | filelock==3.16.1 \ 20 | --hash=sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0 \ 21 | --hash=sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435 22 | # via virtualenv 23 | nox==2024.10.9 \ 24 | --hash=sha256:1d36f309a0a2a853e9bccb76bbef6bb118ba92fa92674d15604ca99adeb29eab \ 25 | --hash=sha256:7aa9dc8d1c27e9f45ab046ffd1c3b2c4f7c91755304769df231308849ebded95 26 | # via -r requirements.in 27 | packaging==24.1 \ 28 | --hash=sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002 \ 29 | --hash=sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124 30 | # via nox 31 | platformdirs==4.3.6 \ 32 | --hash=sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907 \ 33 | --hash=sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb 34 | # via virtualenv 35 | tomli==2.0.2 \ 36 | --hash=sha256:2ebe24485c53d303f690b0ec092806a085f07af5a5aa1464f3931eec36caaa38 \ 37 | --hash=sha256:d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed 38 | # via nox 39 | virtualenv==20.26.6 \ 40 | --hash=sha256:280aede09a2a5c317e409a00102e7077c6432c5a38f0ef938e643805a7ad2c48 \ 41 | --hash=sha256:7345cc5b25405607a624d8418154577459c3e0277f5466dd79c49d5e492995f2 42 | # via 43 | # -r requirements.in 44 | # nox 45 | -------------------------------------------------------------------------------- /python/cloudbuild-release.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | # googleapis/python-multi 18 | - name: gcr.io/cloud-builders/docker 19 | args: ['build', '--cache-from', 'us-central1-docker.pkg.dev/$PROJECT_ID/release-images/python-multi', '-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/release-images/python-multi', '.'] 20 | dir: 'python/googleapis/python-multi' 21 | id: 'python-multi' 22 | waitFor: ['-'] 23 | 24 | options: 25 | machineType: 'E2_HIGHCPU_8' 26 | logging: CLOUD_LOGGING_ONLY 27 | 28 | images: 29 | - us-central1-docker.pkg.dev/$PROJECT_ID/release-images/python-multi 30 | -------------------------------------------------------------------------------- /python/cloudbuild-test.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2020 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | 18 | # cloud-devrel-kokoro-resources/google-cloud-python/autosynth 19 | - name: gcr.io/cloud-builders/docker 20 | args: ['build', '--no-cache', '-t', 'gcr.io/cloud-devrel-kokoro-resources/google-cloud-python/autosynth', '.'] 21 | dir: 'python/cloud-devrel-kokoro-resources/google-cloud-python/autosynth' 22 | waitFor: ['-'] 23 | id: 'autosynth' 24 | 25 | # cloud-devrel-kokoro-resources/python-base 26 | - name: gcr.io/cloud-builders/docker 27 | args: ['build', '--cache-from', 'gcr.io/cloud-devrel-kokoro-resources/python-base', '-t', 'gcr.io/cloud-devrel-kokoro-resources/python-base', '.'] 28 | dir: 'python/cloud-devrel-kokoro-resources/python-base' 29 | waitFor: ['-'] 30 | id: 'python-base' 31 | 32 | # googleapis/python-multi 33 | - name: gcr.io/cloud-builders/docker 34 | args: ['build', '--cache-from', 'gcr.io/cloud-devrel-kokoro-resources/python-multi', '-t', 'gcr.io/cloud-devrel-kokoro-resources/python-multi', '.'] 35 | dir: 'python/googleapis/python-multi' 36 | id: 'python-multi' 37 | waitFor: ['-'] 38 | 39 | # cloud-devrel-kokoro-resources/python 40 | - name: gcr.io/cloud-builders/docker 41 | args: ['build', '--no-cache', '-t', 'gcr.io/cloud-devrel-kokoro-resources/python', '.'] 42 | dir: 'python/cloud-devrel-kokoro-resources/python' 43 | waitFor: ['python-base'] 44 | id: 'python' -------------------------------------------------------------------------------- /python/cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | 18 | # cloud-devrel-kokoro-resources/google-cloud-python/autosynth 19 | - name: gcr.io/cloud-builders/docker 20 | args: ['build', '--no-cache', '-t', 'gcr.io/cloud-devrel-kokoro-resources/google-cloud-python/autosynth', '.'] 21 | dir: 'python/cloud-devrel-kokoro-resources/google-cloud-python/autosynth' 22 | waitFor: ['-'] 23 | id: 'autosynth' 24 | - name: gcr.io/cloud-builders/docker 25 | args: ['tag', 'gcr.io/cloud-devrel-kokoro-resources/google-cloud-python/autosynth', 'gcr.io/cloud-devrel-public-resources/google-cloud-python/autosynth'] 26 | waitFor: ['autosynth'] 27 | 28 | # cloud-devrel-kokoro-resources/python-base 29 | - name: gcr.io/cloud-builders/docker 30 | args: ['build', '--no-cache', '-t', 'gcr.io/cloud-devrel-kokoro-resources/python-base', '.'] 31 | dir: 'python/cloud-devrel-kokoro-resources/python-base' 32 | waitFor: ['-'] 33 | id: 'python-base' 34 | - name: gcr.io/cloud-builders/docker 35 | args: ['tag', 'gcr.io/cloud-devrel-kokoro-resources/python-base', 'gcr.io/cloud-devrel-public-resources/python-base'] 36 | waitFor: ['python-base'] 37 | 38 | # googleapis/python-multi 39 | - name: gcr.io/cloud-builders/docker 40 | args: ['build', '--cache-from', 'gcr.io/cloud-devrel-kokoro-resources/python-multi', '-t', 'gcr.io/cloud-devrel-kokoro-resources/python-multi', '.'] 41 | dir: 'python/googleapis/python-multi' 42 | id: 'python-multi' 43 | waitFor: ['-'] 44 | - name: gcr.io/cloud-builders/docker 45 | args: ['tag', 'gcr.io/cloud-devrel-kokoro-resources/python-multi', 'gcr.io/cloud-devrel-public-resources/python-multi'] 46 | waitFor: ['python-multi'] 47 | 48 | # cloud-devrel-kokoro-resources/python 49 | - name: gcr.io/cloud-builders/docker 50 | args: ['build', '--no-cache', '-t', 'gcr.io/cloud-devrel-kokoro-resources/python', '.'] 51 | dir: 'python/cloud-devrel-kokoro-resources/python' 52 | waitFor: ['python-base'] 53 | id: 'python' 54 | - name: gcr.io/cloud-builders/docker 55 | args: ['tag', 'gcr.io/cloud-devrel-kokoro-resources/python', 'gcr.io/cloud-devrel-public-resources/python'] 56 | waitFor: ['python'] 57 | 58 | options: 59 | machineType: 'E2_HIGHCPU_8' 60 | logging: CLOUD_LOGGING_ONLY 61 | 62 | images: 63 | - gcr.io/cloud-devrel-kokoro-resources/google-cloud-python/autosynth 64 | - gcr.io/cloud-devrel-kokoro-resources/python 65 | - gcr.io/cloud-devrel-kokoro-resources/python-base 66 | - gcr.io/cloud-devrel-kokoro-resources/python-multi 67 | - gcr.io/cloud-devrel-public-resources/google-cloud-python/autosynth 68 | - gcr.io/cloud-devrel-public-resources/python 69 | - gcr.io/cloud-devrel-public-resources/python-base 70 | - gcr.io/cloud-devrel-public-resources/python-multi 71 | -------------------------------------------------------------------------------- /python/googleapis/python-multi/requirements.in: -------------------------------------------------------------------------------- 1 | virtualenv==20.26.6 2 | nox 3 | -------------------------------------------------------------------------------- /python/googleapis/python-multi/requirements.txt: -------------------------------------------------------------------------------- 1 | # 2 | # This file is autogenerated by pip-compile with Python 3.9 3 | # by the following command: 4 | # 5 | # pip-compile --allow-unsafe --generate-hashes requirements.in 6 | # 7 | argcomplete==3.1.1 \ 8 | --hash=sha256:35fa893a88deea85ea7b20d241100e64516d6af6d7b0ae2bed1d263d26f70948 \ 9 | --hash=sha256:6c4c563f14f01440aaffa3eae13441c5db2357b5eec639abe7c0b15334627dff 10 | # via nox 11 | colorlog==6.7.0 \ 12 | --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ 13 | --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 14 | # via nox 15 | distlib==0.3.9 \ 16 | --hash=sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87 \ 17 | --hash=sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403 18 | # via virtualenv 19 | filelock==3.12.2 \ 20 | --hash=sha256:002740518d8aa59a26b0c76e10fb8c6e15eae825d34b6fdf670333fd7b938d81 \ 21 | --hash=sha256:cbb791cdea2a72f23da6ac5b5269ab0a0d161e9ef0100e653b69049a7706d1ec 22 | # via virtualenv 23 | nox==2023.4.22 \ 24 | --hash=sha256:0b1adc619c58ab4fa57d6ab2e7823fe47a32e70202f287d78474adcc7bda1891 \ 25 | --hash=sha256:46c0560b0dc609d7d967dc99e22cb463d3c4caf54a5fda735d6c11b5177e3a9f 26 | # via -r requirements.in 27 | packaging==23.1 \ 28 | --hash=sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61 \ 29 | --hash=sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f 30 | # via nox 31 | platformdirs==4.3.6 \ 32 | --hash=sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907 \ 33 | --hash=sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb 34 | # via virtualenv 35 | virtualenv==20.26.6 \ 36 | --hash=sha256:280aede09a2a5c317e409a00102e7077c6432c5a38f0ef938e643805a7ad2c48 \ 37 | --hash=sha256:7345cc5b25405607a624d8418154577459c3e0277f5466dd79c49d5e492995f2 38 | # via 39 | # -r requirements.in 40 | # nox 41 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ], 5 | "ignorePaths": [ 6 | "go/*/Dockerfile" 7 | ], 8 | "enabledManagers": ["regex"], 9 | "regexManagers": [ 10 | { 11 | "fileMatch": ["^java/cloudbuild.yaml", "^java/cloudbuild-test.yaml"], 12 | "matchStrings": [" _GRAALVM_VERSION: '(?.*?)'"], 13 | "depNameTemplate": "ghcr.io/graalvm/graalvm-ce", 14 | "datasourceTemplate": "docker" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /ruby/cloudbuild-release.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | 18 | # Build Ruby multi-use image (used for integration tests) 19 | - id: 'build-multi' 20 | name: 'gcr.io/cloud-builders/docker' 21 | args: ['build', '-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/release-images/ruby-multi', '.'] 22 | dir: 'ruby/multi' 23 | waitFor: ['-'] 24 | 25 | # Build Ruby release image 26 | - id: 'build-release' 27 | name: 'gcr.io/cloud-builders/docker' 28 | args: ['build', '-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/release-images/ruby-release', '.'] 29 | dir: 'ruby/release' 30 | waitFor: ['-'] 31 | 32 | # Results 33 | images: 34 | - us-central1-docker.pkg.dev/$PROJECT_ID/release-images/ruby-multi 35 | - us-central1-docker.pkg.dev/$PROJECT_ID/release-images/ruby-release 36 | 37 | options: 38 | logging: CLOUD_LOGGING_ONLY 39 | -------------------------------------------------------------------------------- /ruby/cloudbuild-test.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2020 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | 18 | # Build Ruby multi-use image 19 | - id: 'build-multi' 20 | name: 'gcr.io/cloud-builders/docker' 21 | args: 22 | - 'build' 23 | - '-t' 24 | - 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi' 25 | - '-t' 26 | - 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi-node' 27 | - '-t' 28 | - 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth' 29 | - '-t' 30 | - 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/release' 31 | - '-t' 32 | - 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/ruby-multi' 33 | - '-t' 34 | - 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/ruby-release' 35 | - '-t' 36 | - 'gcr.io/cloud-devrel-public-resources/yoshi-ruby/multi' 37 | - '.' 38 | dir: 'ruby/multi' 39 | waitFor: ['-'] 40 | 41 | - id: 'build-release' 42 | name: 'gcr.io/cloud-builders/docker' 43 | args: 44 | - 'build' 45 | - '-t' 46 | - 'gcr.io/$PROJECT_ID/release' 47 | - '.' 48 | dir: 'ruby/release' 49 | waitFor: ['-'] 50 | - id: 'test-release' 51 | name: gcr.io/gcp-runtimes/structure_test 52 | args: 53 | [ 54 | '-i', 55 | 'gcr.io/$PROJECT_ID/release', 56 | '--config', 57 | '/workspace/ruby/release.yaml', 58 | '-v', 59 | ] 60 | waitFor: ['build-release'] 61 | -------------------------------------------------------------------------------- /ruby/cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | 18 | # Build Ruby multi-use image 19 | - id: 'build-multi' 20 | name: 'gcr.io/cloud-builders/docker' 21 | args: ['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi', '.'] 22 | dir: 'ruby/multi' 23 | waitFor: ['-'] 24 | 25 | # Tag alternate names 26 | - name: gcr.io/cloud-builders/docker 27 | args: ['tag', 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi', 28 | 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi-node'] 29 | waitFor: ['build-multi'] 30 | - name: gcr.io/cloud-builders/docker 31 | args: ['tag', 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi', 32 | 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth'] 33 | waitFor: ['build-multi'] 34 | - name: gcr.io/cloud-builders/docker 35 | args: ['tag', 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi', 36 | 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/release'] 37 | waitFor: ['build-multi'] 38 | - name: gcr.io/cloud-builders/docker 39 | args: ['tag', 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi', 40 | 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/ruby-multi'] 41 | waitFor: ['build-multi'] 42 | - name: gcr.io/cloud-builders/docker 43 | args: ['tag', 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi', 44 | 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/ruby-release'] 45 | waitFor: ['build-multi'] 46 | - name: gcr.io/cloud-builders/docker 47 | args: ['tag', 'gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi', 48 | 'gcr.io/cloud-devrel-public-resources/yoshi-ruby/multi'] 49 | waitFor: ['build-multi'] 50 | 51 | # Results 52 | images: 53 | - gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi 54 | - gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi-node 55 | - gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth 56 | - gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/release 57 | - gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/ruby-multi 58 | - gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/ruby-release 59 | - gcr.io/cloud-devrel-public-resources/yoshi-ruby/multi 60 | 61 | options: 62 | logging: CLOUD_LOGGING_ONLY 63 | -------------------------------------------------------------------------------- /ruby/release.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "ruby version" 18 | command: ["ruby", "-v"] 19 | expectedOutput: ["ruby 3.4.4"] 20 | - name: "toys version" 21 | command: ["toys", "--version"] 22 | expectedOutput: ["0.15.6"] 23 | - name: "toys release check" 24 | command: ["toys", "system", "tools", "show", "release", "perform"] 25 | expectedOutput: ["runnable: true"] 26 | - name: "syft version" 27 | command: ["syft", "--version"] 28 | expectedOutput: ["syft 1.19.0"] 29 | - name: "gcloud version" 30 | command: ["gcloud", "version"] 31 | expectedOutput: ["Google Cloud SDK"] 32 | - name: "gh version" 33 | command: ["gh", "--version"] 34 | expectedOutput: ["gh version 2.72.0"] 35 | -------------------------------------------------------------------------------- /ruby/release/.toys.rb: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | if ENV["RUBY_COMMON_TOOLS"] 16 | tool "release" do 17 | load File.join(ENV["RUBY_COMMON_TOOLS"], "toys", "release") 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /ruby/release/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM ubuntu:noble 16 | 17 | ENTRYPOINT /bin/bash 18 | 19 | ENV RUBY_VERSION=3.4.4 \ 20 | RUBYGEMS_VERSION=3.6.9 \ 21 | BUNDLER_VERSION=2.6.9 \ 22 | RAKE_VERSION=13.2.1 \ 23 | TOYS_VERSION=0.15.6 \ 24 | GEMS_VERSION=1.3.0 \ 25 | JWT_VERSION=2.10.1 \ 26 | YARD_VERSION=0.9.37 \ 27 | REDCARPET_VERSION=3.6.1 \ 28 | GH_VERSION=2.72.0 \ 29 | SYFT_VERSION=1.19.0 30 | 31 | ENV DEBIAN_FRONTEND noninteractive 32 | 33 | # Set the locale 34 | RUN apt-get update \ 35 | && apt-get install -y --no-install-recommends locales \ 36 | && apt-get -y autoremove \ 37 | && apt-get -y autoclean \ 38 | && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 39 | ENV LANG en_US.utf8 40 | 41 | # Install dependencies 42 | RUN apt-get update \ 43 | && apt-get install -y --no-install-recommends \ 44 | apt-transport-https \ 45 | autoconf \ 46 | bison \ 47 | build-essential \ 48 | ca-certificates \ 49 | curl \ 50 | git \ 51 | gpg-agent \ 52 | libbz2-dev \ 53 | libffi-dev \ 54 | libgdbm-dev \ 55 | liblzma-dev \ 56 | libncurses5-dev \ 57 | libreadline-dev \ 58 | libreadline6-dev \ 59 | libssl-dev \ 60 | libyaml-dev \ 61 | make \ 62 | pkg-config \ 63 | qt5-qmake \ 64 | software-properties-common \ 65 | wget \ 66 | xz-utils \ 67 | zlib1g-dev \ 68 | && apt-get -y autoremove \ 69 | && apt-get -y autoclean 70 | 71 | # Install docker 72 | RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - 73 | RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" \ 74 | && apt-get update \ 75 | && apt-get install -y --no-install-recommends docker-ce \ 76 | && apt-get -y autoremove \ 77 | && apt-get -y autoclean 78 | 79 | # Install rbenv 80 | ENV RBENV_ROOT=/root/.rbenv 81 | RUN git clone --depth=1 https://github.com/rbenv/rbenv.git $RBENV_ROOT 82 | ENV PATH $RBENV_ROOT/shims:$RBENV_ROOT/bin:$PATH 83 | RUN echo 'eval "$(rbenv init -)"' >> /etc/profile 84 | RUN echo 'eval "$(rbenv init -)"' >> .bashrc 85 | RUN mkdir -p "$(rbenv root)"/plugins \ 86 | && git clone --depth=1 https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build 87 | 88 | # Install ruby 89 | ENV RUBY_CONFIGURE_OPTS --disable-install-doc 90 | RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc 91 | RUN rbenv install "${RUBY_VERSION}" \ 92 | && rbenv global "${RUBY_VERSION}" \ 93 | && gem update --system ${RUBYGEMS_VERSION} \ 94 | && gem install bundler:${BUNDLER_VERSION} \ 95 | rake:${RAKE_VERSION} \ 96 | toys:${TOYS_VERSION} \ 97 | gems:${GEMS_VERSION} \ 98 | jwt:${JWT_VERSION} \ 99 | yard:${YARD_VERSION} \ 100 | redcarpet:${REDCARPET_VERSION} \ 101 | && rbenv rehash 102 | 103 | # Install gh 104 | RUN mkdir -p /opt/local \ 105 | && wget https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_amd64.tar.gz \ 106 | && tar xvzf gh_${GH_VERSION}_linux_amd64.tar.gz -C /opt/local/ \ 107 | && ln -s /opt/local/gh_${GH_VERSION}_linux_amd64/bin/gh /usr/local/bin/ \ 108 | && rm gh_${GH_VERSION}_linux_amd64.tar.gz 109 | 110 | # Install syft 111 | ADD https://github.com/anchore/syft/releases/download/v${SYFT_VERSION}/syft_${SYFT_VERSION}_linux_amd64.deb /workspace/syft.deb 112 | RUN dpkg -i /workspace/syft.deb 113 | 114 | # Install gcloud CLI 115 | RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ 116 | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \ 117 | apt-get update -y && \ 118 | apt-get install google-cloud-cli -y 119 | 120 | # Library release tooling uses the RUBY_COMMON_TOOLS environment variable to 121 | # specify where the ruby-common-tools repo is located. 122 | ENV RUBY_COMMON_TOOLS /root/ruby-common-tools 123 | RUN git clone --depth=1 https://github.com/googleapis/ruby-common-tools.git ${RUBY_COMMON_TOOLS} 124 | COPY .toys.rb /root/.toys.rb 125 | 126 | # Allow non-root users read access to /root (for Trampoline V2) 127 | RUN chmod -v a+rx /root 128 | 129 | WORKDIR /root 130 | -------------------------------------------------------------------------------- /ruby/windows/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2019 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM microsoft/windowsservercore:ltsc2016 16 | 17 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] 18 | 19 | ENV chocolateyUseWindowsCompression=false 20 | ENV HOMEPATH=\\Users\\ContainerAdministrator 21 | ENV HOMEDRIVE=C: 22 | ENV HOME=C:\\Users\\ContainerAdministrator 23 | 24 | # Fixes https://cloud.google.com/compute/docs/containers/#mtu_failures 25 | # There is a similar script that has to run periodically on the VM as well. 26 | RUN $output = netsh interface ipv4 show subinterfaces; \ 27 | for ($i = 0; $i -le ($output.length - 1); $i += 1) { \ 28 | if($output[$i] -like '*vEthernet*') { \ 29 | $interfaces = $output[$i] \ 30 | } \ 31 | }; \ 32 | $interfaces = $interfaces -replace '\d+\s+', ''; \ 33 | $interface = $interfaces.Trim().TrimEnd().TrimStart(); \ 34 | netsh interface ipv4 set subinterface interface=$interface mtu=1460 store=persistent 35 | 36 | RUN iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); \ 37 | choco feature disable --name showDownloadProgress 38 | 39 | RUN choco feature enable -n=allowGlobalConfirmation; \ 40 | choco install git 41 | 42 | # Rubocop expects us to use native line endings 43 | RUN git config --global core.autocrlf true 44 | 45 | RUN [Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'; \ 46 | Invoke-WebRequest -Method Get -Uri https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.5.3-1/rubyinstaller-devkit-2.5.3-1-x64.exe -OutFile C:\rubyinstaller.exe ; \ 47 | Start-Process C:\rubyinstaller.exe -ArgumentList '/silent' -Wait ; \ 48 | Remove-Item C:\rubyinstaller.exe -Force 49 | 50 | RUN C:\Ruby25-x64\bin\ridk install 1 2 3 51 | 52 | RUN gem install --no-document bundler:1.17.3 53 | 54 | RUN gem update --system 55 | -------------------------------------------------------------------------------- /syft/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM marketplace.gcr.io/google/ubuntu2404 16 | 17 | ENV SYFT_VERSION=1.19.0 18 | 19 | # update SSL certs 20 | RUN apt-get update -y && \ 21 | apt-get install -y \ 22 | ca-certificates \ 23 | curl \ 24 | uuid-runtime \ 25 | git \ 26 | jq \ 27 | zip 28 | 29 | RUN mkdir /workspace 30 | 31 | WORKDIR /workspace 32 | 33 | ADD https://github.com/anchore/syft/releases/download/v${SYFT_VERSION}/syft_${SYFT_VERSION}_linux_amd64.deb /workspace/syft.deb 34 | RUN dpkg -i syft.deb 35 | 36 | ENTRYPOINT ["syft"] 37 | -------------------------------------------------------------------------------- /syft/airlock/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # ubuntu:24.04 as of May 14, 2025 16 | FROM us-docker.pkg.dev/artifact-foundry-prod/standard-docker-3p-l1/ubuntu@sha256:80dd3c3b9c6cecb9f1667e9290b3bc61b78c2678c02cbdae5f0fea92cc6734ab as bootstrap 17 | 18 | RUN apt-get update && \ 19 | apt-get install --no-install-recommends -y --allow-change-held-packages \ 20 | gnupg curl ca-certificates apt-utils && \ 21 | curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \ 22 | echo 'deb http://packages.cloud.google.com/apt apt-transport-artifact-registry-stable main' | tee -a /etc/apt/sources.list.d/artifact-registry.list 23 | 24 | RUN apt-get update && apt-get install apt-transport-artifact-registry 25 | 26 | # New clean base so we aren't fetching "gnupg curl apt-utils" if not needed 27 | FROM us-docker.pkg.dev/artifact-foundry-prod/standard-docker-3p-l1/ubuntu@sha256:80dd3c3b9c6cecb9f1667e9290b3bc61b78c2678c02cbdae5f0fea92cc6734ab as base 28 | 29 | # ca-certificates is required for https 30 | RUN apt-get update && \ 31 | apt-get install --no-install-recommends -y --allow-change-held-packages \ 32 | ca-certificates 33 | 34 | # Copy only the ar+https 35 | COPY --from=bootstrap "/usr/lib/apt/methods/ar+https" "/usr/lib/apt/methods/ar+https" 36 | # Copy the apache notice type license for OSPO 37 | COPY --from=bootstrap "/usr/share/doc/apt-transport-artifact-registry" "/usr/share/doc/apt-transport-artifact-registry" 38 | 39 | # Remove all other apt sources, silence errors if file doesn't exist 40 | RUN rm -f /etc/apt/sources.list.d/* /etc/apt/sources.list 41 | 42 | # If GOOGLE_APPLICATION_CREDENTIALS is passed in docker build command use it, if not leave it unset to support GCE Metadata in CI builds 43 | ARG GOOGLE_APPLICATION_CREDENTIALS 44 | 45 | # Use a secret mount to access your long lived credentials, without the risk of leaking them in any of the docker layers 46 | RUN --mount=type=secret,id=credentials \ 47 | echo 'deb ar+https://us-apt.pkg.dev/remote/artifact-foundry-prod/ubuntu-3p-remote-noble noble main' | \ 48 | tee -a /etc/apt/sources.list.d/artifact-registry.list && \ 49 | apt update 50 | 51 | # Everything after this is for your image, if you build FROM a base image with airlock already configured 52 | 53 | ENV SYFT_VERSION=1.19.0 54 | 55 | # Install packages you require that need auth 56 | RUN --mount=type=secret,id=credentials \ 57 | apt-get update -y && \ 58 | apt-get install -y \ 59 | ca-certificates \ 60 | curl \ 61 | uuid-runtime \ 62 | git \ 63 | jq \ 64 | zip \ 65 | && apt-get clean && rm -rf /var/lib/apt/lists/* 66 | 67 | RUN mkdir /workspace 68 | 69 | WORKDIR /workspace 70 | 71 | ADD https://github.com/anchore/syft/releases/download/v${SYFT_VERSION}/syft_${SYFT_VERSION}_linux_amd64.deb /workspace/syft.deb 72 | RUN dpkg -i syft.deb 73 | 74 | ENTRYPOINT ["syft"] 75 | -------------------------------------------------------------------------------- /syft/cloudbuild-release.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | 18 | # Build Ruby multi-use image 19 | - id: 'build' 20 | name: 'gcr.io/cloud-builders/docker' 21 | args: ['build', '-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/release-images/syft', '.'] 22 | dir: 'syft' 23 | waitFor: ['-'] 24 | 25 | # Results 26 | images: 27 | - us-central1-docker.pkg.dev/$PROJECT_ID/release-images/syft 28 | 29 | options: 30 | logging: CLOUD_LOGGING_ONLY 31 | -------------------------------------------------------------------------------- /syft/cloudbuild-test.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | timeout: 7200s # 2 hours 16 | steps: 17 | 18 | # Build Ruby multi-use image 19 | - id: 'build' 20 | name: 'gcr.io/cloud-builders/docker' 21 | args: ['build', '-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/release-images/syft', '.'] 22 | dir: 'syft' 23 | waitFor: ['-'] 24 | - name: gcr.io/gcp-runtimes/structure_test 25 | args: 26 | [ 27 | "-i", 28 | "us-central1-docker.pkg.dev/$PROJECT_ID/release-images/syft", 29 | "--config", 30 | "/workspace/syft/syft.yaml", 31 | "-v", 32 | ] 33 | waitFor: ["build"] 34 | options: 35 | logging: CLOUD_LOGGING_ONLY 36 | -------------------------------------------------------------------------------- /syft/syft.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | schemaVersion: 1.0.0 16 | commandTests: 17 | - name: "version" 18 | command: ["syft", "--version"] 19 | expectedOutput: ["syft 1.19.0"] 20 | - name: "jq" 21 | command: ["jq", "--version"] 22 | expectedOutput: ["jq-"] 23 | - name: "uuidgen" 24 | command: ["uuidgen", "--version"] 25 | expectedOutput: ["uuidgen"] 26 | - name: "git" 27 | command: ["git", "--version"] 28 | expectedOutput: ["git version"] 29 | - name: "zip" 30 | command: ["zip", "--version"] 31 | expectedOutput: ["This is Zip"] 32 | - name: "curl" 33 | command: ["curl", "--version"] 34 | expectedOutput: ["curl"] --------------------------------------------------------------------------------