#codefresh (2019-09)
Archive: https://archive.sweetops.com/codefresh/
2019-09-03
Anybody have any hints for deploying an EKS cluster via Codefesh, the example in their repo fails as described in the CF repo issue https://github.com/codefresh-io/eks-installer/issues/5
Running freestyle step: Save Terraform statefile to Codefresh context Pulling image codefresh/cli:0.8.54 Digest: sha256:ff73c256681cbf6e6ef8304748d50e6f54903096b7dad9116554694b5fedfbb6 Status: Imag…
Let me escalate this to engineering.
I do not have another example of automated creation and addition in a pipeline looks like this needs a fix to the API call responsible for adding the EKS cluster to our Kubernetes cluster integration.
Awesome, 10pm here - that sounds like my home/bed time as im a total newbie and could not help other that test works after a change
thanks @dustinvb
2019-09-04
Hey, general question - say I’ve built a docker image in a codefresh pipeline (tagged in the CF registry and also pushed out to ECR) and want to use that as the image in a different pipelines freestyle step - how do I auth to the private registry to pull the image? Dont mind if CF is the easiest, but can’t seem to find a way to use my ECR credentials which let me push images to also pull images?
#office-hours starting now! ask questions, get answers. free for everyone. https://zoom.us/j/508587304
So - I’ve got a new pipeline stuck in “pending” state - is there any way to get info on what that means / why that is? zero other builds are running
2019-09-05
anyone running codefresh pipeline invoked by another pipeline successfully with variables being passed in? (the official step is called codefresh-run) the pipeline being invoked doesn’t seem to be getting the variables for me
i think the cloudposse example app might have that… i have a “release” pipeline that triggers off a github release, and it calls deploy pipelines conditionally based on the release tag format
Example application for CI/CD demonstrations of Codefresh - cloudposse/example-app
We have a disabled trigger on the target pipeline, but I can’t quite remember what that solved at the moment
yeah im using their official codefresh-run step instead of invoking the cli, i might just end up going back to the cli command
i might just end up going back to the cli command
FWIW this is what we did for similar reasons.
I have a step using the codefresh cli and I have an identical step using their official one and using the official one doesn’t work :/
I am sorry this example is not working can you please send me the URL to verify and fix?
Here is a working example of a matrix pipeline using the codefresh-run to call the dvt pipeline.
Docker’s Example Voting App. Contribute to dustinvanbuskirk/example-voting-app development by creating an account on GitHub.
I also have a Knapsack example that uses codefresh-run in a parallel step type.
version: "1.0"
stages:
- "clone"
- "build"
- "test-prep"
- "pipeline-tests"
steps:
main_clone:
type: "git-clone"
description: "Cloning main repository..."
repo: "dustinvanbuskirk/rails-app-with-knapsack"
revision: "${{CF_BRANCH}}"
stage: "clone"
BuildTestDockerImage:
title: Building Test Docker image
type: build
arguments:
image_name: 'dustinvanbuskirk/rails-app-with-knapsack-test'
tag: '${{CF_BRANCH_TAG_NORMALIZED}}-${{CF_SHORT_REVISION}}'
dockerfile: Test.Dockerfile
stage: "build"
CleanAllureFolder:
title: Cleaning Allure Folder
stage: "test-prep"
image: alpine
commands:
- rm -rf ${{CF_VOLUME_PATH}}/allure-results
ImportKnapsackReport:
title: "Importing Knapsack Report"
image: ${{BuildTestDockerImage}}
stage: "test-prep"
environment:
- KNAPSACK_GENERATE_REPORT=true
commands:
- cf_export KNAPSACK_REPORT=$(cat knapsack_rspec_report.json | jq -c | base64 | tr -d '\n')
RunKnapsackTestsPipelines:
title: "Running Knapsack Tests Pipelines"
type: parallel
stage: "pipeline-tests"
steps:
RunKnapsackTestsPipeline1:
title: "Running Knapsack Test Pipeline 1"
type: codefresh-run
fail_fast: true
arguments:
PIPELINE_ID: "knapsack-demo/knapsack-demo-rspec-runner"
TRIGGER_ID: "dustinvanbuskirk/rails-app-with-knapsack"
BRANCH: ${{CF_BRANCH}}
SHA: ${{CF_REVISION}}
VARIABLE:
- CI_NODE_TOTAL=3
- CI_NODE_INDEX=0
- KNAPSACK_REPORT='${{KNAPSACK_REPORT}}'
- PARENT_BUILD_ID=${{CF_BUILD_ID}}
NO_CACHE: false
NO_CF_CACHE: false
ENABLE_NOTIFICATIONS: false
RESET_VOLUME: false
DETACH: false
RunKnapsackTestsPipeline2:
title: "Running Knapsack Test Pipeline 2"
type: codefresh-run
fail_fast: true
arguments:
PIPELINE_ID: "knapsack-demo/knapsack-demo-rspec-runner"
TRIGGER_ID: "dustinvanbuskirk/rails-app-with-knapsack"
BRANCH: ${{CF_BRANCH}}
SHA: ${{CF_REVISION}}
VARIABLE:
- CI_NODE_TOTAL=3
- CI_NODE_INDEX=1
- KNAPSACK_REPORT=${{KNAPSACK_REPORT}}
- PARENT_BUILD_ID=${{CF_BUILD_ID}}
NO_CACHE: false
NO_CF_CACHE: false
ENABLE_NOTIFICATIONS: false
RESET_VOLUME: false
DETACH: false
RunKnapsackTestsPipeline3:
title: "Running Knapsack Test Pipeline 3"
type: codefresh-run
fail_fast: true
arguments:
PIPELINE_ID: "knapsack-demo/knapsack-demo-rspec-runner"
TRIGGER_ID: "dustinvanbuskirk/rails-app-with-knapsack"
BRANCH: ${{CF_BRANCH}}
SHA: ${{CF_REVISION}}
VARIABLE:
- CI_NODE_TOTAL=3
- CI_NODE_INDEX=2
- KNAPSACK_REPORT=${{KNAPSACK_REPORT}}
- PARENT_BUILD_ID=${{CF_BUILD_ID}}
NO_CACHE: false
NO_CF_CACHE: false
ENABLE_NOTIFICATIONS: false
RESET_VOLUME: false
DETACH: false
CopyAllureResultsFromS3:
title: "Copying Allure Results From S3"
stage: "pipeline-tests"
image: dustinvanbuskirk/cfstep-knapsack:alpha
commands:
- aws s3 cp --recursive s3://${{BUCKET_NAME}}/${{CF_BUILD_ID}}/ ${{CF_VOLUME_PATH}}/allure-results/
UploadTestReports:
title: "Uploading Test Reports"
stage: "pipeline-tests"
image: codefresh/cf-docker-test-reporting
environment:
- ALLURE_DIR=${{CF_VOLUME_PATH}}/allure-results
2019-09-06
2019-09-09
Spinnaker vs Codefresh? Thoughts
I’d love to have an opinion on this. I want to like Spinnaker but never had a chance to demo it due to a high cost to start. Lots of operations and dev time involved in running your own CICD system. CodeFresh on the other hand is flipping expensive in and of itself, but probably really cost effective until maybe 10 or so concurrency.
Thanks for the input.
New firm very keen to use Spinnaker (invest the time) instead of investing the constant money into Codefresh each month (we’d want enterprise onpremise so we don’t have to expose internal infrastructure to WWW… @Erik Osterman (Cloud Posse) any opinions on that exposure & a solution?)
look into concourse ci, argo, and spinnaker.
Codefresh guy sharing his thoughts…
I often beat Spinnaker in side-by-sides just b/c of the high cost of implementation (often it is not even running by the end of the Codefresh evaluation)
There are other costs often not taken into account for running any services on-premise.
- Installation
- Maintenance
- Availability
These all translate to someone’s time which translates to money. This includes running Codefresh on-premise.
With our Hybrid offering we assume these costs in our product pricing and assume the responsibilities above which would normally be left to engineering.
We offer a unique Hybrid solution where we deploy a runner agent as a pod to a behind-the-firewall Kubernetes cluster requiring only egress out to Codefresh API to operate. The operations will take place on customer’s the Kubernetes cluster the pod itself will upgrade itself and scale out jobs to the capacity of the cluster.
https://codefresh.io/docs/docs/enterprise/behind-the-firewall/
If you’re looking at running Codefresh on premise there is a Helm chart available to install and upgrade but there is a cost in engineering effort behind this as well as any other on-premise service.
Also, I noticed you no longer are representing your moose hat here in Slack…
How to run Codefresh pipelines in your own secure infrastructure
Sorry, I haven’t been that active in this channel. Been a busy summer. If anyone ever has a question relating to Codefresh just ping me on here using @dustinvb and I’ll get back to you ASAP
2019-09-10
You can also ping me, @Kristofer Svardstal, and I will try to assist!
2019-09-12
Morning guys
Struggling here, a pipe was working now failing – big change could be is my EKS was bumped from 1.13 to 1.14
Executing command: /cf-deploy-kubernetes /codefresh/volume/cf-generated/deployment.yml
Server minor version: 14
Warning: No variable was found in /codefresh/volume/cf-generated/deployment.yml, syntax is {{VAR}}
---> Kubernetes objects to deploy in /codefresh/volume/cf-generated/deployment.yml :
Nothing obvious to me - I’ve put YAML in the pipe from prior working runs
Can you share the pipeline yaml?
So, I’m having an issue. I’m trying to conditionally do a pipeline step based off both a condition and an approval step match, but I can’t find the right YAML voodoo to make it work, and there are ZERO examples that I can find in the docs as well.
example yaml step:
deploy_helmfile_sqitch:
title: Deploy with helmfile
stage: Deploy
image: "${{TOOL_DOCKER_REPO_PREFIX}}/${{AWS_ENV_NAME}}:latest"
working_directory: /conf/
environment:
- 'KUBECONFIG=${{CF_KUBECONFIG_PATH}}'
- 'REPO_ROOT=${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}}'
shell: bash
commands:
# Announce the release version
- echo "* Preparing to deploy ${RELEASE_NAME} with image ${IMAGE_NAME}:${IMAGE_TAG}"
- echo "* with flavor \"$FLAVOR\" into namespace ${RELEASE_NAMESPACE}"
- kubectl config use-context "${KUBE_CONTEXT}"
- cd $(conf-directory helmfiles) && echo Working directory is now $PWD
- helmfile --namespace="${RELEASE_NAMESPACE}" --environment="${FLAVOR}"
-f "${REPO_ROOT}/deploy/releases/sqitch.yaml" sync
when:
steps:
- name: ask_for_permission
on:
- approved
conditions:
any:
comment_is_not_airflow: '"${{COMMENT}}" != "airflow"'
This returns Line: 113 | deploy_helmfile_sqitch: "conditions" is not allowed. Current value: [object Object]
@Alex Siegman have you tried to play with field when
for approval step ?
How to pause pipelines for manual approval
How to pause pipelines for manual approval
yeah, i can get the when
step to work with either a steps
section or a conditions
section, but not both
unless I need to do something like:
when:
all:
steps:
#steps go here
conditions:
# conditions go here
I didn’t think to try that
@dustinvb
@Kristofer Svardstal can you take a look? Still no power at my home.
Wow! That’s horrible
Hey hey!
I believe this should be possible, so just bear with me while I get an example together.
@Alex Siegman Hey, so, under when
, conditions
should be condition
.
Sometimes it’s the small things in life. Will try that, thank you
@Igor Rodionov
Any tips
2019-09-13
2019-09-14
Afternoon. Im rebuilding my k8s and codefresh - my first, built two weeks back, got tangled.
When i try to delete or edit a service in kube-system i hit replicasets.extensions is forbidden: User "system:serviceaccount:kube-system:codefresh-user" cannot list resource "replicasets" in API group "extensions" in the namespace "kube-system".
This has been applied without error - which i thought would give control to the SA codefresh user over kube-system
Can you try editing the apiGroups to: - apiGroups: ["extensions", ""]
Ignore above - the problem here was the nodes did not fully come up on the az, fixed my terraform and now working
Im hitting an RBAC problem,
Message services "dev-mm-user-fe-default-srv" is forbidden: User
"system:serviceaccount:kube-system:codefresh-user" cannot get resource "services" in API group ""
in the namespace "eu-dev-public-ns"
Ive applying the following, that i hoped would allow DF to deploy to this ns/svc - but didnt
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: codefresh-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: codefresh-role
subjects:
- kind: ServiceAccount
name: codefresh-user
namespace: eu-dev-public-ns
any hints would be greatly received
Comprehensive Distribution of Helmfiles. Works with helmfile.d
- cloudposse/helmfiles
We use Helmfile and deploy the Codefresh account like this
Not sure if it is helpful…
Hi @Erik Osterman (Cloud Posse) thanks for the link - it might be useful. I’m very much learning as i go, do i need to add this as a helm repo ?
will read on helmfile.d
Actually Helmfile is a way to manage helm releases
Helmfile will add the repos for you
Deploy Kubernetes Helm Charts. Contribute to roboll/helmfile development by creating an account on GitHub.
same troubles
services "dev-mm-user-fe-default-srv" is forbidden: User "system:serviceaccount:kube-system:codefresh-service-account" cannot update resource "services" in API group "" in the namespace "eu-dev-public-ns"
2019-09-16
2019-09-18
public #office-hours starting now! join us to talk shop https://zoom.us/j/508587304
2019-09-20
Codefresh Incident - Builds are stuck in pending Sep 20, 17:16 UTC Update - We are continuing to investigate this issue.Sep 20, 17:15 UTC Investigating - Currently we’re investigating an issue that’s affecting the execution of builds in the system.
Codefresh’s Status Page - Codefresh Incident - Builds are stuck in pending.
Codefresh Incident - Builds are stuck in pending Sep 20, 18:21 UTC Identified - Issue identified: We are experiencing a connectivity issue with a third-party vendor, which affects the scheduling flow for our builds. The ETA to resolve this issue is ~1 hour.Sep 20, 17:16 UTC Update - We are continuing to investigate this issue.Sep 20, 17:15 UTC Investigating - Currently we’re investigating an issue that’s affecting the execution of builds in the system.
Codefresh’s Status Page - Codefresh Incident - Builds are stuck in pending.
whats up with codefresh today?
down
Codefresh Incident - Builds are stuck in pending Sep 20, 18:21 UTC Identified - Issue identified: We are experiencing a connectivity issue with GCP Cloud SQL (PostgreSQL) which affects the scheduling flow for our builds. The ETA to resolve this issue is ~1 hour.Sep 20, 17:16 UTC Update - We are continuing to investigate this issue.Sep 20, 17:15 UTC Investigating - Currently we’re investigating an issue that’s affecting the execution of builds in the system.
Yeah, UI is broken too - teammate is getting the new user experience~
my coworkers first day using the app as well
Codefresh Incident - Builds are stuck in pending Sep 20, 20:45 UTC Update - We are continuing to monitor for any further issues.Sep 20, 20:34 UTC Monitoring - Builds are currently able to be executed. We’re still monitoring the system.Sep 20, 18:21 UTC Identified - Issue identified: We are experiencing a connectivity issue with GCP Cloud SQL (PostgreSQL) which affects the scheduling flow for our builds. The ETA to resolve this issue is ~1 hour.Sep 20, 17:16 UTC Update - We are continuing to investigate this issue.Sep 20, 17:15 UTC…
Codefresh’s Status Page - Codefresh Incident - Builds are stuck in pending.
the status page will be updated now as well
Codefresh Incident - Builds are stuck in pending Sep 20, 21:04 UTC Update - Builds are able to progress now. We’re still investigating an issue with our Helm-repository integration and audit-log data availability.Sep 20, 20:45 UTC Update - We are continuing to monitor for any further issues.Sep 20, 20:34 UTC Monitoring - Builds are currently able to be executed. We’re still monitoring the system.Sep 20, 18:21 UTC Identified - Issue identified: We are experiencing a connectivity issue with GCP Cloud SQL (PostgreSQL) which affects the…
Codefresh Incident - Builds are stuck in pending Sep 20, 21:36 UTC Update - We are continuing to monitor for any further issues.Sep 20, 21:36 UTC Update - Helm-repository integration is working now. Old audit-log data will be available soon.Sep 20, 21:04 UTC Update - Builds are able to progress now. We’re still investigating an issue with our Helm-repository integration and audit-log data availability.Sep 20, 20:45 UTC Update - We are continuing to monitor for any further issues.Sep 20, 20:34 UTC Monitoring - Builds are currently able to be…
Codefresh’s Status Page - Codefresh Incident - Builds are stuck in pending.
Codefresh Incident - Builds are stuck in pending Sep 20, 22:23 UTC Resolved - Issue related to stuck builds is completely resolvedSep 20, 21:36 UTC Update - We are continuing to monitor for any further issues.Sep 20, 21:36 UTC Update - Helm-repository integration is working now. Old audit-log data will be available soon.Sep 20, 21:04 UTC Update - Builds are able to progress now. We’re still investigating an issue with our Helm-repository integration and audit-log data availability.Sep 20, 20:45 UTC Update - We are continuing to monitor for…
Old Audit-log data is not available Sep 20, 22:29 UTC Identified - We’re currently working on restoring the old audit log data. It wil be available soon
Codefresh’s Status Page - Old Audit-log data is not available.
2019-09-24
GitHub has reported an incident Sep 24, 12:44 UTC Investigating - GitHub has reported an incident This might impact your builds.
More information here: https://www.githubstatus.com/incidents/b54zv9nz8m01
Codefresh’s Status Page - GitHub has reported an incident.
GitHub’s Status Page - Incident on 2019-09-24 11:30 UTC.
GitHub has reported an incident Sep 24, 14:28 UTC Resolved - This incident has been resolved.Sep 24, 12:44 UTC Investigating - GitHub has reported an incident This might impact your builds.
More information here: https://www.githubstatus.com/incidents/b54zv9nz8m01
Codefresh’s Status Page - GitHub has reported an incident.