Open-source News

Create conditional pipelines with CEL

opensource.com - Fri, 07/22/2022 - 15:00
Create conditional pipelines with CEL Camilla Conte Fri, 07/22/2022 - 03:00 Register or Login to like Register or Login to like

You just followed a guide to start your Tekton pipeline (or task) when a merge request is created or updated on your GitLab project. So you configured GitLab to send merge request events as webhooks. And you deployed some Tekton components:

  • EventListener: receives webhooks from GitLab
  • Trigger: starts your Pipeline every time the EventListener receives a new webhook from GitLab
  • Pipeline: fetches the source code from GitLab and builds it

Then you notice that any event in your merge request (a new comment, a tag change) triggers the pipeline. That's not the behavior you desire. You don't need to build a comment or a tag, after all. You only want the pipeline to run when there is actual new code to build. Here's how I use Tekton's CEL Interceptor to create conditionals for my pipelines.

Have your trigger ready

I expect you have a trigger already defined. It's probably something similar to the snippet below.

The trigger's interceptor rejects anything that's not coming from a merge request. Still, the interceptor is not able to differentiate between code and non-code updates (like new comments).

apiVersion: triggers.tekton.dev/v1beta1
kind: Trigger
metadata:
  name: webhook-listener-trigger
spec:
  interceptors:
   # reject any payload that's not a merge request webhook
    - name: "filter-event-types"
      ref:
        name: "gitlab"
        kind: ClusterInterceptor
      params:
        - name: eventTypes
          value:
           - "Merge Request Hook"
  bindings:
    - ref: binding
  template:
    ref: templateAdd a CEL interceptor

Here comes the cel interceptor. This interceptor filters the webhook payload using the CEL expression language. If the filter expression evaluates to true, the pipeline starts.

Here I'm checking for the object_attributes.oldrev field to exist in the JSON body of the webhook payload. If object_attributes.oldrev exists, then that means this event is about a code change. If there wasn't a code change, there's no previous revision (oldrev) to refer to.

spec:
  interceptors:
    - name: "allow-code-changes-only"
      ref:
        name: cel
        kind: ClusterInterceptor
      params:
        - name: filter
          value: >
           has(body.object_attributes.oldrev)

Add the new interceptor to your trigger. Now your trigger looks like this:

apiVersion: triggers.tekton.dev/v1beta1
kind: Trigger
metadata:
  name: gitlab-listener-trigger
spec:
  interceptors:
    - name: "verify-gitlab-payload"
      ref:
        name: "gitlab"
        kind: ClusterInterceptor
      params:
        - name: eventTypes
          value:
           - "Merge Request Hook"
    - name: "allow-code-changes-only"
      ref:
        name: "cel"
        kind: ClusterInterceptor
      params:
        - name: filter
          value: >
           has(body.object_attributes.oldrev)
  bindings:
    - ref: binding
  template:
    ref: template

Deploy this new version of the trigger and enjoy the powers of automation. From now on, your pipeline only starts if there is some new code to build.

More on Kubernetes What is Kubernetes? Free online course: Containers, Kubernetes and Red Hat OpenShift technical over… eBook: Storage Patterns for Kubernetes Test drive OpenShift hands-on An introduction to enterprise Kubernetes How to explain Kubernetes in plain terms eBook: Running Kubernetes on your Raspberry Pi homelab Kubernetes cheat sheet eBook: A guide to Kubernetes for SREs and sysadmins Latest Kubernetes articles Tips

There are no limits to the conditions you can set in a CEL filter.

You may check that the merge request is currently open:

body.object_attributes.state in ['opened']

You can make sure the contributor finished their work on the code:

body.object_attributes.work_in_progress == false

You just have to concatenate multiple conditions correctly:

- name: filter
  value: >
   has(body.object_attributes.oldrev) &&
    body.object_attributes.state in ['opened'] &&
    body.object_attributes.work_in_progress == false

Check out the merge request events documentation to get inspired to write your own conditions.

You may need the CEL language definition to know how to translate your thoughts into code.

To evaluate types other than strings, you want to know the mapping between JSON and CEL types.

Control when automated builds happen in Tekton with CEL.

Kubernetes CI/CD What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Monit – A Open Source Tool for Managing and Monitoring Linux System

Tecmint - Fri, 07/22/2022 - 14:31
The post Monit – A Open Source Tool for Managing and Monitoring Linux System first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

Monit is a free open source and very useful tool that automatically monitors and manages processes, files, directories, checksums, permissions, filesystems, and services like Apache, Nginx, MySQL, FTP, SSH, SMTP, and so on in

The post Monit – A Open Source Tool for Managing and Monitoring Linux System first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

How to Configure a CA SSL Certificate in HAProxy

Tecmint - Fri, 07/22/2022 - 14:13
The post How to Configure a CA SSL Certificate in HAProxy first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

The HAProxy is a widely-used, reliable, high-performance reverse proxy, that offers high-availability and load balancing capabilities for TCP and HTTP applications. By default, it is compiled with OpenSSL, thus supporting SSL termination, enabling your

The post How to Configure a CA SSL Certificate in HAProxy first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

Modernization: Making a business case

Red Hat News - Fri, 07/22/2022 - 12:00

In the previous articles we discussed how to assess, from a high level, whether a modernization effort made sense in your enterprise. We also covered the attributes a successful modernization team should have, and some team characteristics that might cause problems. At this point you might be thinking that starting a modernization project is a no-brainer.

Intel's Open-Source Vulkan Driver For Ray-Tracing Gets "Like A 100x Improvement"

Phoronix - Fri, 07/22/2022 - 07:00
Intel's Linux graphics driver developers continue to be very busy polishing the DG2/Alchemist graphics card support for forthcoming Intel Arc Graphics hardware... Merged today to the open-source Intel Mesa Vulkan driver was a ray-tracing focused fix that yields "like a 100x (not joking) improvement." Even more of a kicker? The change is one line of code for the massive improvement...

Intel's Open-Source Vulkan Driver For Ray-Tracing Gets "Like A 100x Improvement"

Phoronix - Fri, 07/22/2022 - 07:00
Intel's Linux graphics driver developers continue to be very busy polishing the DG2/Alchemist graphics card support for forthcoming Intel Arc Graphics hardware... Merged today to the open-source Intel Mesa Vulkan driver was a ray-tracing focused fix that yields "like a 100x (not joking) improvement." Even more of a kicker? The change is one line of code for the massive improvement...

Join us to Speak at the ONE networking event connecting Access, Edge, and Cloud in 2022

The Linux Foundation - Fri, 07/22/2022 - 04:52
The top reasons to share your expertise at ONE Summit, the Industry’s leading Open Networking & Edge Event

To submit a presentation proposal, please visit our Call For Proposals-but hurry! Submissions are due July 29. 

ONE Summit 2022

ONE Summit is the ONE networking technology event connecting Access, Edge, Core and Cloud. It brings together technical and business decision makers for in-depth, interactive conversations around cutting-edge innovations and the operational support necessary to leverage them.

Newly revamped post-pandemic, ONE Summit’s focus is to enable interactive, real-world conversations on the evolution of technology in the distributed networking space. From Communications Service Providers to Government and civil infrastructure, from Retail to the leaders of Industry 4.0, you will be able to collaborate on innovations to truly support your digital transformation.

Inspired by the impact of integration efforts like 5G Super Blueprint, ONE Summit fosters collaborative discussion required to truly scale software for 5G, IoT, the enterprise, and beyond. 

Top 5 reasons to speak at ONE Summit:

1) Collaborate with thought leaders from across a growing global ecosystem. 

ONE Summit enables the technical and business collaboration necessary to shape the future of open networking and edge computing. The free exchange and presentation of ideas is crucial for the growth of all open source projects and their continued ability to innovate.

2) Immerse yourself in innovative technologies such as 5G, Open RAN, IoT, Enterprise, Cloud Native and more.

Learn about and build on on the successes of Linux Foundation networking & edge project communities, with collaboration across LF Networking, LF Edge, O-RAN- SC, Magma, CNCF, LF AI & Data, and more, to enable attendees to visualize and build their new networking stacks.

3) Learn from your peers across industry verticals solving common challenges. 

Networking decision makers gather to address architectural and technical issues, and business use case needs. ONE Summit provides a forum where solutions, best practices, use cases and more – based on open source projects under the Linux Foundation Networking and across the industry– can be shared with the global ecosystem.

4) Unleash the power of open. In a market now built on open source, this is critical.

Virtually all industries have embraced open source in their operations. Collaboration among industry peers is what makes the use of open source in business and the related business models possible.

5) Demonstrate your leadership.

ONE Summit attendees come from all across a growing ecosystem of enterprises, governments, global service providers (including telcos, enterprises, government, global service providers and cloud). With a targeted focus on architects and technical decision makers, ONE Summit is a great place to get your message out

Meet the Program Committee

ONE Summit would not be possible without the involvement and support of our community. The Program Committee is composed of business and open source leaders who are actively involved in the work of developing the next generation of networking and edge technologies for all market verticals. This year’s ONE Summit Program Committee is composed of:

  • Rabi Abdel, Principal Consultant, Global Telecom Practice, Amazon Web Services
  • Lisa Caywood, Senior Principal Community Architect, RedHat
  • Wenjing Chu, Senior Director of Technology Strategy – Trust for the Internet of the Future, Futurewei Technologies
  • Roy Chua, Founder and Principal, AvidThink
  • Beth Cohen, Cloud Product Technologist, Verizon
  • Marc Fiedler, Architect for Real-time Network Service Management, Deutsche Telekom
  • Daniel Havey, Program Manager, Microsoft
  • Kandan Kathirvel, Product Lead, Telco Cloud & Orchestration, Google Cloud
  • Trishan de Lanerolle, Principal Technical Program Manager, Office of the CTO, Equinix
  • Catherine Lefevre, AVP, Technology Services – Network Systems Common Platform & Services, AT&T
  • Tom Nadeau, Fellow, Vice President & Chief Cloud Architect, Spirent Communications
  • Joe Pearson, Edge Computing and Technology Strategist, IBM Networking & Edge Computing CTO Group, IBM
  • Jim St. Leger, Director, Open Strategy, Intel
  • Tracy Van Brakle, Principal Member of Technical Staff, AT&T
  • Olivier Smith, Office of the CTO, Director, Matrixx Software
  • Cedric Thienot, Co-Founder and CTO, Firecell
  • Qihui Zhao, NFV Researcher & Network Engineer, CMCC
  • Amy Zwarico, Director, CyberSecurity, Chief Security Office, AT&T
Who attends

Past ONE Summit attendee demographics. Source: ONE Summit 2022 prospectus

Join with attendees from all market verticals and all organizational levels from all over the world. Attendees don’t have to be part of a project to contribute to the discussion and to participate in open collaboration sessions with other attendees. In fact, joining planned sessions and open discussions and collaboration sessions is the best way to get involved with open source projects under the LFNetworking Umbrella.

To learn more about ONE Summit 2022 in Seattle, please visit the ONE Summit site

About LF Networking

Now in its fifth year as an umbrella organization, LF Networking (LFN) and its projects enable organizations across the globe to more quickly and effectively achieve digital transformation via the community’s shared development efforts. This includes companies of all sizes and types that rely on LFN’s breadth of commercially-ready ecosystem offerings, all based on open source innovation spearheaded within the LF Networking community. To learn more about LFN, please visit https://www.lfnetworking.org. To learn more about the Linux Foundation, please visit https://linuxfoundation.org

The author, Heather Kirksey, VP, Community & Ecosystem, LF Networking.

The post Join us to Speak at the ONE networking event connecting Access, Edge, and Cloud in 2022 appeared first on Linux Foundation.

Bosch leverages open source model; teams with PolyCrypt to tackle blockchain for the Economy of Things

The Linux Foundation - Fri, 07/22/2022 - 03:49

This post originally appeared on the Hyperledger Foundation’s blog. You can read the full case study here

Some years ago, researchers realized that IoT devices would need to buy and sell from one another. In this “Economy of Things,” the items to be traded will include power, data, and connectivity. Most transactions will be fast, low value, and high frequency.

For a company like The Bosch Group that’s active in everything from autonomous vehicles to thermal plants, the Economy of Things will touch many lines of business. That’s why, in 2017, the company’s advanced research group, Bosch Research, was looking to find a way to scale up blockchain transactions to support the Economy of Things.

Bosch set out to do meet that requirement by leveraging a specific, step-by-step open source strategy for developing new markets:

  1. Identify a requirement
  2. Set goals
  3. Consider the terrain
  4. Build a partnership
  5. Pick a suitable license
  6. Use open source archetypes

The goals were to lead an effort to create standards for the Economy of Things and to build a framework where different partners could work together.

A survey for likely partners led the Bosch team to Perun, an early layer-2 protocol that passes state information off-chain through virtual channels. Bosch joined forces with several academics to implement this protocol and start creating an ecosystem.

As part of the process, Perun needed a stable home where everyone could access the latest code, and other people could find it. Hyperledger Labs provides a space where developments can be started without the overhead of creating an official Hyperledger project.

In Q3 2020, Perun was welcomed into Hyperledger Labs, and development has continued with work from the team at Boch and PolyCrypt GbmH, a startup spun out of the Technical University Darmstadt, where much of the academic research behind Perun began.

The Bosch team was eager to talk about its approaches and contributions to Hyperledger Foundation. To that end, they worked with Hyperledger marketing and others in the Perun community on a case study that details not only the business and technology challenges they’ve set out to tackle but also the strategic way they are leveraging open source development to advance the industry for all.

We never know what technology will turn into the Next Big Thing.

Perhaps Perun will be one of them, powering billions of micropayments between IoT devices or enabling people to shop with Central Bank Digital Currencies (CBDCs) that are still on the drawing board today.

Read the full case study here.

The post Bosch leverages open source model; teams with PolyCrypt to tackle blockchain for the Economy of Things appeared first on Linux Foundation.

Qualcomm Working On Vulkan Image Processing With New v1.3.222 Extensions

Phoronix - Fri, 07/22/2022 - 02:00
Released today was Vulkan 1.3.222 as the newest Vulkan spec with various clarifications/corrections plus two new extensions coming out of Qualcomm...

Qualcomm Working On Vulkan Image Processing With New v1.3.222 Extensions

Phoronix - Fri, 07/22/2022 - 02:00
Released today was Vulkan 1.3.222 as the newest Vulkan spec with various clarifications/corrections plus two new extensions coming out of Qualcomm...

Web Hosting Talk - Web Hosting Talk

Google News - Fri, 07/22/2022 - 01:50
Web Hosting Talk  Web Hosting Talk

Feral Releases GameMode 1.7

Phoronix - Fri, 07/22/2022 - 00:20
The Linux game porters at Feral Interactive have released GameMode 1.7 as the newest version of their daemon that can ensure your CPU frequency scaling governor is set to "performance" mode, among other system performance optimizations, automatically when launching games...

Feral Releases GameMode 1.7

Phoronix - Fri, 07/22/2022 - 00:20
The Linux game porters at Feral Interactive have released GameMode 1.7 as the newest version of their daemon that can ensure your CPU frequency scaling governor is set to "performance" mode, among other system performance optimizations, automatically when launching games...

Pages