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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
27 changes: 27 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,31 @@ steps:
waitFor:
- tag-webhook


- id: clone-ubbagent
name: gcr.io/cloud-builders/gcloud
entrypoint: bash
args:
- -exc
- git clone https://github.com/GoogleCloudPlatform/ubbagent --branch 0.0.1
waitFor: ["-"]

- id: build-ubbagent
name: gcr.io/cloud-builders/docker
args:
- build
- --tag
- gcr.io/$PROJECT_ID/${_SOLUTION_NAME}/ubbagent:${_APP_VERSION}
- "./ubbagent"
waitFor: ["clone-ubbagent"]

- id: push-ubbagent
name: gcr.io/cloud-builders/docker
args:
- push
- gcr.io/$PROJECT_ID/${_SOLUTION_NAME}/ubbagent:${_APP_VERSION}
waitFor: ["build-ubbagent"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wondered if these commands could all be executed in a single step, assuming that the gcr.io/cloud-builders/gcloud has the docker cli tools.
It might simplify the (already rather long) cloud-build.yaml.

But happy for this to be merged now, if you prefer it this way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And another question is whether we can pull / tag and push an existing image, rather than building from scratch?
Or even whether we need to pull and push this image, if by chance it is already hosted on the marketplace gcr registry.
These are just idle thoughts. Ignore them if you want to just get this merged.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, i would be happy to justn one single step instead of scattering in 3 different steps

Copy link
Member Author

@maelvls maelvls Feb 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And another question is whether we can pull / tag and push an existing image, rather than building from scratch?

I was unable to find a blessed image on gcr.io unfortunately, I searched everywhere but could not find anything :(

Copy link
Member Author

@maelvls maelvls Feb 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the gcloud doesnt have docker 😞

Step #12 - "build-ubbagent": + git clone https://github.com/GoogleCloudPlatform/ubbagent --branch 0.0.1
Step #12 - "build-ubbagent": + docker build --tag gcr.io/jetstack-mael-valais/cert-manager/ubbagent:1.1.0 ./ubbagent
Step #12 - "build-ubbagent": bash: line 1: docker: command not found


- id: build-deployer
name: gcr.io/cloud-builders/docker
args:
Expand Down Expand Up @@ -192,6 +217,7 @@ steps:
- push-cainjector
- push-webhook
- push-cas-issuer
- push-ubbagent

- id: publish
name: gcr.io/cloud-marketplace-tools/k8s/dev
Expand All @@ -213,3 +239,4 @@ images:
- gcr.io/$PROJECT_ID/${_SOLUTION_NAME}/cert-manager-webhook:${_APP_VERSION}
- gcr.io/$PROJECT_ID/${_SOLUTION_NAME}/cert-manager-google-cas-issuer:${_APP_VERSION}
- gcr.io/$PROJECT_ID/${_SOLUTION_NAME}/deployer:${_APP_VERSION}
- gcr.io/$PROJECT_ID/${_SOLUTION_NAME}/ubbagent:${_APP_VERSION}