Git Product home page Git Product logo

actions's Introduction

GH Discussions Twitter Telegram chat
GoDoc Contributor Covenant Artifact Hub

werf is a CNCF Sandbox CLI tool to implement full-cycle CI/CD to Kubernetes easily. werf integrates into your CI system and leverages familiar and reliable technologies, such as Git, Dockerfile, Helm, and Buildah.

What makes werf special:

  • Complete application lifecycle management: build and publish container images, test, deploy an application to Kubernetes, distribute release artifacts and clean up the container registry.
  • Ease of use: use Dockerfiles and Helm chart for configuration and let werf handle all the rest.
  • Advanced features: automatic build caching and content-based tagging, enhanced resource tracking and extra capabilities in Helm, a unique container registry cleanup approach, and more.
  • Gluing common technologies: Git, Buildah, Helm, Kubernetes, and your CI system of choice.
  • Production-ready: werf has been used in production since 2017; thousands of projects rely on it to build & deploy various apps.

Quickstart

The quickstart guide shows how to set up the deployment of an example application (a cool voting app in our case) using werf.

Installation

The installation guide helps set up and use werf both locally and in your CI system.

Documentation

Detailed usage and reference for werf are available in documentation in multiple languages.

Developers can get all the necessary knowledge about application delivery in Kubernetes (including basic understanding of K8s primitives) in the werf guides. They provide ready-to-use examples for popular frameworks, including Node.js (JavaScript), Spring Boot (Java), Django (Python), Rails (Ruby), and Laravel (PHP).

Community & support

Please feel free to reach developers/maintainers and users via GitHub Discussions for any questions regarding werf. You're also welcome on Stack Overflow: when you tag a question with werf, our team is notified and comes to help you.

Your issues are processed carefully if posted to issues at GitHub.

For questions that may require a more detailed and prompt discussion, you can use:

  • #werf channel in the CNCF’s Slack workspace;
  • werf_io Telegram chat. (There is a Russian-speaking Telegram chat werf_ru as well.)

Follow @werf_io to stay informed about all important project's news, new articles, etc.

Contributing

This contributing guide outlines the process to help get your contribution accepted.

License

Apache License 2.0, see LICENSE.

Featured in

Console - Developer Tool of the Week Scheme

actions's People

Contributors

alexey-igrychev avatar dependabot[bot] avatar distorhead avatar jayesh100 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

actions's Issues

Login k8s in ghcr not working

Workflow

name: review-app

on:
  pull_request:
    types:
      - opened
      - reopened
      - synchronize

jobs:
  deploy:
    name: Deploy
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Define environment url
        env:
          nip_host_ip: ${{ secrets.NIP_HOST_IP }}
        run: |
          pr_id=${{ github.event.number }}
          echo WERF_SET_ENV_URL=global.env_url=http://${pr_id}-${nip_host_ip}.nip.io >> $GITHUB_ENV
      - name: Deploy
        uses: werf/actions/[email protected]
        with:
          env: review-${{ github.event.number }}
          kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}

k8s docker secret

apiVersion: v1
kind: Secret
metadata:
  name: regsecret
type: kubernetes.io/dockerconfigjson
data:
  .dockerconfigjson: {{ .Values.dockerconfigjson }}

Result:

Error: helm upgrade have failed: unable to build kubernetes objects from release manifest: error validating "": error validating data: unknown object type "nil" in Secret.data..dockerconfigjson
Error: The process '/home/runner/work/_temp/e04a3e2b-fca8-42be-a0e3-22170e1a095c/werf' failed with exit code 1

Actions failing - Unexpected HTTP response: 404

It seems that all actions have been failing for the past few hours, this is due to the binaries download urls no longer existing, as far as i can tell there is no way to skip the binary install step or pass it an existing binary, so this is currently affecting all our workflows.

Response from https://storage.yandexcloud.net/werf/targets/releases/v1.2.26/werf-linux-amd64-v1.2.26
image

image

There needs to be a way to install the binary separately to avoid cases like this moving forward.. as it stands now all of our workflows are dead with no way to fix them.

converge use kubeconfig from previous invocation

Overview

I've got these steps:

      - name: Deploy to stage
        uses: werf/actions/[email protected]
        with:
          kube-config-base64-data: "${{ secrets.KUBECONFIG_FOR_STAGE }}"
        env:
          WERF_NAMESPACE: web-stage

      - name: Deploy to production
        uses: werf/actions/[email protected]
        with:
          kube-config-base64-data: "${{ secrets.KUBECONFIG_FOR_PROD }}"
        env:
          WERF_NAMESPACE: web-production

Non-relevant envs and options are omitted.

Expected behavior

'Deploy to production' step should fail if KUBECONFIG_FOR_PROD secret is not set for the repository.

Actual behavior

'Deploy to production' step uses secrets.KUBECONFIG_FOR_STAGE if KUBECONFIG_FOR_PROD is not set. web-production namespace is created in the stage cluster.

Possible ways to fix

  • Additional option kube-context to use specified context from kube-config.
  • Add cleanup to remove created kube-config at workflow finish.

Get ConfigMap werf-synchronization error

I am new to werf and its integration with GH. First, I just created simple Dockerfile, start.sh and werf.yaml as described in the werf docs. Then I created GH workflow yml according to the docs as well. It seems I get the image successfully built but then I get:

Error: unable to create lock manager: get ConfigMap werf-synchronization error: Get "https://127.0.0.1:6443/api/v1/namespaces/werf-guide-app-production/configmaps/werf-synchronization": dial tcp 127.0.0.1:6443: connect: connection refused
Error: The process '/home/runner/work/_temp/werf-tools/werf' failed with exit code 1

Since I am using everything from the official docs, I think the only place I can have a mistake is KUBE_CONFIG_BASE64_DATA GH secret. I've created it according to https://kubesandclouds.com/index.php/2020/09/01/werf-gitops/:

  1. kubectl create secret docker-registry regcred --docker-server=ghcr.io --docker-username=serg046 --docker-password=generate_token_here
  2. kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "regcred"}]}'
  3. kubectl config view --raw | base64
  4. Finally I put the result to the secret on GH

Could you please help to get progress?
Failing job: https://github.com/Serg046/serg046.github.io/runs/5267035872?check_suite_focus=true

Add support for ghcr.io

This action currently works with the docker.pkg.github.com registry. This is problematic because it is deprecated and in fact does not work with k8s versions starting from 1.20!

Can this action be changed to work with ghcr.io? The README says the following:

Due to the fact that the new GitHub container registry (ghcr.io) does not currently support removal, all actions default to the old one (docker.pkg.github.com).

From my research it seems though that there is now support for deleting images.

Pass github secrets into values.yaml

Hi! I try to use werf 1.2 with github actions. I've had problem with passing secrets from Github to helm. I've tried different combination but i didn't get how to use values to helm release.
My workflow:

---
      - name: Converge
        uses: werf/actions/[email protected]
        with:
          env: staging
          kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
        env:
          JWT_SECRET: ${{secrets.JWT_SECRET}}

My values.yaml

---
secrets:
  api-secret:
    JWT_SECRET: ""

I tried WERF_SET_JWT_SECRET: ${{secrets.JWT_SECRET}}; WERF_SET_JWT_SECRET=secrets.api-secret.jwt_secret=${{secrets.JWT_SECRET}}; JWT_SECRET=secrets.api-secret.jwt_secret=${{secrets.JWT_SECRET}}
but nothing helps

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.