Code Monkey home page Code Monkey logo

orbs's People

Contributors

adsr avatar akshayas avatar aldahick avatar ananyachandra avatar cgetzen avatar henrymunro avatar james-crowley avatar jc4883 avatar joshdholtz avatar leonardbinet avatar nirajjayant avatar noisyscanner avatar rlcooper46 avatar roopakv avatar russelltaga avatar ryan-timothy-albert avatar tetienne avatar twslade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

orbs's Issues

Run if modified: Check all commits since last build

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?

Getting "project not found" error

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?

Wait for specified job to get in running status

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.

So what is my 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.

what I have tried so far

Here is what I've tried so far with your wait_for_job command --> ehrbase/ehrbase@3f75552#diff-1d37e48f9ceff6d8030570cd36286a61R1586-R1675

queue_up_workflow and wait_for_workflow not working

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

Temporary directory is not present.

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}

Run if modified: continuing the job, not halt it

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?

trigger-pipeline command doesn't work for tags

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

Triggering Forked Pull Requests Pipeline

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.

trigger_workflow() {
curl --silent -X POST \
"https://circleci.com/api/v2/project/<< parameters.vcs-type >>/$<< parameters.user >>/$<< parameters.repo-name >>/pipeline?circle-token=${CIRCLE_TOKEN}" \
-H 'Accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"branch": "'$CIRCLE_BRANCH'",
"parameters": << parameters.custom-parameters >>
}'
}

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 use pull/<number>/head for the PR ref or pull/<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?

Incorrect jq usage in append_string_to_params

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:
image

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.