#codefresh (2019-09)

codefresh

Archive: https://archive.sweetops.com/codefresh/

2019-09-03

creslinux avatar
creslinux

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

Failed to run freestyle step: Save Terraform statefile to Codefresh context; caused by NonZeroExitCodeError: Container for step title: Save Terraform statefile to Codefresh context, step type: freestyle, operation: Freestyle step failed with exit code: 2 · Issue #5 · codefresh-io/eks-installer

Running freestyle step: Save Terraform statefile to Codefresh context Pulling image codefresh/cli:0.8.54 Digest: sha256:ff73c256681cbf6e6ef8304748d50e6f54903096b7dad9116554694b5fedfbb6 Status: Imag…

dustinvb avatar
dustinvb

Let me escalate this to engineering.

dustinvb avatar
dustinvb

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.

creslinux avatar
creslinux

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

creslinux avatar
creslinux

thanks @dustinvb

2019-09-04

David Holsgrove avatar
David Holsgrove

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?

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

#office-hours starting now! ask questions, get answers. free for everyone. https://zoom.us/j/508587304

Alex Siegman avatar
Alex Siegman

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

btai avatar

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

Alex Siegman avatar
Alex Siegman

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

Alex Siegman avatar
Alex Siegman
cloudposse/example-app

Example application for CI/CD demonstrations of Codefresh - cloudposse/example-app

Alex Siegman avatar
Alex Siegman

We have a disabled trigger on the target pipeline, but I can’t quite remember what that solved at the moment

btai avatar

yeah im using their official codefresh-run step instead of invoking the cli, i might just end up going back to the cli command

jafow avatar


i might just end up going back to the cli command
FWIW this is what we did for similar reasons.

btai avatar

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 :/

dustinvb avatar
dustinvb

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.

https://github.com/dustinvanbuskirk/example-voting-app/blob/master/.codefresh/codefresh-cd.yml#L164-L180

dustinvanbuskirk/example-voting-app

Docker’s Example Voting App. Contribute to dustinvanbuskirk/example-voting-app development by creating an account on GitHub.

dustinvb avatar
dustinvb

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

oscar avatar

Spinnaker vs Codefresh? Thoughts wave

Alex Siegman avatar
Alex Siegman

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.

oscar avatar

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?)

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

look into concourse ci, argo, and spinnaker.

dustinvb avatar
dustinvb

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.

  1. Installation
  2. Maintenance
  3. 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…

Codefresh behind the firewall

How to run Codefresh pipelines in your own secure infrastructure

2
dustinvb avatar
dustinvb

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

2
2

2019-09-10

Kristofer Svardstal avatar
Kristofer Svardstal

You can also ping me, @Kristofer Svardstal, and I will try to assist!

1

2019-09-12

creslinux avatar
creslinux

Morning guys

creslinux avatar
creslinux

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

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Can you share the pipeline yaml?

Alex Siegman avatar
Alex Siegman

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"'
Alex Siegman avatar
Alex Siegman

This returns Line: 113 | deploy_helmfile_sqitch: "conditions" is not allowed. Current value: [object Object]

Igor Rodionov avatar
Igor Rodionov

@Alex Siegman have you tried to play with field when for approval step ?

Igor Rodionov avatar
Igor Rodionov
Approval

How to pause pipelines for manual approval

Alex Siegman avatar
Alex Siegman

yeah, i can get the when step to work with either a steps section or a conditions section, but not both

Alex Siegman avatar
Alex Siegman

unless I need to do something like:

when:
  all:
    steps:
      #steps go here
    conditions:
      # conditions go here

I didn’t think to try that

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@dustinvb

dustinvb avatar
dustinvb

@Kristofer Svardstal can you take a look? Still no power at my home.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Wow! That’s horrible

Kristofer Svardstal avatar
Kristofer Svardstal

Hey hey!

Kristofer Svardstal avatar
Kristofer Svardstal

I believe this should be possible, so just bear with me while I get an example together.

Kristofer Svardstal avatar
Kristofer Svardstal

@Alex Siegman Hey, so, under when, conditions should be condition.

Alex Siegman avatar
Alex Siegman

Sometimes it’s the small things in life. Will try that, thank you

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

@Igor Rodionov

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Any tips

2019-09-13

2019-09-14

creslinux avatar
creslinux

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".

creslinux avatar
creslinux

This has been applied without error - which i thought would give control to the SA codefresh user over kube-system

dustinvb avatar
dustinvb

Can you try editing the apiGroups to: - apiGroups: ["extensions", ""]

creslinux avatar
creslinux

Ignore above - the problem here was the nodes did not fully come up on the az, fixed my terraform and now working

creslinux avatar
creslinux

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
creslinux avatar
creslinux

any hints would be greatly received

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
cloudposse/helmfiles

Comprehensive Distribution of Helmfiles. Works with helmfile.d - cloudposse/helmfiles

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

We use Helmfile and deploy the Codefresh account like this

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Not sure if it is helpful…

creslinux avatar
creslinux

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 ?

creslinux avatar
creslinux

will read on helmfile.d

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Actually Helmfile is a way to manage helm releases

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Helmfile will add the repos for you

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

We also have a #helmfile channel

2
Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)
roboll/helmfile

Deploy Kubernetes Helm Charts. Contribute to roboll/helmfile development by creating an account on GitHub.

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

Read more about it here

2
creslinux avatar
creslinux

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

Erik Osterman (Cloud Posse) avatar
Erik Osterman (Cloud Posse)

public #office-hours starting now! join us to talk shop https://zoom.us/j/508587304

2019-09-20

Codefresh Status - Incident History avatar
Codefresh Status - Incident History
05:24:39 PM

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 Incident - Builds are stuck in pending

Codefresh’s Status Page - Codefresh Incident - Builds are stuck in pending.

Codefresh Status - Incident History avatar
Codefresh Status - Incident History
06:29:40 PM

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 Incident - Builds are stuck in pending

Codefresh’s Status Page - Codefresh Incident - Builds are stuck in pending.

btai avatar

whats up with codefresh today?

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

down

Codefresh Status - Incident History avatar
Codefresh Status - Incident History
07:14:38 PM

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.

Alex Siegman avatar
Alex Siegman

Yeah, UI is broken too - teammate is getting the new user experience~

Oleg Sucharevich avatar
Oleg Sucharevich

We are on it, will update once we back

3
btai avatar

my coworkers first day using the app as well

Codefresh Status - Incident History avatar
Codefresh Status - Incident History
08:49:40 PM

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 Incident - Builds are stuck in pending

Codefresh’s Status Page - Codefresh Incident - Builds are stuck in pending.

Oleg Sucharevich avatar
Oleg Sucharevich

We are back

1
Oleg Sucharevich avatar
Oleg Sucharevich

the status page will be updated now as well

Codefresh Status - Incident History avatar
Codefresh Status - Incident History
09:19:38 PM

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 Status - Incident History avatar
Codefresh Status - Incident History
09:54:39 PM

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 Incident - Builds are stuck in pending

Codefresh’s Status Page - Codefresh Incident - Builds are stuck in pending.

Codefresh Status - Incident History avatar
Codefresh Status - Incident History
10:39:51 PM

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…

Codefresh Status - Incident History avatar
Codefresh Status - Incident History
10:39:51 PM

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

Old Audit-log data is not available

Codefresh’s Status Page - Old Audit-log data is not available.

2019-09-24

Codefresh Status - Incident History avatar
Codefresh Status - Incident History
12:54:42 PM

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

GitHub has reported an incident

Codefresh’s Status Page - GitHub has reported an incident.

Incident on 2019-09-24 11:30 UTC

GitHub’s Status Page - Incident on 2019-09-24 11:30 UTC.

Codefresh Status - Incident History avatar
Codefresh Status - Incident History
02:39:44 PM

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

GitHub has reported an incident

Codefresh’s Status Page - GitHub has reported an incident.

    keyboard_arrow_up