Hot answers tagged

6

I guess the simplest and direct solution would be to use GitHub API: https://docs.github.com/en/rest/reference/pulls#create-a-review-for-a-pull-request But for the requirement you have, PR checks is usually the way to go and you have a plugin that does the API communication for you: https://www.jenkins.io/doc/pipeline/steps/pipeline-githubnotify-step/


3

There's a simple two step process... In your originating job, tick step [ X ] Archive the artifacts and set the files to archive. The files are copied to the master, stored in the jobs folder tree, under the builds directory for each build, along with the log. (Delete the build and it deletes the artifacts that came from it). Install the Copy Artifact ...


3

You do not need to include anything into your assembly to run your tests using GitHub Actions. Just create workflow file in .github/workflows folder with the following content (assuming that you have .NET Core project): --- name: Tests on: push jobs: tests: name: Unit Testing runs-on: windows-latest steps: - uses: actions/checkout@v2.1....


2

Assuming a docker file like this... FROM ubuntu:18.04 ARG TF_VERSION=0.12.25 RUN apt-get install wget -y RUN wget -O terraform.zip https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip In your GitHub action you would need to get the current version from your Dockerfile. export CURRENT_TF_VERSION=$(grep -Eo '[[:...


2

List workflow runs would be the equivalent API endpoint in Github Actions: GET /repos/:owner/:repo/actions/workflows/:workflow_id/runs You can use the status query parameter e.g. to filter for successful runs: GET /repos/:owner/:repo/actions/workflows/:workflow_id/runs?status=success


1

There can be many correct answers, depending on the strategy you are doing. My take would be: I wouldn't create a dedicated Docker image (e.g. index.docker.com/python:3.9-slim) with the application on it, but rather use the official Python Docker image, to build the app and the same to run it, so I'd package your app separately from the image that runs it. ...


1

I made it work by changing the way labels argument is passed into requestBody. Turns out the list representation while interpolated into string is missing quotation marks around each list element. def setLabels (String repository, List label) { try { String labelsAsString = "[\"${label.join('", "')}\"]" def ...


1

You can utilize watchtower to restart the specified containers each time new image of that container is avaialble. Watchtower : with watchtower you can update the running version of your containerized app simply by pushing a new image to the Docker Hub or your own image registry. Watchtower will pull down your new image, gracefully shut down your existing ...


1

By coincidence, I have found a possible solution via Github Secrets.


1

I encountered the same issue when using the GitHub Branch Source Plugin in Jenkins as part of a multibranch pipeline. The documentation for the credentials configuration states: Credentials used to scan branches and pull requests, check out sources and mark commit statuses. Note that only "username with password" credentials are supported. ...


1

This can be achieved by running your build script in a docker container and applying your iptables rules inside that container, which won't affect the host runner's connectivity. For example, if the below script is executed in a GitHub Actions job (in the Ubuntu 18.04 GitHub shared runner), it will run the build script (docker_script.sh) in a debian docker ...


1

Install the git plugin, add credentials for the account you want it to use, then set the job to use SCM Polling. It will check on a preset interval for changes to that repo and trigger when changes are detected. If you need instant triggering upon push, you're looking for webhooks, which is significantly more difficult to set up. I find that polling every 2 ...


1

node.js runs via a command line (no windows involved). If you want to run more than one copy of the same program you can simply start it more that once. Take this simple one: https://nodejs.org/en/docs/guides/getting-started-guide/ Since it runs on a dedicated port (3000) if you start it more that once it will fail. Here is something I found on google that ...


1

Your configuration refers to a file that is local on your system, but does not exist on the jenkins server. The error message is trying to tell you this. /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey is not on the jenkins server. You need to make this file available on the jenkins server by copying it up there, and it ...


1

airtower-luna from GitHub community answered it here and it worked for me Answer pasted below: The command in your workflow file is not the same as the one in your sudoers file, sudo doesn’t know they are functionally equivalent. Use twentydb.service in the workflow, too. Also, is the user your runner runs as in the sudo group? If not, that entry won’t apply ...


1

You might try installing the GitHub Integration plugin. Reading their documentation, they provide a number of environment variables you can use for your purpose. GITHUB_PR_STATE can be OPEN, CLOSE GITHUB_PR_SOURCE_BRANCH for the source branch (e.g., hotfix/foo) GITHUB_PR_TARGET_BRANCH or master Using the when condition, you can run a job/stage when it's a ...


1

Developers or even admins of your GitHub repository wouldn't be able to see secrets configured there by default. Even if you debug GitHub Actions workflows and accidentally log secrets, GitHub would mark them with ***. So the only attack vector I can think of is highly deliberate and it would require modifying GitHub Actions workflow code and egressing the ...


1

You can specify that you want gitlab to execute your CI job on a windows machine using tags. Gitlab made Windows Shared Runners available as Beta in Jan 2020. Their announcement shows how to use the tags key in your .gitlab-ci file to specify Windows machines. You can also run in a docker container in windows: https://docs.gitlab.com/runner/executors/...


1

GitHub doesn't support VFS. There are news articles in 2017 saying GVFS and later VFS would be supported by GitHub. As of today, there is no support and no planned support for it. My sources: https://github.com/microsoft/VFSForGit/issues/1640 https://github.community/t/vfsforgit-setup/128184 https://github.community/t/microsofts-virtual-filesystem-for-git/...


Only top voted, non community-wiki answers of a minimum length are eligible