#codefresh (2019-10)
Archive: https://archive.sweetops.com/codefresh/
2019-10-01
Anyone else out there having issues with pushing images to AWS ECR? Codefresh support has gone dark and all my pipelines now fail to push to AWS ECR.
As if there’s an outage, I don’t think so, i’ve successfully pushed a few to ECRs in us-east-1 in the last hour or so
thanks… my pipelines push to us-west-2. All of them are failing including ones that worked before
are you using the integrated registries or
provider: ecr
Has anyone seen issues with codefresh variables interpolating with the build step?
stage: build-images
type: build
title: Build Api Image
description: build api image
working_directory: '${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}}'
dockerfile: '${{dockerfile}}'
image_name: '${{image_name}}'
tag: '${{vtag}}-${{CF_PULL_REQUEST_NUMBER}}'
I am getting a scenario where the build step fails on subsequent commits to the feature branch and will not interpolate the ${{CF_PULL_REQUEST_NUMBER}} at run time.
I get the following at build time:
Building image: my_image_name:0.1.0-${{cf_pull_request_number}} using unique hash: 6903d14a13db6d2cef7a7134925ea0f68468bd00
That variable is only populated when pipeline is triggered by a Pr webhook
Are you running it manually by any Chance?
2019-10-02
yes, i have been running automatically and manually. The manual iterations appear to be the iterations that fail. I have had to run the pipeline manually at times, since I have been experiencing intermittent Push step failures to AWS ECR. It is unfortunate that this attribute of the variable is not documented. https://codefresh.io/docs/docs/codefresh-yaml/variables/
Codefresh is a Docker-native CI/CD platform. Instantly build , test and deploy Docker images.
@here public #office-hours starting now! join us to talk shop https://zoom.us/j/508587304
2019-10-04
@Michael Kolb … I just had the same issue with variables in manual pipelines. It happens because the CodeFresh environment variables are left undefined. The key is to override the variables in the ‘options’ passed to the run
if (servicePipelineMap.has(key)) {
const { pipeline, trigger } = servicePipelineMap.get(key)
const data = {
trigger,
sha,
branch: targetBranch,
variables: {
CF_PULL_REQUEST_ID: id,
CF_PULL_REQUEST_NUMBER: number,
CF_BRANCH: targetBranch,
CF_BASE_BRANCH: prBranch,
CF_PULL_REQUEST_TARGET: targetBranch,
CF_COMMIT_AUTHOR: user.login,
},
}
app.log(data.variables)
const workflowId = await sdk.pipelines.run({ name: pipeline }, data)
app.log(
`${pipeline} triggered a pipeline with id ${workflowId} on PR ${number} to ${ref}`
)
} else {
app.log(`There is no pipeline associated with this service`)
}
@Michael Kolb this is with the codefresh js sdk?
Contribute to codefresh-io/js-sdk development by creating an account on GitHub.
They need to do a sprint or two on properly documenting their API/SDK. The swagger doc is not very helpful as it lacks example responses. The CLI is much more reliable and is entirely based off the SDK. The SDK is powerful but lacks documentation. The only way I was able to not be blocked was by forking the CLI and reading the source code…
Contribute to codefresh-io/js-sdk development by creating an account on GitHub.
Yes @Erik Osterman (Cloud Posse) Being as I need to manually trigger pipelines outside of CodeFresh I found the JS-SDK to be the easiest to work with. They should make a point of featuring it.
@Kostis (Codefresh) Can you add this to our documentation backlog to document our JS and GO SDK?
I found it only by going through their github org
2019-10-07
@mfrohberg Thanks for the sharing the information
Anyone else having issues with support response times from [email protected]?
I regularly have multiple days go by on seemingly simple tickets. I’ve only put a handful in. Luckily nothing has been an outage incident, but it took something like 2 weeks to get a “it doesn’t work that way here’s a link to relevant documentation” which is not service I could brag about or recommend. I’m hoping my first few tickets have been a fluke though.
@Michael Kolb what is the issue?
@Oleg Sucharevich I have a technical issue with image push to ECR that is outstanding now for over 2 days with multiple emails threads
From the logging that i get the pipeline is not finding the image in r.cfcr.io/navican/ from the candidate that is built. The sha256 references are not matching up
Can you please send me the build id?
Will escalate it
Thanks!
@Oleg Sucharevich Thanks for the help
Sure
2019-10-08
Has anyone integration CodeFresh with DataDog? This way we can see all of the events there and create monitors from it? For example, we were using this to create an alert that got sent to OpsGenie whenever our infrastructure repo failed.
You can try this. Not certain it is what you’re looking for but it’s what I have on hand.
SendDatadogEvent:
title: Sending Datadog Event
image: concourse/datadog-event-resource:latest
commands:
- >-
echo '
{
"source": {
"application_key": "${{DATADOG_APPLICATION_KEY}}",
"api_key": "${{DATADOG_API_KEY}}",
"filter": ""
},
"params": {
"title": "${{CF_REPO_NAME}}",
"text": "${{CF_BUILD_URL}}",
"priority": "low",
"alert_type": "success",
"host": "<https://g.codefresh.io>",
"aggregation_key": "${{CF_BUILD_ID}}",
"source_type": "codefresh",
"tags": [
"codefresh"
]
}
}' | /opt/resource/out ./event.json
Perfect, I can adapt that as needed. Hopefully one day there is native integration.
2019-10-09
https://community.codefresh.io/ launched! that’s nice
The official Codefresh Community Forums
2019-10-10
Codefresh still does not support limiting pipeline concurrency?
If I wanted to only ever have 1 instance of pipeline running, and all others to queue - this is still only done by a step with codefresh cli script?
I think there’s an option to cancel previous build
but not limit concurrency
@dustinvb did this change?
This is found under the pipeline SETTINGS
-> POLICIES
tab.
2019-10-11
can I set this from within codefresh.yml?
Yes, under the spec section of the pipeline.
spec:
terminationPolicy:
- type: branch
event: onCreate
ignoreBranch: true
concurrency: 1
triggerConcurrency: 1
externalResources: []
Looks like our spec examples need to be updated. Will put in that request now.
what happens to the other builds if I set concurrency: 1
? do they get queued or do they get terminated?
They are queued.
Then you set a termination policy that enforces the behavior selected when they get scheduled to run.
this is great!
@Igor Rodionov @Andriy Knysh (Cloud Posse) @Jeremy G (Cloud Posse)
@Alex Siegman
we should drop the check for concurrency and just use this.
yea that’s good
But @Erik Osterman (Cloud Posse) aren’t we generally testing for concurrency of a build in a different pipeline?
no
same pipeline
I’m thinking we check to make sure all PR build/deploys are finished before running destroy. That’s the only concurrency check that comes to mind.
we check if the same pipeline is running and wait if it is
2019-10-15
Docker Hub Incident Oct 15, 17:24 UTC Update - More information here:
- https://status.docker.com/pages/incident/533c6539221ae15e3f000031/5da5fc78c7b1c11cd8603721
- https://status.docker.com/Oct 15, 17:19 UTC Update - More information here:
- https://status.docker.com/pages/incident/533c6539221ae15e3f000031/5da5fc78c7b1c11cd8603721
- https://status.docker.com/Oct 15, 17:19 UTC Identified - Docker Hub has reported an incident: Affected Components: Docker Hub Web, Docker Hub Registry, Docker Hub Automated…
Codefresh’s Status Page - Docker Hub Incident.
Our system status page is a real-time view of the performance and uptime of Docker products and services.
Docker Hub Incident Oct 15, 18:07 UTC Resolved - Docker Hub has reported that the affected services are operational again.Oct 15, 17:24 UTC Update - More information here:
- https://status.docker.com/pages/incident/533c6539221ae15e3f000031/5da5fc78c7b1c11cd8603721
- https://status.docker.com/Oct 15, 17:19 UTC Update - More information here:
- https://status.docker.com/pages/incident/533c6539221ae15e3f000031/5da5fc78c7b1c11cd8603721
- https://status.docker.com/Oct 15, 17:19 UTC Identified - Docker Hub has…
Anyone know how to have cf_export
not actually echo the value? Not sure why it does this.
@Harrison Heck you can write directly to the underlying file https://codefresh.io/docs/docs/codefresh-yaml/variables/#directly-writing-to-the-file
Codefresh is a Docker-native CI/CD platform. Instantly build , test and deploy Docker images.
That’s it though huh? I’m not sure why cf_export
echos the value by default anyways, it’s a security risk.
Having to echo to the file is not the best experience.
Docker Hub has reported an ongoing incident Oct 15, 19:43 UTC Investigating - Docker Hub has reported an ongoing incident
This could affect your Codefresh builds.
More information here: https://status.docker.com/pages/incident/533c6539221ae15e3f000031/5da5fc78c7b1c11cd8603721
Codefresh’s Status Page - Docker Hub has reported an ongoing incident.
Our system status page is a real-time view of the performance and uptime of Docker products and services.
Docker Hub has reported an ongoing incident Oct 15, 20:59 UTC Monitoring - From DokerHub: [Monitoring] Docker hub web login is working again. We will continue to monitor the situation.
More information here: https://status.docker.com/pages/incident/533c6539221ae15e3f000031/5da5fc78c7b1c11cd8603721Oct 15, 19:43 UTC Investigating - Docker Hub has reported an ongoing incident
This could affect your Codefresh builds.
More information here: https://status.docker.com/pages/incident/533c6539221ae15e3f000031/5da5fc78c7b1c11cd8603721
Codefresh’s Status Page - Docker Hub has reported an ongoing incident.
Our system status page is a real-time view of the performance and uptime of Docker products and services.
Docker Hub has reported an ongoing incident Oct 15, 22:32 UTC Resolved - From DockerHub:
All Systems OperationalUpdated a few seconds ago Our system status page is a real-time view of the performance and uptime of Docker products and services.
More information here: https://status.docker.comOct 15, 20:59 UTC Monitoring - From DokerHub: [Monitoring] Docker hub web login is working again. We will continue to monitor the situation.
More information here:…
Codefresh’s Status Page - Docker Hub has reported an ongoing incident.
2019-10-16
Docker Hub has reported an ongoing incident Oct 16, 15:41 UTC Investigating - This could affect your Codefresh builds.
More information here: https://status.docker.com/pages/incident/533c6539221ae15e3f000031/5da5fc78c7b1c11cd8603721
Codefresh’s Status Page - Docker Hub has reported an ongoing incident.
Our system status page is a real-time view of the performance and uptime of Docker products and services.
codefresh users, do you use a single github CI user token to add triggers on all pipelines? have you found a more secure way of doing this that is still maintainable
One thing to consider is introducing a gitops style workflow for adding pipelines.
Basically, make everyone a ‘user’ in codefresh with no specific permissions
cerate the github CI integration with trigger admin permissions
then use PR review/approval process to rollout the pipelines using the codefresh
cli
Anyone set up Codefresh with GSuite SAML custom app for SSO? I did so a couple days ago and can’t get it to work, and it’s been 2 days with no response from support =/ . I followed their docs, and when I try to sync team, I get a BAD REQUEST response code. Just want to make sure I lined up the right properties in the right places.
@Alex Siegman can you send me the ticket number please ?
looking for help in escaping yaml… need to run ~this in Codefresh pipeline:
commands:
- kubectl run --env ...
and the env variable is:
LOGIN='{"randomDelay": 120000, "pauseAfter": 90000}'
how do I escape that to be valid…?
Use a block scalar with >-
perhaps? https://yaml-multiline.info/
Find the right syntax for your YAML multiline strings.
something like:
commands:
- >-
kubectl run --env LOGIN='{"randomDelay": 120000, "pauseAfter": 90000}'
more command that will be folded in to a single line above
- next new command
No clue if that’ll work, but I’m pretty sure you can use :
in block scalars since they are terminated by indentation
yeah this totally worked, small note on our specific case, had to do:
... --env "LOGIN={\"randomDelay\": 120000, \"pauseAfter\": 90000}"
- more escaping
thanks, I think that may work!
GitHub action with ability to run codefresh pipeline - codefresh-io/codefresh-pipeline-runner
has anyone tried to dynamically pass in build args in the build step (in a shared pipeline setting where you could have multiple triggers from different services)
…as in Docker build args?
yeah
prob not possible using their builtin build step huh
2019-10-17
Not likely…
I’m confused. Why would you not be able to do that? Take the “passed in” stuff, have a step that does some logic and does a cf_export
on the desired build args, then in the build step use the ${{}} to snag those exported environment variables. Doesn’t cf_export
make the variables available to the pipeline and all future steps? Granted, I may not be understanding the initial problem.
Docker Build args have a special section
If there’s a deterministic number of args, each one could be defined and mapped to an env
But if the list I’d build args vary uncontrollably not sure how to do it
Yeah, if you want a different number of build args, that might not be possible with the build step’s build args, but if you want the same build args with different values or whatever, then I think that’s doable.
Docker Hub has reported an ongoing incident Oct 17, 16:55 UTC Resolved - Docker System Status Current system status information:
All Systems OperationalOct 16, 15:41 UTC Investigating - This could affect your Codefresh builds.
More information here: https://status.docker.com/pages/incident/533c6539221ae15e3f000031/5da5fc78c7b1c11cd8603721
Codefresh’s Status Page - Docker Hub has reported an ongoing incident.
Our system status page is a real-time view of the performance and uptime of Docker products and services.
@Alex Siegman different number of build args and different arg names
I just have some very similar applications which i’ve wanted to share pipelines for because they build & deploy the same way
its just one builds w/ a couple build args and the others do not
i could add a conditional step (on the repo name) for that project, but at that point i think id prefer to just use a seperate pipeline
2019-10-18
Our team has decided to bite the bullet and start using helm 3. In looking at the source code for the official helm step, it appears as though the helm version can be passed as an argument. Has anyone successfully done this or will I need to fork the step
Any way to exclude a file in the modified files expression in the triggers?
@Harrison Heck Glob expressions aren’t great at excluding, but you could try !(filenamehere). Or, if you have conditions in your steps, you could run a check in one step to manually extract it and go from there.
I’ve tried that exclusion but it didn’t work. Specifically it was /!(docker/pulumi/*)
. I’m not sure if it’s supposed to work in CF or if they don’t support negation.
The whole point of these trigger rules though are to bypass starting a job for this. That’s a LOT of overhead for no reason.
Understandable. Let me see what I can come up with.
I was able to get it to work. The leading slash was the issue.
Docker has reported an incident Oct 18, 23:06 UTC Identified - Docker has reported an incident. It’s affecting the following components:
- Docker Package Repositories
More information here:
Codefresh’s Status Page - Docker has reported an incident.
Our system status page is a real-time view of the performance and uptime of Docker products and services.
Our system status page is a real-time view of the performance and uptime of Docker products and services.
2019-10-19
hi all, do you have any example of usage of codefresh to deploy on vm (not using packer, I have seen the example package-gcp) and/or aws beanstalk?
@deftunix that example only uses packer to create an image. The actual VM is deployed with Gcloud. So it should be the same thing for AWS (cli) or Azure (cli). What is your use case?
just another quick one: do you have any example of integration with monitoring system to measure quality, productivity and velocity?
Docker has reported an incident Oct 19, 14:52 UTC Resolved - This incident has been resolvedOct 18, 23:06 UTC Identified - Docker has reported an incident. It’s affecting the following components:
- Docker Package Repositories
More information here:
Codefresh’s Status Page - Docker has reported an incident.
Our system status page is a real-time view of the performance and uptime of Docker products and services.
Our system status page is a real-time view of the performance and uptime of Docker products and services.
2019-10-21
is the only way to not import every cluster in codefresh to every pipeline by being on enterprise codefresh?
2019-10-22
Codefresh UI outage Oct 22, 07:29 UTC Update - We are continuing to investigate this issue.Oct 22, 07:28 UTC Investigating - We are currently investigating this issue.
Codefresh’s Status Page - Codefresh UI outage.
@btai every cluster is automatically available to all pipelines (even with free plans). You can just use kubectl straight in a pipeline and it will work. Could you please clarify?
@Kostis (Codefresh) yeah I know, my preference would be to not to have that by default because of security reasons. I’d prefer to explicitly allow access to specific clusters for each pipeline
@btai ah I see. If you are talking about Policy on clusters then I think that this is indeed enterprise only https://codefresh.io/docs/docs/enterprise/access-control/#marking-kubernetes-clusters-with-policy-attributes
How to restrict resources in a company environment
but let me ask internally to verify that…
thanks @Kostis (Codefresh)
@btai yes that feature is enterprise only normally. However, I was told that we might support custom ad-hoc plans in some cases. If you are already a customer, can you ask your Codefresh contact if this can be integrated in your plan?
Codefresh UI outage Oct 22, 07:52 UTC Resolved - This incident has been resolved.Oct 22, 07:29 UTC Update - We are continuing to investigate this issue.Oct 22, 07:28 UTC Investigating - We are currently investigating this issue.
Potential Webhook delivery issues with Github Oct 22, 19:04 UTC Investigating - Github reported an ongoing issue that is being investigated on their end with users experiencing difficulties with webhook delivery logs.
We are keeping a close eye on their updates and any potential disruption on the actual webhook delivery. Although at this point the report only refers to the logs on webhooks.
Codefresh’s Status Page - Potential Webhook delivery issues with Github.
Potential Webhook delivery issues with Github Oct 22, 21:28 UTC Monitoring - GitHub updated the affected components:
- webhook delivery logs, attachments and git lfs.
Issues on lfs could affect your builds if your pipeline relies on git lfs.
More info here: https://www.githubstatus.com/incidents/fdl6khghfsp3Oct 22, 19:04 UTC Investigating - Github reported an ongoing issue that is being investigated on their end with users experiencing difficulties with webhook delivery logs.
We are keeping a close eye on their updates and any…
Codefresh’s Status Page - Potential Webhook delivery issues with Github.
Welcome to GitHub’s home for real-time and historical data on system performance.
Potential Webhook delivery issues with Github Oct 23, 00:11 UTC Resolved - Github has reported resolution of all of their webhook issuesOct 22, 21:28 UTC Monitoring - GitHub updated the affected components:
- webhook delivery logs, attachments and git lfs.
Issues on lfs could affect your builds if your pipeline relies on git lfs.
More info here: https://www.githubstatus.com/incidents/fdl6khghfsp3Oct 22, 19:04 UTC Investigating - Github reported an ongoing issue that is being investigated on their end with users experiencing…
Codefresh’s Status Page - Potential Webhook delivery issues with Github.
Welcome to GitHub’s home for real-time and historical data on system performance.
2019-10-26
Anyone know off hand where I find a Codefresh build definition example using Helmfile? Need to jump into this and would like to see an example to accelerate learning.
2019-10-27
@dustinvb something like this…
deploy_helmfile:
title: Deploy with helmfile
stage: Deploy
image: "...."
working_directory: /conf/
environment:
- 'KUBECONFIG=${{CF_KUBECONFIG_PATH}}'
- 'REPO_ROOT=${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}}'
shell: bash
commands:
- kubectl config use-context "${KUBE_CONTEXT}"
- helmfile --environment="${FLAVOR}"
-f "${REPO_ROOT}/deploy/helmfile.yaml" sync
when:
steps:
- name: ask_for_permission
on:
- approved
this assumes there’s a file in the repo called deploy/helmfile.yaml
this is a great way to deploy a microservice and all of it’s dependencies
@Erik Osterman (Cloud Posse) I don’t know if this is possible or not. I seen indications that this can remove the need possibly of an Umbrella chart but it looks to me that removing that will split my one single release up into a release per chart. Is this true or is there a way to format the release to use multiple charts without the umbrella? I can’t seem to locate an example. Your repo of helmfiles all seem to do a release per chart.
2019-10-28
Cool, will wrap this up into a step and produce an image for this. Appreciate the example.
Great thanks for putting that together
@mumoshu they are adding an official helmfile step to Codefresh :-)
wow, that’s great news!
Hi - I’d like to trigger a pipeline by codefresh API, with a specific branch and variable set. The api doc https://g.codefresh.io/api/#operation/pipelines-run doesnt have an example of the acceptable body to POST - anyone got any examples?
this is an example of calling one pipeline from another using Codefresh CLI and providing branch and variables https://github.com/cloudposse/example-app/blob/master/codefresh/release.yaml#L42
Example application for CI/CD demonstrations of Codefresh - cloudposse/example-app
Thanks @Andriy Knysh (Cloud Posse) - I was hoping for the API equivalent to that level of cli execution
Example of a Lambda function for the API is available here: https://codefresh.io/continuous-integration/integrate-aws-codecommit-repository-codefresh/
The API endpoint is documented here: https://g.codefresh.io/api/#operation/pipelines-run
AWS CodeCommit is a managed source control service provided by Amazon. This blog post will show how to integrate a CodeCommit repository into a Codefresh pipeline. AWS CodeCommit only allows workflows that trigger lambda functions so we need to use that to trigger Codefresh. This is how we will do it: Once we commit a … Continued
JS SDK Usage example: https://github.com/codefresh-io/js-sdk/blob/master/examples/run-pipeline.js
Contribute to codefresh-io/js-sdk development by creating an account on GitHub.
It’s also available in our Go SDK https://github.com/codefresh-io/go-sdk
Codefresh SDK for Golang. Contribute to codefresh-io/go-sdk development by creating an account on GitHub.
Curl Example:
curl '<https://g.codefresh.io/api/builds/5b1a78d1bdbf074c8a9b3458>' --compressed -H 'content-type:application/json; charset=utf-8' -H 'Authorization: <your_key_here>' --data-binary '{"serviceId":"5b1a78d1bdbf074c8a9b3458","type":"build","repoOwner":"kostis-codefresh","branch":"master","repoName":"nestjs-example","variables":{"sample-var1":"sample1","SAMPLE_VAR2":"SAMPLE2"}}'
How to integrate Codefresh with other systems
thanks @dustinvb
@David Holsgrove ^