Skip to content

Commit

Permalink
ci: Remove "test_updated" from release workflows (#6312)
Browse files Browse the repository at this point in the history
Co-authored-by: Dylan Anthony <[email protected]>
  • Loading branch information
abernix and dylan-apollo authored Nov 21, 2024
1 parent 800bf7a commit df41dd4
Showing 1 changed file with 86 additions and 41 deletions.
127 changes: 86 additions & 41 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ executors:
# See https://circleci.com/docs/xcode-policy along with the support matrix
# at https://circleci.com/docs/using-macos#supported-xcode-versions.
# We use the major.minor notation to bring in compatible patches.
#
#
# TODO: remove workaround added in https://github.com/apollographql/router/pull/5462
# once we update to Xcode >= 15.1.0
# once we update to Xcode >= 15.1.0
# See: https://github.com/apollographql/router/pull/5462
xcode: "14.2.0"
resource_class: macos.m1.large.gen1
Expand Down Expand Up @@ -93,6 +93,9 @@ parameters:
quick_nightly:
type: boolean
default: false
test_updated_cargo_deps:
type: boolean
default: false

# These are common environment variables that we want to set on on all jobs.
# While these could conceivably be set on the CircleCI project settings'
Expand Down Expand Up @@ -504,7 +507,7 @@ commands:
# Use the settings from the "ci" profile in nextest configuration.
NEXTEST_PROFILE: ci
# Temporary disable lib backtrace since it crashing on MacOS
# TODO: remove this workaround once we update to Xcode >= 15.1.0
# TODO: remove this workaround once we update to Xcode >= 15.1.0
# See: https://github.com/apollographql/router/pull/5462
RUST_LIB_BACKTRACE: 0
command: xtask test --workspace --locked --features ci,hyper_header_limits
Expand Down Expand Up @@ -599,6 +602,10 @@ jobs:
parameters:
platform:
type: executor
default: amd_linux_test
from_test_updated_cargo_deps_workflow:
type: boolean
default: false
executor: << parameters.platform >>
steps:
- checkout
Expand All @@ -611,6 +618,67 @@ jobs:
cargo fetch
- xtask_test:
variant: "updated"

- when:
condition:
equal: [ true, << parameters.from_test_updated_cargo_deps_workflow >> ]
steps:
- slack/notify:
event: fail
custom: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":x: The `test_updated_cargo_deps` workflow has **failed** for `${CIRCLE_JOB}` on `${CIRCLE_PROJECT_REPONAME}`'s `${CIRCLE_BRANCH}`!"
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"action_id": "success_tagged_deploy_view",
"text": {
"type": "plain_text",
"text": "View Job"
},
"url": "${CIRCLE_BUILD_URL}"
}
]
}
]
}
- slack/notify:
event: pass
custom: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":white_check_mark: The `test_updated_cargo_deps` workflow has passed for `${CIRCLE_JOB}` on `${CIRCLE_PROJECT_REPONAME}`'s `${CIRCLE_BRANCH}`."
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"action_id": "success_tagged_deploy_view",
"text": {
"type": "plain_text",
"text": "View Job"
},
"url": "${CIRCLE_BUILD_URL}"
}
]
}
]
}
pre_verify_release:
environment:
<<: *common_job_environment
Expand Down Expand Up @@ -750,20 +818,20 @@ jobs:
command: |
# Source of the new image will be ser to the repo URL.
# This will have the effect of setting org.opencontainers.image.source and org.opencontainers.image.author to the originating pipeline
# Therefore the docker image will have the same permissions as the originating project.
# Therefore the docker image will have the same permissions as the originating project.
# See: https://docs.github.com/en/packages/learn-github-packages/connecting-a-repository-to-a-package#connecting-a-repository-to-a-container-image-using-the-command-line
BASE_VERSION=$(cargo metadata --format-version=1 --no-deps | jq --raw-output '.packages[0].version')
ARTIFACT_URL="https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/0/artifacts/router-v${BASE_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
VERSION="v$(echo "${BASE_VERSION}" | tr "+" "-")"
ROUTER_TAG=ghcr.io/apollographql/nightly/router
echo "REPO_URL: ${REPO_URL}"
echo "BASE_VERSION: ${BASE_VERSION}"
echo "ARTIFACT_URL: ${ARTIFACT_URL}"
echo "VERSION: ${VERSION}"
echo "ROUTER_TAG: ${ROUTER_TAG}"
# Create a multi-arch builder which works properly under qemu
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker context create buildx-build
Expand Down Expand Up @@ -948,12 +1016,19 @@ jobs:
helm push ${CHART} oci://ghcr.io/apollographql/helm-charts
workflows:
test_updated_cargo_deps:
when: << pipeline.parameters.test_updated_cargo_deps >>
jobs:
- test_updated:
platform: amd_linux_test
from_test_updated_cargo_deps_workflow: true
ci_checks:
when:
not:
or:
- << pipeline.parameters.nightly >>
- << pipeline.parameters.quick_nightly >>
- << pipeline.parameters.test_updated_cargo_deps >>
jobs:
- lint:
matrix:
Expand All @@ -967,16 +1042,6 @@ workflows:
matrix:
parameters:
platform: [ amd_linux_build ]

- test_updated:
requires:
- lint
- check_helm
- check_compliance
matrix:
parameters:
platform:
[ amd_linux_test ]
- test:
# this should be changed back to true on dev after release
fuzz: false
Expand Down Expand Up @@ -1016,29 +1081,18 @@ workflows:
matrix:
parameters:
platform: [ amd_linux_build ]

- test_updated:
requires:
- lint
- check_helm
- check_compliance
matrix:
parameters:
platform:
[ amd_linux_test ]
- test:
requires:
- lint
- check_helm
- check_compliance
matrix:
parameters:
platform:
[ macos_test, windows_test, amd_linux_test, arm_linux_test ]
- build_release:
requires:
- test
- test_updated
- check_helm
- check_compliance
nightly: true
context:
- router
Expand Down Expand Up @@ -1073,6 +1127,7 @@ workflows:
or:
- << pipeline.parameters.nightly >>
- << pipeline.parameters.quick_nightly >>
- << pipeline.parameters.test_updated_cargo_deps >>
jobs:
- pre_verify_release:
matrix:
Expand Down Expand Up @@ -1110,16 +1165,6 @@ workflows:
ignore: /.*/
tags:
only: /v.*/
- test_updated:
matrix:
parameters:
platform:
[ amd_linux_test ]
filters:
branches:
ignore: /.*/
tags:
only: /v.*/
- test:
matrix:
parameters:
Expand Down Expand Up @@ -1148,7 +1193,6 @@ workflows:
- check_compliance
- pre_verify_release
- test
- test_updated
filters:
branches:
ignore: /.*/
Expand All @@ -1161,6 +1205,7 @@ workflows:
or:
- << pipeline.parameters.nightly >>
- << pipeline.parameters.quick_nightly >>
- << pipeline.parameters.test_updated_cargo_deps >>
jobs:
- secops/gitleaks:
context:
Expand Down

0 comments on commit df41dd4

Please sign in to comment.