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

infra: Publish nightly releases of the Router from dev source #2409

Merged
merged 17 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 43 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ parameters:
protoc_version:
type: string
default: "21.8"
nightly:
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 @@ -415,6 +418,9 @@ jobs:
parameters:
platform:
type: executor
nightly:
type: boolean
default: false
executor: << parameters.platform >>
environment:
<<: *common_job_environment
Expand All @@ -424,15 +430,18 @@ jobs:
MACOS_PRIMARY_BUNDLE_ID: com.apollographql.router
steps:
- checkout
- run:
name: Initialize submodules
command: git submodule update --recursive --init
Comment on lines -427 to -429
Copy link
Member Author

Choose a reason for hiding this comment

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

This is actually not related to this PR, but should no longer be necessary after #1856

- when:
condition:
equal: [*macos_build_executor, << parameters.platform >>]
steps:
- install_minimal_rust
- macos_install_baseline
# This will set the version to inlude current date and commit hash
- when:
condition:
equal: [true, << parameters.nightly >>]
steps:
- run: cargo xtask release prepare nightly
- run:
command: >
cargo xtask dist
Expand Down Expand Up @@ -461,6 +470,12 @@ jobs:
sudo apt-get update
- install_minimal_rust
- linux_amd_install_baseline
# This will set the version to inlude current date and commit hash
- when:
condition:
equal: [true, << parameters.nightly >>]
steps:
- run: cargo xtask release prepare nightly
- run:
command: >
cargo xtask dist
Expand All @@ -481,6 +496,12 @@ jobs:
sudo apt-get update
- install_minimal_rust
- linux_arm_install_baseline
# This will set the version to inlude current date and commit hash
- when:
condition:
equal: [true, << parameters.nightly >>]
steps:
- run: cargo xtask release prepare nightly
- run:
command: >
cargo xtask dist
Expand Down Expand Up @@ -515,6 +536,12 @@ jobs:
git-fetch-with-cli = true
"@
- windows_install_baseline
# This will set the version to inlude current date and commit hash
- when:
condition:
equal: [true, << parameters.nightly >>]
steps:
- run: cargo xtask release prepare nightly
- run:
command: >
cargo xtask dist
Expand Down Expand Up @@ -604,6 +631,8 @@ jobs:

workflows:
ci_checks:
when:
not: << pipeline.parameters.nightly >>
Comment on lines +665 to +666
Copy link
Member Author

Choose a reason for hiding this comment

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

Mildly frustratingly, this is a requirement of the way that CircleCI invokes workflows, so this will have to be present on each new workflow we may potentially add here in the future.

jobs:
- lint:
matrix:
Expand Down Expand Up @@ -670,7 +699,18 @@ workflows:
requires:
- prepare_patch_release_approval

nightly:
when: << pipeline.parameters.nightly >>
jobs:
- build_release:
matrix:
parameters:
platform:
abernix marked this conversation as resolved.
Show resolved Hide resolved
[macos_build, windows_build, amd_linux_build, arm_linux_build]

Copy link
Member Author

Choose a reason for hiding this comment

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

Note that this doesn't currently actually publish anything to GitHub Releases like normal releases. Assuming these jobs don't start failing immediately, my next steps are to introduce a step that saves these to CircleCI artifacts:

      - store_artifacts:
          path: ./artifacts

Roughly documented here.

release:
when:
not: << pipeline.parameters.nightly >>
jobs:
- build_release:
matrix:
Expand Down
68 changes: 68 additions & 0 deletions xtask/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ camino = "1"
cargo_metadata = "0.15"
chrono = "0.4.23"
flate2 = "1"
git2 = "0.16.0"
itertools = "0.10.5"
libc = "0.2"
octorust = "0.2.1"
Expand Down
Loading