Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Optimise pipeline deployments with explicit dependencies #955

Merged
merged 1 commit into from May 2, 2020

Conversation

nightah
Copy link
Member

@nightah nightah commented May 2, 2020

Pushes to master and tagged releases will have now have explicit dependencies for steps. This is specifically to prevent darwin based builds holding up execution of other steps which should not have a dependence.

The upstream hardcoded pipeline steps have already been changed to:

steps:
  # Blocking pipeline for master branch deployments (concurrency_group).
  - label: ":pipeline: Setup Pipeline"
    command: ".buildkite/pipeline.sh | buildkite-agent pipeline upload"
    concurrency: 1
    concurrency_group: "deployments"
    if: build.branch == "master"
    
  # Non-blocking pipeline for all others (tagged commits/local branches/PRs).
  - label: ":pipeline: Setup Pipeline"
    command: ".buildkite/pipeline.sh | buildkite-agent pipeline upload"
    if: build.branch != "master"
    
  - wait:
    if: build.pull_request.repository.fork != true && build.branch !~ /^dependabot\/.*/

  # Manual intervention by team required to deploy for forked PRs (prevent secret leakage).
  - block: "Public fork needs approval"
    if: build.pull_request.repository.fork == true
    
  # Blocking deployment for master branch deployments (concurrency_group).
  - label: ":rocket: Setup Deployment"
    command: ".buildkite/deployment.sh | buildkite-agent pipeline upload"
    concurrency: 1
    concurrency_group: "deployments"
    depends_on:
      - "build-docker-linux-amd64"
      - "build-docker-linux-arm32v7"
      - "build-docker-linux-arm64v8"      
    if: build.branch == "master"
  
  # Non-blocking deployment for all others (tagged commits/local branches).
  - label: ":rocket: Setup Deployment"
    command: ".buildkite/deployment.sh | buildkite-agent pipeline upload"
    depends_on:
      - "build-docker-linux-amd64"
      - "build-docker-linux-arm32v7"
      - "build-docker-linux-arm64v8"   
    if: build.branch != "master" && build.branch !~ /^dependabot\/.*/ && build.pull_request.repository.fork != true
    
  # Removed dependency optimisation for forked PRs to enforce block step.  
  - label: ":rocket: Setup Deployment"
    command: ".buildkite/deployment.sh | buildkite-agent pipeline upload"
    if: build.pull_request.repository.fork == true

Pushes to master and tagged releases will have now have explicit dependencies for steps. This is specifically to prevent darwin based builds holding up execution of other steps which should not have a dependence.
@authelia
Copy link

authelia bot commented May 2, 2020

Artifacts

These changes are published for testing on Buildkite and DockerHub.

Docker Container

  • docker pull authelia/authelia:ci-optimise-pipeline

Copy link
Member

@james-d-elliott james-d-elliott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Look at that speed!

@nightah nightah merged commit ce5f5e9 into master May 2, 2020
@nightah nightah deleted the ci-optimise-pipeline branch May 2, 2020 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants