Code Monkey home page Code Monkey logo

googlecloudplatform / cloud-builders-community Goto Github PK

View Code? Open in Web Editor NEW
1.2K 57.0 851.0 11.26 MB

Community-contributed images for Google Cloud Build

Home Page: https://cloud.google.com/cloud-build/

License: Apache License 2.0

Scala 1.83% HTML 0.63% Shell 23.32% Clojure 0.07% JavaScript 1.02% Python 4.43% Makefile 0.02% Go 31.54% Dockerfile 25.73% Java 0.09% HCL 4.02% PowerShell 2.33% Batchfile 0.01% Nix 0.24% Ruby 0.95% Jsonnet 0.10% Puppet 0.10% Open Policy Agent 0.11% Starlark 1.36% TypeScript 2.09%
google-cloud-build google-cloud-platform google-containers build docker

cloud-builders-community's Introduction

Google Cloud Build community images

This repository contains source code for community-contributed Docker images. You can use these images as build steps for Google Cloud Build.

These are not official Google products.

How to use a community-contributed build step

Google Cloud Build executes a build as a series of build steps. Each build step is run in a Docker container. See the Cloud Build documentation for more details about builds and build steps.

Before you begin

  1. Select or create a Google Cloud project.
  2. Enable billing for your project.
  3. Enable the Cloud Build API.
  4. Install and initialize the Cloud SDK.

Build the build step from source

To use a community-contributed Docker image as a build step, you need to download the source code from this repo and build the image.

The example below shows how to download and build the image for the packer build step on a Linux or Mac OS X workstation:

  1. Clone the cloud-builders-community repo:

    $ git clone https://github.com/GoogleCloudPlatform/cloud-builders-community
  2. Go to the directory that has the source code for the packer Docker image:

    $ cd cloud-builders-community/packer
  3. Build the Docker image:

    $ gcloud builds submit --config cloudbuild.yaml .
    
  4. View the image in Google Container Registry:

    $ gcloud container images list --filter packer

Use the build step with Cloud Build build

Once you've built the Docker image, you can use it as a build step in a Cloud Build build.

For example, below is the packer build step in a YAML config file, ready to be used in a Cloud Build build:

- name: 'gcr.io/$PROJECT_ID/packer'
  args:
  - build
  - -var
  - project_id=$PROJECT_ID
  - packer.json

Each build step's examples directory has an example of how you can use the build step. See the example for the packer builder.

Contributing

We welcome contributions! See CONTRIBUTING for more information on how to get started. Please include a cloudbuild.yaml and at least one working example in your pull request.

Contribution Requirements

In order to accept your contribution, it must:

  • make clear that the builder image is pushed to the builder's project's registry. E.g., it specifies images: ['gcr.io/$PROJECT_ID/the-tool']. The builder will not be pushed to the gcr.io/cloud-builders registry.
  • include a simple sanity test in the cloudbuild.yaml config that builds and pushes the image. This can be as simple as invoking the tool with --help, and it ensures the tool is installed correctly and in the expected location within the image.
  • include some basic example describing how to use it. This helps new users get acquainted with the builder, and helps us ensure the builder continues to work as intended.

License

This source code is licensed under Apache 2.0. Full license text is available in LICENSE.

Support

To file issues and feature requests against these builder images, the usage of these build steps or the Cloud Build API in general, create an issue in this repo.

If you are experiencing an issue with the Cloud Build service or have a feature request, e-mail [email protected] or see our Getting support documentation.

cloud-builders-community's People

Contributors

afirth avatar alygerharter avatar andrewangeta avatar arikkfir avatar bendory avatar burn2delete avatar codrienne avatar dazwilkin avatar frenchvandal avatar haroonc avatar henryken avatar hiranthar avatar imjasonh avatar jackwootton avatar johnlabarge avatar liiri avatar n0npax avatar naseemkullah avatar nof20 avatar pavlospt avatar philmod avatar poy avatar prabenzom avatar pranaynanda avatar rharter avatar rprakashg avatar sanastos avatar studiome avatar sytten avatar xsavikx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloud-builders-community's Issues

Add flutter cloud builder

Hello, any plans to support flutter cloud builder ? I would to use cloudbuild.yaml in my CI to build new release of my flutter application :)

Provide community gcr.io repo

It would be really nice to not have to build these images, but just reference using something like:
gcr.io/cloud-builders-community/

Understood that they come with no warranty....

Docker compose mounted volumes empty

Affected builder image

gcr.io/cloud-builders-community/docker-compose

Expected Behavior

Current directory volumes mounted via docker-compose.yml to not be empty.

Actual Behavior

Mounted volume is empty.

Steps to Reproduce the Problem

cloudbuild.yaml

steps:

- name: 'docker.io/tomatosource/docker-compose'
  id: test
  args:
    - 'up'
    - '--force-recreate'
    - '--abort-on-container-exit'
    - '--exit-code-from'
    - 'app'
  timeout: '300s'

docker-compose.yml

version: '3.5'

services:
  app:
    image: golang:alpine
    volumes:
      - .:/foo
    working_dir: /foo
    command: ls

Additional Info

Running locally via cloud-build-local --config=cloudbuild.yaml --dryrun=false .

arg (licenses) does not name a directory, bucket, or bucket subdir

Having some issues with the copy-licenses step which later on gives me this issue

Step #1: Step 16/18 : COPY licenses licenses
Step #1: COPY failed: stat /var/lib/docker/tmp/docker-builder155253068/licenses: no such file or directory

I've tried both using the env var and the gs bucket. Am I missing something? Thank you.

Defind Variable in fabric-beta-dist-cloudbuild.yaml

I am trying to use fabric-beta-dist-cloudbuild.yaml in android cloud builder for beta distribution but I can't figured out the value of the variables in your yaml filel like

  • ${_SIGNING_BUCKET_PATH}
  • ${_FABRIC_API_SECRET_BUCKET_PATH}
  • ${_EMAIL_DISTRIBUTION_GROUP}
  • _BUILD_TYPE_CAPITALIZED

docker-compose - resolving hostname

Greetings!

I'm having trouble connecting to a container after it has been started via docker-compose (following the GCB docs). I've also found some code to go with those steps from the docs here.

I'm likely just missing what the hostname becomes off of the docker-compose up step (and it's not as simple as the container_name).

Minimally reproducible compose is:

version: '3.4'
services:
  web-server:
    image: nginx
    container_name: web-server
    ports:
    - "8080:80"
networks:
  default:
    external:
      name: cloudbuild

and cloudbuild is

steps:
- name: 'docker/compose:1.22.0'
  args: ['up', '-d']
- name: 'gcr.io/cloud-builders/docker'
  args: ['run', 'byrnedo/alpine-curl', 'web-server:8080']

Thanks!

firebase - vulnerabilities in official npm builder

Hi,

I was creating a custom build step based on the firebase builder and also testing Container Analysis API and it detected several vulnerabilities in this image which were caused by the official npm builder

image

Once I changed the base image in the custom build step's Dockerfile to use latest Node LTS (Boron) the vulnerabilities were gone.

FROM gcr.io/cloud-builders/npm
-->
FROM node:boron

BR
Masi

How to replace slashes in the branch name

Git branches uses names like feature/new-feature, the slash is incompatible with docker image tags so i want to use a regex (or other means) to replace the slash in the $BRANCH_NAME with an underscore. This is possible in bash using the following:

BRANCH_NAME=feature/test echo ${BRANCH_NAME/\//_}

is there any way to create an env variable with the branch name escaped in cloudbuild.yaml?

RemoteBuilder: documentation about port 22

Affected builder image

remote-builder

Expected Behavior

The main build uses scp to copy files to the remote machine.

Actual Behavior

ssh: connect to host 35.238.52.245 port 22: Connection timed out

Additional Info

It's probably just a problem with the setup of the GCP project?

Add a builder for compodoc

Add a builder for compodoc. Compodoc is a tool used for generating documentation for your angular projects.

Android build-test-deploy.yaml comment is incorrect

At the bottom of the android/examples/build-test-deploy.yaml file you can find the following comment and configuration:

# This build requires more than 3.75 GB of memory, so I have to use a HIGHCPU machine
# which has 30 GB of memory.  This means I can give Gradle lots of processes to run
# highly parallelized.

[...]

options:
  machineType: 'N1_HIGHCPU_8'

According to the Google cloud machine types documentation, the n1-highcpu-8 only has 7.2gb of RAM and NOT 30gb.

Am I missing something? Is GCB using the same machine types than GCC?

Slackbot notification builder ignores the time out of the build is monitoring

Hi there : )

When triggering the secondary build to monitor the state of the main build, the timeout of the main build is ignored.

So even if in my cloudbuild.yaml I set up a build time out of 900s, if my build happens to go over 600s no notification will be sent because the monitoring build will time out after 600s.

I've quickly hacked this in trigger.go hardcoding my own time out when creating the trigger:

		Tags: []string{"slackbot"},
		Timeout: "900s", // <--- I added this

Ideally Slackbot should pull the timeout information from the Cloud Build API in order to use the same or maybe slightly higher. But I haven't checked that this is possible and my Go knowledge is non-existent!

Thanks,

Juan

Should 'bq' be a pre-built builder?

Apologies if using an issue to ask this is the wrong place.

Currently bq is a community builder i.e. located here.

Would it be worth considering bq as a pre-built builder? This is the case for the similar gsutil builder, and it feels to me like bq should have the same privileges too.

BigQuery is a native GCP tool, and it's the core tool to use on GCP for data and analytics. So having it as a pre-built image might make more sense.

firebase - instructions using login:ci and kms are unnecessary

The instructions on the firebase image state that the user should use the firebase login:ci command locally to generate a token, encrypt the token with KMS, then store that encrypted token in the cloudbuild.yaml file. These steps are unnecessary and incur additional costs because of the use of KMS to encrypt the secrets.

You can instead directly grant the Build service account user (it'll have the name <project-number>@cloudbuild.gserviceaccount.com) the following roles and it will be able to perform firebase deploys, at least of the 'Firebase Hosting' product. Some additional roles might need adding for other Firebase products.

  1. Cloud Build Service Account
  2. Firebase Admin
  3. API Keys Admin

You also need to enable these APIs for the project if they aren't already enabled:

  1. Cloud Resource Manager API
  2. Firebase Management API
  3. Firebase Hosting API

Is there a reason the firebase login:ci approach is promoted here? Is it preferred for some reason, or just outdated?

RemoteBuilder: Does not support INSTANCE_ARGS that have a space

Affected builder image

gcr.io/cloud-builders-community/remote-builder

Expected Behavior

It can accept an INSTANCE_ARGUMENT with a space such as "--min-cpu-platform=Intel Haswell"

Actual Behavior

The Space in the argument causes the create command to break.

Steps to Reproduce the Problem

1.Supply a --min-cpu-platform=Intel Haswell to the remote builder as an INSTANCE_ARGUMENT.
2.Supply a --min-cpu-platform='Intel Haswell' to the remote builder as an INSTANCE_ARGUMENT.
3.Supply a --min-cpu-platform="Intel Haswell" to the remote builder as an INSTANCE_ARGUMENT.

Each fails with something like:

- Invalid value for field 'resource.minCpuPlatform': '"Intel'. Invalid CPU platform.
- Invalid value for field 'resource.name': 'Haswell"'. Must be a match of regex '(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)'

Additional Info

Android Builder Overwrites Artifacts

In the Android simple-cloudbuild.yaml, the example writes the the output to a fixed path based on project, branch, and git commit. If a build is run more than once on the same commit, the build outputs will be overwritten.

By adding the $BUILD_ID to the output path, the artifacts from previous invocations of the same build would be preserved.

Line ending problem when using windows for helm

When following the helm/README.md, I'm getting the following error when using could build during building:
standard_init_linux.go:195: exec user process caused "no such file or directory"

This is due to the produced docker image not being correct.
After investigation, this appears to be a line ending issue.

When converting line endings of all files from a windows line-ending (\r\n) to unix line ending (\n) before calling the gcloud builds submit command, a working image is obtained.

I'm not sure what a correct approach would be to correct this problem, since line endings seem to be dependent on the local git config.

At the very least, this could be mentioned in the helm/README.md

I haven't checked, but the same issue could be present in other community builders.

kaniko: failed to find one or more images after execution of build steps

Affected builder image

gcr.io/cloud-builders-community/kaniko

Expected Behavior

When building images with kaniko in cloudbuild.yaml the images should be found at the end of the build.

cloudbuild.yaml

steps:
  # Build image and push to gcr with kaniko
  - name: gcr.io/kaniko-project/executor:latest
    args: [
      "--context=/workspace/api",
      "--destination=gcr.io/<$PROJECT_ID>/api:latest",
      "--destination=gcr.io/<$PROJECT_ID>/api:$SHORT_SHA",
      "--cache=true",
      ]

# List built images in cloudbuild history
images:
  - "gcr.io/<$PROJECT_ID>/api:$SHORT_SHA"
  - "gcr.io/<$PROJECT_ID>/api:latest"

tags: ["$BRANCH_NAME"]

Actual Behavior

The images have been pushed to Container Registry and can be deployed via kubectl.

The cloudbuild fails with error that images cannot be found:

ERROR: failed to find one or more images after execution of build steps: 
["gcr.io/<$PROJECT_ID>/api:a4a36cd", "gcr.io/<$PROJECT_ID>/api:latest"]

Steps to Reproduce the Problem

  1. Use the kaniko-project/executor builder in cloudbuild.yaml
  2. Add images section to cloudbuild.yaml that verifies / pushes the images
  3. Trigger build

Additional Info

We're currently using docker to build our containers and wanted to give kaniko a shot, it compiles much faster ๐ŸŽ‰ but it seems there is a mismatch how the images section is handled when images are not being built by docker.

firebase - build fails

When submitting builds, following error is displayed.

ERROR: (gcloud.builds.submit) INVALID_ARGUMENT: invalid build: invalid .secrets field: secretEnv "FIREBASE_TOKEN" is used without being defined

secretEnv: ['FIREBASE_TOKEN'] is not required in cloudbuild.yaml
I will make PR.

Kustomize:latest not found

When trying to use this image, using both gcr.io/cloud-builders/kustomize as well as gcr.io//gcloud (which is stated to use in the docs) results in no available images for Kustomize. Have the images been pulled?

Affected builder image

(e.g., gcr.io/cloud-builders-community/helm)

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

Additional Info

rocker builder is broken

Starting Step #2
Step #2: Already have image: gcr.io/community-builders/rocker
Step #2: rocker version built locally - none (none) none
Finished Step #2
Starting Step #3
Step #3: Already have image: gcr.io/community-builders/rocker
Step #3: INFO[0000] FROM gcr.io/cloud-builders/docker 
Step #3: INFO[0000] | Image sha256:15ada size=463.1 MB
Step #3: INFO[0000] COPY ./bin/rocker /usr/bin/rocker 
Step #3: INFO[0000] | Calculating tarsum for 1 files (14.58 MB total) 
Step #3: FATA[0000] archive/tar: missed writing 4120 bytes 
Finished Step #3
ERROR
ERROR: build step 3 "gcr.io/community-builders/rocker" failed: exit status 1

Container-Diff Diff

Affected builder image

gcr.io/cloud-builders-community/container-diff

Expected Behavior

gcloud builds submit . --config=cloudbuild.yaml creates the container-diff container

Actual Behavior

Nested errors

Steps to Reproduce the Problem

  1. git clone https://github.com/GoogleCloudPlatform/cloud-builders-community.git
  2. cd cloud-builders-community/container-diff
  3. gcloud builds submit . --config=cloudbuild.yaml

Additional Info

It appears that the Bazel configuration is simply out of date as some of the syntax and targets don't seem to be current.

Remote-builder SSH Using OS Login Instead of Default User

When trying to use remote-builder I noticed that after Thursday(01/31/2019) I started getting this error in my builds.

The builder would create the VM and then try to connect with ssh and would get a warning that WARNING: Using OS Login user [<user_name>] instead of default user [${USERNAME}]. From what I can tell the first username is the username for the google build account and the second one is the one that I tried to get it to use with the USERNAME environment variable. This issue seems to start on 02/01/2019 according to my cloud build logs.

Scala-sbt builder needs care

If someone's interested in a Scala builder for Cloud Build, let's get in touch.

There are multiple problems with the current one, the biggest maybe that it fails to load in the libraries that make sbt and Scala (it's kind of the beef, right?).

I had a go at my own approach, but it needs some testing. You can find it here: https://github.com/akauppi/sbt-scala-builder

Thanks for the help.

Terraform builds from sub dirs

Hi,

I am exploring using cloudbuild for building out terraform infra but was wanting to ask for help what appears to be a simple request.

My .tf files are in sub directories within the checkout source code from github - in order to do a terraform init, I need to 'cd' (docker WORKDIR) to a sub directory before executing a specific terraform command.

Is there a basic cloudbuild 'step' for this Im missing to do this before executing an actual terraform command? Im not a docker expert (far from it!) so any help for a newbie appreciated.

Thanks!

Question about docker compose build

If docker-compose build step is used to create and detach a composed YAML how do I access the containers in next step. E.g. I create a "webserver" container and expose port 80 of the container -> localhost. However in the next "ubuntu" build step I cannot access this container e.g. both localhost:8000 and webserver:80 don't work.

The NPM integration test example makes it seem as if the containers created from previous compose step should be accessible next steps. But since each step runs in a "container" do I need to explicitly forward the host/port ?

Docker compose failing

running gcr.io/$PROJECT_ID/docker-compose in cloud build step fails

ERROR: build step 2 "docker/compose" failed: error pulling build step 2 "docker/compose": exit status 1
ERROR
ERROR: failed to pull because we ran out of retries.```

Firebase: Example doesn't work due to underscore in variable name

The current firebase builder example doesn't work because of the underscore in FIREBASE_TOKEN, due to GoogleCloudPlatform/cloud-builders#413

It currently fails with ERROR: (gcloud.builds.submit) INVALID_ARGUMENT: invalid build: invalid .secrets field: secretEnv "FIREBASE_TOKEN" is used without being defined

A work-around is to use sentence case for the part of the variable after the underscore. Here's what the example would look like:

steps:
- name: 'gcr.io/valr-ci/firebase'
  entrypoint: /bin/bash
  args: ['-c', 'firebase list --token $$FIREBASEToken']
  secretEnv: ['FIREBASEToken']
secrets:
- kmsKeyName: 'projects/[PROJECT_ID]/locations/global/keyRings/cloudbuilder/cryptoKeys/firebase-token'
  secretEnv:
    FIREBASE_TOKEN: '<ENCRYPTED_TOKEN>'

$ gcloud --version
Google Cloud SDK 224.0.0
bq 2.0.36
core 2018.11.02
gsutil 4.34

cc @petomalina @imjasonh

sonarqube with sonarcloud.io

Affected builder image

gcr.io/cloud-builders-community/sonarqube

Expected Behavior

successful build

Actual Behavior

Step #2: START: Running sonar-scanner-cli on Tue Mar 19 20:26:02 UTC 2019
Step #2: INFO: Scanner configuration file: /opt/sonar-scanner-3.2.0.1227-linux/conf/sonar-scanner.properties
Step #2: INFO: Project root configuration file: NONE
Step #2: INFO: SonarQube Scanner 3.2.0.1227
Step #2: INFO: Java 1.8.0_201 Oracle Corporation (64-bit)
Step #2: INFO: Linux 4.15.0-1028-gcp amd64
Step #2: INFO: User cache: /root/.sonar/cache
Step #2: INFO: ------------------------------------------------------------------------
Step #2: INFO: EXECUTION FAILURE
Step #2: INFO: ------------------------------------------------------------------------
Step #2: INFO: Total time: 1.148s
Step #2: INFO: Final Memory: 4M/56M
Step #2: INFO: ------------------------------------------------------------------------
Step #2: ERROR: Error during SonarQube Scanner execution
Step #2: ERROR: null
Step #2: ERROR: Caused by: Could not initialize NSS
Step #2: ERROR: Caused by: /usr/lib/libnss3.so
Step #2: ERROR: 
Step #2: ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

Steps to Reproduce the Problem

  1. build image from source
  2. add build step to cloudbuilder
  3. run with the following options
  - name: "gcr.io/my-project/sonar-scanner:latest"
    args:
      - '-Dsonar.projectKey={projectKey}'
      - '-Dsonar.organization={organization}'
      - '-Dsonar.sources=src'
      - '-Dsonar.host.url=https://sonarcloud.io'
      - '-Dsonar.login={token}'
      - '-Dsonar.exclusions=node_modules/**'
      - '-Dsonar.typescript.lcov.reportPaths=coverage/lcov.info'
      - '-Dsonar.coverage.exclusions=src/**/*.spec.ts'
    dir: "functions"

Additional Info

This works if I run from my local computer, just fails in cloudbuilder

firebase - permission error

I'm trying to run the firebase cloud-builder however I get this error when it tries to run the step.

Step #1: docker: Error response from daemon: OCI runtime create failed: container_linux.go:296: starting container process caused "exec: "/firebase.bash": permission denied": unknown.

Any ideas or workarounds?

thanks,
--mike

Firebase deploy fails

Affected builder image

gcr.io/cloud-builders-community/helm

Expected Behavior

  • Deploy complete!

Actual Behavior

Pulling image: gcr.io/$PROJECT_ID/firebase
Using default tag: latest
latest: Pulling from $PROJECT_ID/firebase
e79bb959ec00: Already exists
d4b7902036fe: Already exists
1b2a72d4e030: Already exists
d54db43011fd: Already exists
69d473365bb3: Already exists
6e2490ee2dc8: Already exists
a379571b1bfc: Already exists
7b9a41966503: Already exists
f4b1c42f5c2b: Pulling fs layer
17b0c2359212: Pulling fs layer
715c6ee9925e: Pulling fs layer
17b0c2359212: Verifying Checksum
17b0c2359212: Download complete
715c6ee9925e: Verifying Checksum
715c6ee9925e: Download complete
f4b1c42f5c2b: Verifying Checksum
f4b1c42f5c2b: Download complete
f4b1c42f5c2b: Pull complete
17b0c2359212: Pull complete
715c6ee9925e: Pull complete
Digest: sha256:6445a29e9a3a5095e0ce7f01246d99a64d7942c911ef350ea7a7ee4906319617
Status: Downloaded newer image for gcr.io/$PROJECT_ID/firebase:latest
standard_init_linux.go:190: exec user process caused "no such file or directory"

Steps to Reproduce the Problem

  1. Build Docker image as documented
  2. Submit build via Google Cloud Build
  3. Build fails at final step as above

Additional Info

I have replaced the name of my actual project above with $PROJECT_ID.
Running firebase deploy from my laptop works.
Cloudbuild.yaml below
steps:

Install

  • name: 'gcr.io/cloud-builders/npm'
    args: ['install']

Build

  • name: 'gcr.io/cloud-builders/npm'
    args: ['run', 'build', '--prod']

Deploy

  • name: 'gcr.io/$PROJECT_ID/firebase'
    args: ['deploy']

remote-builder doesn't share info in volumes

As I understand cloud-build use "workspace" directory as a volume, but when I download files and save it into this folder them doesn't exist on next steps. Could you please take a look at this?

Android Builder Should Use Gradle Wrapper

In the Android gradle-build script, the script is using gradle when the best practice is to use the gradle wrapper gradlew.

The version of gradle being installed by the Dockerfile is version 4.4 which won't work with the latest version of the Android Gradle plugin. Using gradlew avoids the need to keep updating the Dockerfile.

Caching should still be fine, as the gradle download ends up in the directory that is already being cached.

kustomize:latest not found

Affected builder image

(e.g., gcr.io/cloud-builders-community/helm)

Expected Behavior

The image pulls down and is available for use on Cloud Build

Actual Behavior

When trying to use this image, using both gcr.io/cloud-builders/kustomize as well as gcr.io//kustomize (which is stated to use in the docs) results in no available images for Kustomize.

Steps to Reproduce the Problem

  1. Use either gcr.io/cloud-builders/kustomize
  2. or gcr.io//kustomize as a image for cloudbuild to utilize

Additional Info

Were the images pulled? There's none available?

Hugo builder fails to get latest version of Hugo

Configuring the hugo builder as per the readme...

steps:
- name: 'gcr.io/$PROJECT_ID/hugo'

gives the following error on google cloud build:

Pulling image: gcr.io/<project-id>/hugo
Using default tag: latest
Error response from daemon: manifest for gcr.io/<project-id>/hugo:latest not found

where is my project Id.

Android Builder- Update SDK manager and install system image need to run using yes command to accept license

I was following the guide for building an android image with sdk version 28.
apply the following command

gcloud builds submit --config=cloudbuild.yaml --substitutions=_ANDROID_VERSION=28
yelided the following errors

Step #0: Accept? (y/N): Skipping following packages as the license is not accepted:
Step #0: SDK Patch Applier v4
Step #0: Android SDK Platform-Tools
Step #0: Android SDK Build-Tools 28.0.3
Step #0: The following packages can not be installed since their licenses or those of the packages they depend on were not accepted:
Step #0:   build-tools;28.0.3
Step #0:   patcher;v4
Step #0:   platform-tools
Step #0:   extras;google;m2repository
Step #0:   extras;google;google_play_services
ERROR: (gcloud.builds.submit) build ${BUILD_ID} completed with status "FAILURE"

after investaging the issue was in the Dockerfile-base in runing the following step

RUN sdkmanager \
    "tools" \
    "platform-tools" \
    "extras;android;m2repository" \
    "extras;google;m2repository" \
    "extras;google;google_play_services" \
    "build-tools;28.0.3"

changing the step to

RUN yes | sdkmanager \
    "tools" \
    "platform-tools" \
    "extras;android;m2repository" \
    "extras;google;m2repository" \
    "extras;google;google_play_services" \
    "build-tools;28.0.3"

fixed the issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.