Giter VIP home page Giter VIP logo

Comments (13)

ElijahLynn avatar ElijahLynn commented on July 17, 2024

The output of the build job is simply:

#!/bin/bash -eo pipefail
/build-tools-ci/scripts/set-environment
Do not run Composer as root/super user! See https://getcomposer.org/root for details

Since it is trying to run composer (root warning I assume is coming from https://github.com/pantheon-systems/docker-build-tools-ci/blob/1.x/scripts/set-environment#L50), I would have expected the echo 2 lines up to have output "Install Terminus Build Tools...".

from example-drops-8-composer.

ElijahLynn avatar ElijahLynn commented on July 17, 2024

Re-ran as SSH and went into box. The conditional should be true:

# If there is a PR number provided, though, then we will use it instead.
if [[ -n ${CIRCLE_PULL_REQUEST} ]] ; then
  PR_NUMBER=${CIRCLE_PULL_REQUEST##*/}
  DEFAULT_ENV="pr-${PR_NUMBER}"
fi

CIRCLE_PULL_REQUEST=ElijahLynn/pantheon-d8-composer-project-elijah#2

I am guessing it is failing at another point.

from example-drops-8-composer.

ElijahLynn avatar ElijahLynn commented on July 17, 2024

Actually, it does seem like that part is all correct:

root@57d56bf4b50d:/build-tools-ci/scripts# cat /tmp/.bash_env-5b4a64408948120013306e41-0-build
export PATH=$PATH:$HOME/bin
export DEFAULT_ENV='pr-2'
export TERMINUS_HIDE_UPDATE_MESSAGE=1
export TERMINUS_ENV=${TERMINUS_ENV:-$DEFAULT_ENV}

But maybe somehow the build_deploy_and_test job in the workflow isn't getting it correctly.

from example-drops-8-composer.

ElijahLynn avatar ElijahLynn commented on July 17, 2024

./.circleci/scripts/pantheon/01-prepare
Begin build for ci-9. Pantheon test environment is pantheon-d8-composer-project-elijah.ci-9

from example-drops-8-composer.

ElijahLynn avatar ElijahLynn commented on July 17, 2024

K, I think there is a race condition issue with circleci. I re-ran the build_deploy_and_test job manually and it created the multidev correctly with PR-2 as the name. I don't really know how this all works yet but what I saw was that the build and build_deploy_and_test jobs are both triggered simultaneously and run as such. It seems like the ENV prep it does may not be ready in time?

image

from example-drops-8-composer.

greg-1-anderson avatar greg-1-anderson commented on July 17, 2024

The first build you will get a ci-* multidev, because the PR has not been created yet. You could get another ci-* multidev if you re-run a job without creating a PR (and maybe even if you re-run the ci-* build after creating the PR). Once the PR is created, then you'll start getting pr-* multidevs for each commit added to the branch.

from example-drops-8-composer.

ElijahLynn avatar ElijahLynn commented on July 17, 2024

K, just tested and confirmed the expected behavior you stated. This is pretty harsh, and I can't help but think there must be a way to get the PR # at that stage. Is there some oddity I am missing about how this works or has it just not focused on as much. I ask because I want to look into this some more and get it working with PR-N from the first build, but if I am going to hit a dead end for some odd reason then please let me know.

from example-drops-8-composer.

greg-1-anderson avatar greg-1-anderson commented on July 17, 2024

You cannot get the pull request number before the pull request has been opened, because there is no pull request number yet.

If you want to have only pr-* builds for pull requests, and skip ci-* builds save for merges to master, then you can configure CircleCI to only build on pull requests.

from example-drops-8-composer.

stevector avatar stevector commented on July 17, 2024

Related: pantheon-systems/terminus-build-tools-plugin#118

from example-drops-8-composer.

ElijahLynn avatar ElijahLynn commented on July 17, 2024

I am still confused by this. When the PR is opened it fires off to CircleCI after the PR has been opened, correct?

According to https://developer.github.com/v3/activity/events/types/#pullrequestevent it says the below and list number as one of the fields in the payload.

PullRequestEvent
Triggered when a pull request is assigned, unassigned, labeled, unlabeled, opened, edited, closed, reopened, or synchronized. Also triggered when a pull request review is requested, or when a review request is removed.

number | integer | The pull request number.

What am I missing here?

from example-drops-8-composer.

greg-1-anderson avatar greg-1-anderson commented on July 17, 2024

If CircleCI starts a build before the PR has been opened, then it won't run another one after the PR has been opened, at least not until you push another commit to the branch.

Whether CircleCI waits until the PR is opened before running builds on new branches is a configuration option you can set.

from example-drops-8-composer.

ElijahLynn avatar ElijahLynn commented on July 17, 2024

Oh, so because I pushed any branch (with new commits) at all, it triggered a CI build and THEN I opened the PR which already was building a multidev, which caused it to get CI-N? K, gonna run and test turning on "only build pull requests" as mentioned in pantheon-systems/terminus-build-tools-plugin#118.

from example-drops-8-composer.

ElijahLynn avatar ElijahLynn commented on July 17, 2024

WORKS!

Thanks for going through that with me, this works for now, closing.

e.g. ElijahLynn/pantheon-d8-composer-project-elijah#7

image

from example-drops-8-composer.

Related Issues (20)

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.