Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
chore: restore forks thingy
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Holzer committed Aug 19, 2022
1 parent 4f9aa02 commit d825567
Showing 1 changed file with 70 additions and 68 deletions.
138 changes: 70 additions & 68 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ commands:
docker cp build-image-test-execution:/opt/buildhome/test-env/report.xml ./report.xml
- store_test_results:
path: ./report.xml

jobs:
build-test-and-push-image:
parameters:
Expand Down Expand Up @@ -303,21 +304,24 @@ jobs:
# Workflows are where we specify the job order and job parameters (if applicable)
workflows:
# Workflow responsible for building git tags (commonly the final releases we use within buildbot)
# build-git-tag-and-push:
# jobs:
# # Only build squash images for git tags (the final release used in buildbot)
# - build-and-push-images:
# filters:
# tags:
# only: /^v.*/
# branches:
# ignore: /.*/
# name: build-and-push-git-tag-squash-image
# context: build-image-registry
# container-image: "netlify/build"
# squash-images: true
# build-test-image: false
# save-images-in-workflow: false
build-git-tag-and-push:
jobs:
# Only build squash images for git tags (the final release used in buildbot)
- build-test-and-push-image:
name: build-and-push-git-tag-squash-image
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
context: [build-image-registry]
container-image: "netlify/build"
push-images: false # TODO: revert just for testing out
tests: false
squash-images: true
matrix:
parameters:
executor: [amd64, arm64]
# # For git tags we still want to build and push non squashed images
# - build-and-push-images:
# filters:
Expand Down Expand Up @@ -353,58 +357,56 @@ workflows:
requires:
- build-test-and-push-image

########################################################################
# FORKED PRS
# Those jobs just apply to forked PRs
########################################################################
# - build-test-and-push-image:
# name: build-test-image-for-forks
# filters:
# branches:
# # Forked pull requests have CIRCLE_BRANCH set to pull/XXX
# only: /pull\/[0-9]+/
# container-image: "netlify/build"
# save-images-in-workflow: true # we need to save them to push them in a later job
# push-images: false
# matrix:
# parameters:
# executor: [amd64, arm64]
########################################################################
# FORKED PRS
# Those jobs just apply to forked PRs
########################################################################
build-test-and-push-fork:
jobs:
- build-test-and-push-image:
filters:
branches:
# Forked pull requests have CIRCLE_BRANCH set to pull/XXX
only: /pull\/[0-9]+/
container-image: "netlify/build"
save-images-in-workflow: true # we need to save them to push them in a later job
push-images: false
matrix:
parameters:
executor: [amd64, arm64]

# - hold-push-to-registry:
# type: approval
# requires:
# - build-test-image-for-forks-amd64
# - build-test-image-for-forks-arm64
- hold-push-to-registry:
type: approval
requires:
- build-test-and-push-image

# - forks-push-to-registry:
# context: build-image-registry
# container-image: "netlify/build"
# requires: [hold-push-to-registry]
# executor: arm64
# - run-tests:
# container-image: "netlify/build"
# requires:
# [build-and-push-images, build-images-for-forks, docker/hadolint]
# - container-structure-tests:
# container-image: "netlify/build"
# requires:
# [build-and-push-images, build-images-for-forks, docker/hadolint]
# # A scheduled daily build and test run to detect issues early instead of during a release or fix
# daily-test:
# triggers: # Use the triggers key to indicate a scheduled build
# - schedule:
# cron: "0 8 * * *"
# filters:
# branches:
# only:
# - xenial
# - focal
# jobs:
# - build-and-push-images:
# container-image: "netlify/build"
# build-test-image: true
# save-images-in-workflow: true
# push-images: false
# - run-tests:
# container-image: "netlify/build"
# requires: [build-and-push-images]
- forks-push-to-registry:
context: build-image-registry
container-image: "netlify/build"
requires: [hold-push-to-registry]
matrix:
parameters:
executor: [amd64, arm64]

- create-multi-arch-image:
context: [build-image-registry]
container-image: "netlify/build"
requires:
- forks-push-to-registry

# A scheduled daily build and test run to detect issues early instead of during a release or fix
daily-test:
triggers: # Use the triggers key to indicate a scheduled build
- schedule:
cron: "0 8 * * *"
filters:
branches:
only:
- focal
jobs:
- build-test-and-push-image:
container-image: "netlify/build"
push-images: false
matrix:
parameters:
executor: [amd64, arm64]

0 comments on commit d825567

Please sign in to comment.