Reddit DevOps
269 subscribers
4 photos
31K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Revert merge changes on feature branch in Jenkins pipeline if build fails

Edit: my feature branch is connected to a website and I’m running selenium on it so I kinda have to push in the beginning when I merge the feature branch.


My Jenkins is set up so if someone makes a pull request to the main branch a Jenkins build is triggered with three steps
1: merge pr branch to feature branch
2: run tests on feature branch
3: merge main branch with feature branch and close PR

If steps 2 and 3 fail or have any error but step 1 passes I want the feature branch to be reverted.

I have an I’d statement to revert but idk if it’s right:

Failure{
Script{
If(currentBuild.result=="Failure" && (currentBuild.currentStage.name== "step2"|| currentBuild.currentStage.name== "step3")){


code to unmerge



Thanks so much.

https://redd.it/10pvshe
@r_devops
Different content but static URL

We want to have the internal report private. After every (main branch) pipeline run, we want the static URL to have the content updated with the new updated report. Is it possible to do this? I can use AWS or azure

https://redd.it/10pwri9
@r_devops
What are the problems that people are facing right now with different cloud providers?

I am building something in DevOps and I am reaching out to other users about the struggles they face while deploying their applications on several cloud providers like Digital Ocean, AWS, etc. What are the problems they want to be solved? Is it the dashboard UI/UX, pricing model, or the environment?

https://redd.it/10q0b5i
@r_devops
WireMock is an API platform that is designed to improve developer productivity and enables developers and testers to Mock APIs in every stage of the API lifecycle

Hey all! I'm part of the team that developed WireMock, an API platform to improve developer productivity. WireMock enables developers and testers to Mock APIs in every stage of the API lifecycle - allowing teams to reduce dependency on 3rd party APIs and develop much faster. WireMock is open source software and WireMock Cloud is built on top of it.

Some of the features:

Mock in minutes

It’s quick and easy to mock any API you depend on. Use the UI to create a mock manually, record an existing API to create a stub, or import an OpenAPI spec.

Request matching that gives you maximum flexibility to implement your business logic

WireMock Cloud enables users to define request matching by post body, request match methods, URL matching methods, headers, query parameters and cookies. In addition, users can set request match priority for cases in which there is more than one mock mapping in the list that would match a given request.

Dynamic responses with advanced templating

WireMock Cloud enables easy dynamic response creation via request variables as well as advanced response manipulation.

See how your code responds to unpredictable API behavior (chaos engineering)

Calls over a network to an API can be delayed for many reasons, such as network congestion or excessive server load. For applications to be resilient they must be designed to cope with this inevitable variability, and tested to ensure they behave as expected when conditions aren’t optimal.

WireMock stubs can be served with a fixed or random delay, or can be “dribbled” back in chunks over a defined time period.

Let me know if you have some question or suggestions on how to improve.

https://redd.it/10q1pl8
@r_devops
Has anyone used env0?

My team lead is heavily touting it for use as Terraform automation in our pipelines. I have a terrible bias against this sort of SaaS solution. It has some very nifty looking features. But to the cynic in me it looks rather gimmicky, style over substance and something that might be used by a large company that lacks the staff needed to build their own solutions. There are some nice concepts it uses but I can’t see anything it offers that I’d be afraid of building ourselves, with the help of some open-source tooling

Anyone know much about this tool that might confirm or refute my feelings about it?

https://redd.it/10pzpku
@r_devops
How many of you actually do woodworking?

I've noticed it gets brought up often, pick up a hobby... Do woodworking. So my question is, how many of you DevOps folk actually do woodworking or is it just a jest answer?

I'll go first. I do. I'm in the middle of learning pocket holes to make a small bookcase

https://redd.it/10q1ovt
@r_devops
Is there a way to integrate a GitHub actions manual-approval step with a notification to a Slack channel?

Hey there,

I'm wondering if anyone is aware of a repo or example of a github actions manual-approval step triggering a message to a Slack channel (using a slack webhook url or even api token), which can then be clicked on to continue the pipeline?

​

thanks!

https://redd.it/10q2mnu
@r_devops
Kubernetes Workshop by Komodor - anyone joining?

Hey,
I saw that Komodor has a workshop today for Kubernetes and showcasing their platform, is anyone planning to join?
Have you tried it out?

https://redd.it/10q2m10
@r_devops
who do you follow?

Like title says, who do you follow on YouTube, Instagram, blogs.. etc.. To keep up with technology or learn quick new things?

I like to follow NetWork Chuck on youtube, I think he explains things very quickly and easy to understand.

So who do you like to follow on social media to learn, refresh, find out about new things?

https://redd.it/10q4mna
@r_devops
Noob Chef Attributes Question

in a default.rb file, what exactly do the value in the brackets stand for?

For instance,

default['apache'\]['app1'\]['version'\] = "8.1"

I have some idea, but I am still confused about how this is all organized and the general syntax.

https://redd.it/10q9ltf
@r_devops
Best CI system on Kubernetes

Hello all,
I’m looking for best CI system which can be placed on top of Kubernetes. I don’t have deployment part, however my team build and test a lot.
I have two main requirements:
1. Good integration with GitHub
2. Developer friendly

Now we have Jenkins(which seems to be too complex for my devs).
And a few GitHub Actions, however here I miss good self-hosting option, especially for aarch64.

My initial thought was Teton which isn’t very developer friendly for non-k8s developers.

Do you have any suggestions or opinions?

Thanks a lot!

https://redd.it/10q1xuk
@r_devops
Sync version of tool used in GitHub action and Makefile.

We use prettier.io in a GitHub action, and in a Makefile.

What's the best way to sync the version of both.

If we update the version in one place, and this update should effect the GitHub action and the version used in the Makefile.

In the Makefile we use npx with @2.8.3 at the moment.

https://redd.it/10q75bm
@r_devops
What are the best static analysis security testing tools for Terraform and infrastructure as code?

What are the best static analysis security testing tools? And is it worth going for a paid software rather than a free open-source one? I've heard of checkov, so I am wondering when you should use a paid software instead.

https://redd.it/10qfd0j
@r_devops
SycllaDB CDC connector

Hi Everyone,We are a new startup https://dview.io/ working in the Data Platform domain, currently at Pre-seed phase.As one of our first product we have created a new Syclladb CDC connector now available and open-sourced with :-

1. Checkpointing
2. Table level observability
3. UDT & Collection Type support
Sharing the Git Repo :https://github.com/dview-io/scylla-cdc

Say goodbye to data replication breakups!

Please share your valuable feedback which will help us to make it better.

https://redd.it/10q4et4
@r_devops
Auto scaling Self-Hosted solution for GitHub Actions?

GitHub Actions is surprisingly expensive. Now that they've released their runners with scaled CPUs, their prices are absurd.

This would be fixed by an autoscaling self-hosted solution. Does anyone know of something like this? This would be SIGNIFICANTLY more affordable.

https://redd.it/10qhid6
@r_devops
Question on workflows for GitHub actions

I’m new to Github actions (and DevOps in general) and I'm trying to make a basic workflow.

I have a single repo with sub-folders for the client and server. What I would like to do is set up a workflow to run some checks when I push code to the repo (linting, unit tests, etc.), but I can’t figure out the right way to structure this with GitHub actions. Should I create:

- Separate workflows for the server and client (e.g. server.yml, client.yml) with a single job for the checks.
- Separate workflows for the server and client (e.g. server.yml, client.yml) with a separate job for each check.
- A single workflow for the checks (e.g. ci.yml) with a job for the server checks and a job for the client checks.

Or am I overthinking it and all three are fine? How would you structure it?

https://redd.it/10q6jiy
@r_devops
securing github actions from the inside

Having trouble finding info about this from searching, I imagine it's because I don't have the right search strings...

I need to implement a github action on our development repo (where devs play) that will dynamically retrieve secrets from Hashicorp Vault and do a little work on AWS on our behalf. That's easy. I can do that.

The thing that's rubbing me the wrong way is that anyone (ie devs) can effectively push a new branch to this repo that says 'on push to my branch LOLOLOL run this arbitrary workflow that retrieves the secrets from Hashicorp Vault and outputs them in plaintext, or hijacks the AWS session to do silly things.'

Okay, yes, first line of defense is the principle of least privilege - reduce the blast radius by using Vault policies and AWS IAM. But, like, I don't want a blast at all.

Is there a clever way to prevent developers from running arbitrary workflows? I'm envisioning some sort of "only run github actions from the main branch" or something, so the developer would at least have to get their workflow past a PR.

https://redd.it/10ql5y8
@r_devops
Preparing for the interview about GCP(Google Cloud Platform )

Hello folks! I'm a beginner DevOps engineer. How I can prepare for the interview about GCP? For which part do I need to more focus? In GCP what kind of questions, they can give me. Thank you!!!

https://redd.it/10qkb6n
@r_devops
Help needed Improve CI for multi repo java application

Hi everyone,
in my company I was asked to contribute to our process for CI. But I don’t really have a good idea.

We have a monolithic main software and it is using multiple layers of dependency in a final build.

Monolith -uses-> Module -uses-> Library


Monolith -implements-> Library

We use Jenkins to build artefacts that will be provided with JFrog for other builds.

We have jobs in Jenkins that are used when a merge request is created that executes automated test and after merging a publish job will be started.

Currently we are going to publish each change in the master of a module or lib manually and do some manual testing with the monolith.

I don’t think that only automating the job start of the current ones will be enough and I hope you can give me a suggestion that might be more a best practice.

Edit: format & typos

https://redd.it/10qjl18
@r_devops
Looking for a standalone GitOps controller?

I'm looking for an open source component that can pull changes from a Git repository, can be configured to trigger scripts when arbitrary changes are detected (e.g. config files, Terraform, et c) and can report progress and perhaps metrics. Ideally, it should be able to run as a container in e.g. Fargate or Azure Container Apps. This is essentially the Flux source controller as a standalone component and with no Kubernetes dependency. Does anyone know of such a tool?

https://redd.it/10qo9mf
@r_devops