roopakv / orbs Goto Github PK
View Code? Open in Web Editor NEWSwissknife! A set of useful commands / jobs in circle workflows
License: MIT License
Swissknife! A set of useful commands / jobs in circle workflows
License: MIT License
Am I reading the code correctly that the Run if modified
command is presumed to run via a pull request only, i.e. we diff against master
?
I.e. as opposed to the approach of checking CIRCLE_COMPARE_URL
(or the new pipeline variables) to look at the last commit a build ran for?
Hi Roopak,
Thanks for building this, very helpful. However I am getting the following error while trying to build:
{
"message" : "Project not found"
}
CircleCI received exit code 0
At first, I thought it's because of some incorrect setting in CIRCLE_TOKEN but I have double verified that it's generated from "User settings" section and added in Env variable. Can you let me know what could be the issue?
Right now the wait_for_workflows
command and job runs for only one branch. Make it support global (across all branches) and if possible multiple branches (using a regex)
Hello Roopak
Thank you for this great orb.
I think it would be useful to have 3 dots for the git diffs.
https://matthew-brett.github.io/pydagogue/git_diff_dots.html
My use case is I don't want to trigger my develop branch due to a commit change F or G as in example above.
Using version
swissknife: roopakv/[email protected]
There is no way how to find changes with the following regexp:
^(?!test).*
Hi
I want to use run_if_modified multiple times consecutively to do different steps based on different patterns and also have a step run after using run_if_modified. However, the problem is that run_if_modified completely ends the whole job if a pattern is not matched rather than continuing to the next steps. any way to change this?
Great work.
I'm trying to use your orb, but my use case needs negative lookahead in regex, which needs -P to be added to the grep
command. See https://stackoverflow.com/a/9198987.
Keep it up :)
Hey, super useful orb - thank you! We are hoping that trigger-workflows-for-all-modified
will substantially speed up our CI and bring the cost down.
When using the above step, it fails with the following error:
I copied the source of this into our pipeline and added set -x
for debugging - it looks like jq -cr
is the culprit. Trying this locally I got the same error and it seems that jq -cr ''
is correct if you want to redirect the output to a file. I will put in a PR to fix this.
Hi,
I've posted a detailed question on circleci's issue tracker about the start/run order of parallel jobs.
Is it something SK orb could handle?
Hiya!
I've been spending several hours trying to get either queue_up_workflow
or wait_for_workflow
working in my pipeline, but I keep getting a Exited with code exit status 22
. Here's some of the code I'm using:
workflows:
installers:
jobs:
...
deployment:
jobs:
- swissknife/queue_up_workflow:
workflow-name: "installers"
- deploy:
requires:
- swissknife/queue_up_workflow
Hi @roopakv! As discussed here you wanted to check if this is possible. To be clear: it is possible to wait for a job to get in "running" status, but it does not solve my particular problem.
I have 12 concurrent test jobs. Due to the nature of the free trier plan for open source project only 4 of them start simultaneously (the others are queued). I want to make sure that the one job that takes the most time starts first among the 12 concurrent jobs. The idea behind that is to ensure the shortest execution path.
Here is what I've tried so far with your wait_for_job command --> ehrbase/ehrbase@3f75552#diff-1d37e48f9ceff6d8030570cd36286a61R1586-R1675
Thanks for the great tool!
I'm seeing an issue trying to trigger builds for a pull request from a trusted fork. I've looked through the orb code and I'm seeing an issue with the branch name reference for the pipeline trigger.
orbs/src/commands/trigger_pipeline_if_modified.yml
Lines 54 to 63 in 6c8ff9d
The branch I am trying to trigger is pull/610
.
The response I get is Branch not found.
.
In the circle docs for triggering a pipeline they mention the following:
The branch where the pipeline ran. The
HEAD
commit on this branch was used for the pipeline. Note that branch and tag are mutually exclusive. To trigger a pipeline for a PR by number usepull/<number>/head
for the PR ref orpull/<number>/merge
for the merge ref (GitHub only).
I can trigger the build using the syntax:
curl --silent -X POST "https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline?circle-token=${CIRCLE_TOKEN}"
-H 'Accept: */*'
-H 'Content-Type: application/json'
-d '{
"branch": "'pull/610/head'",
"parameters": '$custom_params'
}
Is this something that can be added to this orb or should I look into doing some env modification before triggering the build?
Hello!
When invoking the trigger-pipeline
command for a tag
seeing an error like:
----------------------------------------
Triggering Pipeline
{
"message" : "Invalid input"
}Finished triggering pipeline
----------------------------------------
CircleCI received exit code 0
In this scenario, CIRCLE_BRANCH
is blank and CIRCLE_TAG
is set to the value of the git tag.
Think we can fix this with some slight modifications here to add tag
to the body of the CircleCI API call.
https://github.com/roopakv/orbs/blob/master/scripts/trigger-pipeline.sh#L25
If you agree, we can post a PR
When using the orb with a custom save-to-directory
, the /tmp/swissknife/
directory is not created and it fails with
environment: line 26: /tmp/swissknife/artifacts.json: No such file or directory
I think the script needs to be updated to create the /tmp/swissknife/
first.
This on version v0.69.0.
Example:
- swissknife/get_job_artifacts:
file-name-pattern: "artifact.tar.gz"
job-number: LAST_SUCCESFUL_BUILD_NUMBER
repo-name: REPO_NAME
vcs-type: bitbucket
save-to-directory: ${CIRCLE_WORKING_DIRECTORY}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.