#codefresh - March 2020

Harrison Heck
Harrison Heckover 6 years ago
I’m trying to build 2 images. The second one depends on the first one. I’m trying to pass NGINX_IMAGE=${{build_nginx}} as a build argument, but the value comes in blank.
Is there something that I’m missing here, or do I have to construct the image name myself (which I would prefer to avoid).
dustinvb
dustinvbover 6 years ago
That's a special sha that is understood by the pipeline and not something that would work outside our our image: construct.
Let me look into a couple things and come back to you on this Harrison.
Harrison Heck
Harrison Heckover 6 years ago
Thanks.
Harrison Heck
Harrison Heckover 6 years ago
I would think it should work for anything though, because really it should just represent the image name.
dustinvb
dustinvbover 6 years ago
Here is the variable you are likely looking for but even that will possibly need some modifications ${{build_nginx.imageId}}
Harrison Heck
Harrison Heckover 6 years ago
Gotcha, I will give it a shot.
dustinvb
dustinvbover 6 years ago
That at least prints image information. I am looking over some other details.
Harrison Heck
Harrison Heckover 6 years ago
That link doesn’t work but I am giving this a shot myself
dustinvb
dustinvbover 6 years ago
Sorry Slack just made it a link...
dustinvb
dustinvbover 6 years ago
It's the output of the imageId from one of my builds.
Harrison Heck
Harrison Heckover 6 years ago
Oh I gotcha.
Harrison Heck
Harrison Heckover 6 years ago
I would think that should work. Thanks for the quick answer. The pipeline is running right now.
dustinvb
dustinvbover 6 years ago
Here is the tag example.

Executing command: echo ${{BuildTestDockerImage.tag}}             
master-a6a1d3f                           
Harrison Heck
Harrison Heckover 6 years ago
Oddly this did not work. I must have done something wrong.
Harrison Heck
Harrison Heckover 6 years ago
Oh, the change didn’t push for some reason, that’s why
dustinvb
dustinvbover 6 years ago
Not necessarily. Like I said that SHA is something internal to us.
dustinvb
dustinvbover 6 years ago
I am checking the name as well so you can concat the two
dustinvb
dustinvbover 6 years ago
Executing command: echo ${{BuildTestDockerImage.imageName}}                                  
dustinvanbuskirk/rails-app-with-knapsack_pro-test  
Harrison Heck
Harrison Heckover 6 years ago
It did push, I just forgot I had this in 2 spots, so I’m trying again
dustinvb
dustinvbover 6 years ago(edited)
You might need to do NGINX_IMAGE=${{build_nginx.imageName}}:${{build_nginx.tag}}
dustinvb
dustinvbover 6 years ago
Okay, hopefully this helps. Ping me using @dustinvb if this doesn't get you where you need to be.
Harrison Heck
Harrison Heckover 6 years ago
What’s weird is I am getting invalid reference format: repository name must be lowercase with both ways of doing it.
dustinvb
dustinvbover 6 years ago
That is a little bizarre maybe with the second name we need repo information.
Harrison Heck
Harrison Heckover 6 years ago
I’m running it again with a step to output what the value is for debug purposes.
Harrison Heck
Harrison Heckover 6 years ago
<http://r.cfcr.io/linioit/shop-front-nginx@sha256:d19c2542673f9c191cdc66a43960052e4a65ad3b00718c69776778840d428d46|r.cfcr.io/linioit/shop-front-nginx@sha256:d19c2542673f9c191cdc66a43960052e4a65ad3b00718c69776778840d428d46> was the value
Harrison Heck
Harrison Heckover 6 years ago
So this is weird
Harrison Heck
Harrison Heckover 6 years ago
It works when I do it locally. Could it be the version of docker being used by venona?
dustinvb
dustinvbover 6 years ago
That should be 18.09 last I checked. I assume the node Docker is the same or newer.
Harrison Heck
Harrison Heckover 6 years ago
I would imagine so. We’re on GKE 15
Harrison Heck
Harrison Heckover 6 years ago
Could CF be passing the value in caps for some reason?
dustinvb
dustinvbover 6 years ago
You Dockerfile, if the first like FROM: ? or the Build Arg?
dustinvb
dustinvbover 6 years ago
No it shouldn't be doing that. I printed using echo those vars in my step. They were all lower case. The build arg should not change that case.
Harrison Heck
Harrison Heckover 6 years ago
ARG NGINX_IMAGE=<http://gcr.io/linio-support/shop-front-nginx:latest|gcr.io/linio-support/shop-front-nginx:latest>
FROM $NGINX_IMAGE AS ASSETS
Harrison Heck
Harrison Heckover 6 years ago
build_arguments:
      - NGINX_IMAGE=<http://r.cfcr.io/linioit/shop-front-nginx@sha256:d19c2542673f9c191cdc66a43960052e4a65ad3b00718c69776778840d428d46|r.cfcr.io/linioit/shop-front-nginx@sha256:d19c2542673f9c191cdc66a43960052e4a65ad3b00718c69776778840d428d46>

This worked
Harrison Heck
Harrison Heckover 6 years ago
So it is 100% CF messing up the value when passing it in
dustinvb
dustinvbover 6 years ago
Can you open a Zendesk that includes the Build ID of the build with the error about capitalization so we can both review the YAML and see the error?
Harrison Heck
Harrison Heckover 6 years ago
Yeah.
dustinvb
dustinvbover 6 years ago
Can you also share the build id with me over DM here so I can just quickly peek into the YAML?
Harrison Heck
Harrison Heckover 6 years ago
Sure, one second
dustinvb
dustinvbover 6 years ago
Thanks, I recreated and will update ticket here soon.

In the meantime can you try this as a workaround, let me know if you have better results by using a direct variable instead of the metadata in the build_arguments.

  ExportVar:
    image: alpine
    commands:
      - cf_export NGINX_IMAGE='${{BaseImage.imageId}}'
  BuildArg:
    title: 'Build image: php-test'
    stage: build
    type: build
    image_name: '${{CF_REPO_NAME}}-php-test'
    dockerfile: Dockerfile
    build_arguments:
      - GITHUB_TOKEN=${{GITHUB_TOKEN}}
      - NGINX_IMAGE=${{NGINX_IMAGE}}
    tag: '${{CF_SHORT_REVISION}}'
btai
btaiover 6 years ago
Is it possible in codefresh to authenticate before a docker build using the builtin build step?

I have a Dockerfile that uses a private image as a base image i.e.
FROM private/image/repo:v1.1.1

I’d like to be able to authenticate (docker login) for the build. I know I can do this in a freestyle step but I’d like to know if i can with the builtin build step.
rss
rssover 6 years ago
Helm quick start guide for Helm 3 - documentation ()
(Feed generated with FetchRSS)
rss
rssover 6 years ago
Helm 3 recommended labels - documentation ()
(Feed generated with FetchRSS)
rss
rssover 6 years ago
Helm 3 release dashboard - documentation ()
(Feed generated with FetchRSS)
rss
rssover 6 years ago
Deployment example for Helm 3 - documentation ()
(Feed generated with FetchRSS)
Alex Siegman
Alex Siegmanover 6 years ago
If you're relying on the internal codefresh registry a lot (and I definitely am) you've got your work cut out for you:

https://codefresh.io/codefresh-news/deprecation-of-the-codefresh-private-registry/
Alex Siegman
Alex Siegmanover 6 years ago(edited)
1.5 month notice to change your repos
btai
btaiover 6 years ago
disappointing they would give such a short period of time
Alex Siegman
Alex Siegmanover 6 years ago
Also, no real way to see your usage of it and be able to validate you've actually migrated your stuff off of it
Pierre Humberdroz
Pierre Humberdrozover 6 years ago
I am also using it for one of my private projects kinda sucks.
joshmyers
joshmyersover 6 years ago
Better the devil you know…. 😕
Vidhya Vijayakumar
Vidhya Vijayakumarover 6 years ago
Hi there: I wanted to update this channel here that we got an extension from our partner to keep CFCR active for longer
Vidhya Vijayakumar
Vidhya Vijayakumarover 6 years ago
We are finalizing the dates now and will announce. But we have at least until July for now
Vidhya Vijayakumar
Vidhya Vijayakumarover 6 years ago
Thank you for your patience with us while we go through this.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 6 years ago
Thanks @Vidhya Vijayakumar for the update
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 6 years ago
@Vidhya Vijayakumar will codefresh provide a way to test or validate that a pipeline is not affected?
Vidhya Vijayakumar
Vidhya Vijayakumarover 6 years ago
We are working on a migration guide to help everyone. I have requested this already with our team. But, it may not be in the first document released
Vidhya Vijayakumar
Vidhya Vijayakumarover 6 years ago
We will definitely push updates
Harrison Heck
Harrison Heckover 6 years ago
@Vidhya Vijayakumar Did something change with the ${{build.imageId}} today? Because our builds have started failing. It no longer outputs the repository.
Harrison Heck
Harrison Heckover 6 years ago
Previous: r.cfcr.io/linioit/shop-front-nginx@sha256:a424b6cf529d897f35ea172ca502ba9ebb4e4ab6bdf6aac9c0314508c14782ff
Current: sha256:b9fa6fd9b0724f8b26da274e36c58886aabd37eb69fd7c3ba0b7678a169121cb
rss
rssover 6 years ago
Environment board now supports Helm 3 - documentation ()
(Feed generated with FetchRSS)
Alex Siegman
Alex Siegmanover 6 years ago
Before I open a ticket, was hoping someone might have some insight on this error I'm getting. This is during the first step of my pipeline when pulling the Docker image to run the step with:
failed to register layer: Error processing tar file(exit status 1): write /var/lib/helm/cache/plugins/https-github.com-mstrzele-helm-edit/vendor/git
<http://hub.com/gobwas/glob/glob_test.go|hub.com/gobwas/glob/glob_test.go>: no space left on device      

I'm assuming there is some cleanup that isn't happening and I've filled the mounted volume that exists within each codefresh pipeline, but not sure best route to handle that. Unfortunately, a few of my images are rather large, around 1GB, and so are some of my git repos. I just started running in to this though on pipelines that have been working, so I'm wondering if there is some docker build cache that's not being cleaned up or something.
Harrison Heck
Harrison Heckover 6 years ago
It looks like the 1.x version of venona was released, but I don’t see any documentation on upgrading. Nor do I see any way to install this with regular manifests or a helm chart (preferable)
rss
rssover 6 years ago
Removal of the Codefresh registry - documentation ()
(Feed generated with FetchRSS)
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 6 years ago
Adding @U010XGY9B46 bot