How can I display the url of a page in concourse pipeline so that I can click the url in the pipeline to jump to the corresponding page - concourse

I am trying to create a concourse pipeline where there should be a url link and that link should be clickable to jump to the corresponding page. Here is my code which is giving the static link.
- task: url-link
config:
platform: linux
image_resource:
type: xyz resource
source:
repository: docker.xyz/my-repo
run:
path: echo
args: [ "http://example.com/pipeline" ]
So, here https://example.com/pipeline is displayed in the pipeline. But this is a static link that I need to copy and paste to the browser and click to go to the page. I want this link be clickable so that once I click in this link, I can directly jump to the page.
Another thing I want is to put version at the end of the link like https://example.com/pipeline/version.
This version will be dynamic meaning that it will change every time i run the pipeline.
So, What should be my code to insert the url along with the changing version in the concourse yml file?

Any output from tasks and resources are treated as text, there is no highlighting in them.
Only in the resource metadata that links will be parsed as such.

Related

Is it possible to assign GitHub issues directly to project boards when creating the issue in Visual Studio Code using GitHub pull requests and issues?

Environment:
VSCode installed
Signed in to GitHub in VSCode
"GitHub pull requests and issues" extension installed
Single repository open that has known project boards, eg. "General"
Explanation:
If I open the Command Palette in VSCode and type "GitHub Issues: Create an issue" and press enter, a file opens. The file is called "NewIssue.md" and contains the following:
Issue Title
Assignees: Comma-separated usernames, either #username or just username.
Labels: Comma-separated labels.
<!-- Edit the body of your new issue then click the ✓ "Create Issue" button in the top right of
the editor. The first line will be the issue title. Assignees and Labels follow after a blank
line. Leave an empty line before beginning the body of the issue. -->
I am able to create an issue and body with a title as suggested in the comment block.
Is there a way to assign this to a project board within this file?
I have tried adding Projects: General below Labels:
It created the issue but did not automatically assign it to the project board.
Thanks
If you are using the beta project board, you can use this action: https://github.com/marketplace/actions/add-to-github-projects-beta to add issues to your board from a workflow.
The action is pretty well documented but the overall idea is you have a workflow that is triggered on new issues or changes to existing issue labels and if the labels match a list that you define, then the issue is added to the board.

How to set up actions in GitHub for new user?

I just got a GitHub account and writing small scripts in Python which I am learning.
While adding my code to GitHub I noticed there is an option to run tests/validation on my code but mine is empty.
I googled around and found that lint and black and are good checks.
I found this Action that I want to add - https://github.com/marketplace/actions/python-quality-and-format-checker
There is a "script" and a "config" that I think I need to add/update somewhere. Also when I click "Use latest version" it tells me to add the code into some .yml.
Can anyone assist me in installing this Action or point me in the right direction? Also, how can I use this Action on all my repositories/code?
=======================================
EDIT:
This link has the instructions - https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow
place yaml or yml in this directory -> .github/workflows
For this Action: https://github.com/marketplace/actions/python-quality-and-format-checker
the code inside the file will look like this:
on: [push, pull_request]
name: Python Linting
jobs:
PythonLinting:
name: Python linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout#master
- name: Konstruktoid Python linting
uses: konstruktoid/action-pylint#master
thanks to: bertrand martel
pylint is part of the new GitHub Super Linter (github/super-linter):
Introducing GitHub Super Linter: one linter to rule them all
The Super Linter is a source code repository that is packaged into a Docker container and called by GitHub Actions. This allows for any repository on GitHub.com to call the Super Linter and start utilizing its benefits.
When you’ve set your repository to start running this action, any time you open a pull request, it will start linting the code case and return via the Status API.
It will let you know if any of your code changes passed successfully, or if any errors were detected, where they are, and what they are.
This then allows the developer to go back to their branch, fix any issues, and create a new push to the open pull request.
At that point, the Super Linter will run again and validate the updated code and repeat the process.
And you can set it up to only int new files if you want.
Update August 2020:
github/super-linter issue 226 has been closed with PR 593:
This Pr will add:
Black python linting
Updated tests

Change Artifacts Explore Link in Visual Studio Team Services

I have successfully created a build within Visual Studio Team Services. One step of the build is to copy the outcome (artifact) to a Drop Folder which contains all versions of the artifact for that build. So far so good.
As you can see in the following image. I am using a File share as the Artifact Type and then I specify the path where the artifact has to be copied.
Now the issue. When I go to the build summary and click on the artifact tab, I can see the explore link. Clicking on that link will pop up the following:
The browser cannot open the following location due to this browser's
security settings. You will need to copy the location and open it
manually.
The location is: file://BuildServer/BuildDrops/MyArtifactName/[version
here]
OK to copy the location to your clipboard.
So I set up an FTP server in such a way that the ftp://BuildServer/BuildDrops/ URL is pointing to the same path specified in the Copy Publish Artifact build task.
But I see no way to modify the link to use my custom URL.
Ideally, the Copy Publish Artifact task should accept a variable, let's say, Artifact Link Base URL so I can pass the value for the base URL and the link will use this value instead.
Anyway, my question.
Is there any way to modify the link whatsoever?
There isn’t the way or feature to modify the artifact link URL in Visual Studio Team Services.
You can build a custom extension (https://www.visualstudio.com/en-us/docs/integrate/extensions/overview_ to build a FTP URL according to build artifact download URL, then generate a hyperlink to navigate to corresponding FTP site.
Extension sample for build results: https://github.com/Microsoft/vsts-extension-samples/tree/master/build-results-enhancer

How to make GitHub correctly show the build status image of the Jenkins Build Status plugin

Here's an example of a project:
https://github.com/storm-enroute/macrogl
The README.md of this project contains a build status image from a Jenkins running on a server somewhere else:
[![Build Status](https://ci.storm-enroute.com:8080/job/public-macrogl/badge/icon)](https://ci.storm-enroute.com:8080/job/public-macrogl/)
This image is rendered perfectly in Stackoverflow and Github static pages, but on the Github website it is cached to the content delivery network called Fastly. Opening the image URL shows "Not found".
Why is this happening?
How do I have the Github web interface render a markdown with such an image correctly?
How do I have the Github web interface render a markdown with such an image correctly?
The syntax is correct.
Some other project leverage such feature (see LibGit2Sharp Readme or libgit2 Readme for instance).
Why is this happening?
Few seconds ago, https://ci.storm-enroute.com:8080/job/public-macrogl/badge/icon was returning a 404 for me. It looks now fixed.
However, there's a possibility that when the CI server is offline/can't be reached, the 404 is temporarily cached by Camo and served until the cache expires.
install jenkins plugin for embeddable-build-status from: https://plugins.jenkins.io/embeddable-build-status
add to your README.md the tags you want:
Plain Link (with view)
http://URL:8080/buildStatus/icon?job=JOB_NAME
Plain Link (without view)
http://URL:8080/buildStatus/icon?job=JOB_NAME
Markdown (with view)
Build Status http://URL:8080/buildStatus/icon?job=JOB_NAME
Markdown (without view)
Build Status http://URL:8080/buildStatus/icon?job=JOB_NAME
3.Configure jenkins security to allow the status view:
Manage Jenkins -> Configure Security -> Authorization -> choose matrix-based security and check the "ViewStatus" box for the Anonymous user.
if admin user is not there, add it and give it permission to all the boxes.
For anyone else spending way more time than intended on this and wanting a little clarity on what link(s) to use after installing the Emeddable Build Status plugin:
If you navigate to the job in the Jenkins (jenkins_home >> repo >> project >> branch), there's a "Emeddable Build Status" widget you can click on the left pane, and it'll show list exactly what links you can use for your specific jobs.
The following URL structure might also get you to the embeddable build status page:
https://<jenkins_host>/job/<github_owner_or_org>/job/<github_repo_name>/job/master/badge/
Update: I had a similar issue. It turned that the cache server requires the image to be hosted behind a HTTPS, with a fully valid SSL certificate chain (CA(s) + cert). Once your server provides the full cert chain, github will display your badge.

Jira Confluence Integration with Jenkins

I was able configure Jira confluence in the global configuration page of Jenkins, however I am not able to follow quitely how to use in the job specif configuration page.
Publish to Confluence
Confluence Site
Space What should I give?
Page What is the input?
How to use Markup wiki, Please advise.
Extract from from https://wiki.jenkins-ci.org/display/JENKINS/Confluence+Publisher+Plugin
With at least one site configured, enable the "Publish to Confluence"
post-build action, and select from one of the pre-configured
Confluence sites. Enter the Space and Page name where the attachment
should end up (e.g., for this URL
(https://wiki.jenkins-ci.org/display/JENKINS/Confluence+Publisher+Plugin),
Space name = "JENKINS", Page name = "Confluence+Publisher+Plugin").
If you have enabled "Archive the artifacts", and wish to automatically
upload everything that was archived, check the box labeled "Attach
archived artifacts to page". Otherwise, enter an Ant-style fileset
pattern to specify which files should be uploaded.