Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
db813b3
wip deployer script
jeromegn Jul 15, 2024
8d8957d
add app name and org slug speicifiers
jeromegn Jul 15, 2024
f34c9e9
generate full config beforehand, if DEPLOY_NOW env is defined, run fl…
jeromegn Jul 17, 2024
ed94877
fix manifest return, don't specify region when deploying
jeromegn Jul 17, 2024
a38be4e
support more env vars to configure the deployer, adjust fly launch ge…
jeromegn Jul 18, 2024
d889fee
fix spacing and types, set vm size options in config
jeromegn Jul 19, 2024
8726038
add elixir and nodejs
jeromegn Jul 26, 2024
108f41a
adds a build step, a diff artifact and finally generates files on dis…
jeromegn Jul 29, 2024
836015d
send metadata about the deploy steps before starting
jeromegn Aug 1, 2024
03d828c
fly pg creation from deployer
jeromegn Aug 2, 2024
0897f2d
trying to allow multiple ruby versions, but failing. wip commit
jeromegn Aug 4, 2024
9a4c268
Use dev envs for elixir and nodejs
lubien Aug 6, 2024
c01b275
Fix support for [build.image]
lubien Aug 6, 2024
449886e
Fix typo
lubien Aug 6, 2024
fc9b7ff
Maybe fix secrets setting
lubien Aug 7, 2024
97a3062
merged main and tested more frameworks
jeromegn Aug 12, 2024
a98b4ab
add launch sessions subcommands, adjust deploy script to use them
jeromegn Aug 12, 2024
07d5b9c
create all extensions from a launch manifest
jeromegn Aug 13, 2024
8087cac
update fly config after tweak form resolves, use org slug from final …
jeromegn Aug 14, 2024
d5ba0b0
merged master
jeromegn Aug 14, 2024
fa7c154
add runtime to plan for rails, node, and bun
rubys Aug 14, 2024
3153d0b
extract ruby version from .ruby-version or Gemfile
rubys Aug 14, 2024
7897948
Merge remote-tracking branch 'origin/plan-runtime' into deployer
jeromegn Aug 14, 2024
d69cec8
defer the running of bundle install in the rails scanner to the callback
rubys Aug 14, 2024
6a4c627
merged rails-defer-bundle-install
jeromegn Aug 14, 2024
8588928
use launch plan subcommands, install dependencies
jeromegn Aug 14, 2024
432f560
wip installing deps for more frameworks
jeromegn Aug 19, 2024
306980e
Scan composer file for php version, fallback to artisan version if ca…
Aug 19, 2024
bbf0353
fix trailing spaces, fix gofmt error
Aug 19, 2024
e723e40
Merge remote-tracking branch 'origin/detect_php_from_composer_json' i…
jeromegn Aug 20, 2024
63261c5
write manifest to fix, switch customization opt-out instead of opt-in…
jeromegn Aug 20, 2024
a62607a
don't log everything, re-order steps, always do JSON for artifacts
jeromegn Aug 28, 2024
6fcadd1
add DEPLOY_ONLY env to prevent all the planning of a launch
jeromegn Sep 11, 2024
fae836f
fix conditional to skip extensions when using DEPLOY_ONLY
jeromegn Sep 13, 2024
65e4ff4
trying to make the deployer testable via the CI
jeromegn Sep 13, 2024
5c83bc7
use the correct restart policy
jeromegn Sep 13, 2024
225ceb8
on eof, don't panic, try to attach stdout and stderr
jeromegn Sep 13, 2024
9e1c271
attempt to wait for container
jeromegn Sep 16, 2024
2bfae94
check for nil error from container wait channel
jeromegn Sep 16, 2024
ad9f3ce
attempt not to loop endlessly when everything is done
jeromegn Sep 16, 2024
c438f89
write all to stdout
jeromegn Sep 16, 2024
337096e
build just once
jeromegn Sep 16, 2024
97d67a6
I wanted github.sha to tag the docker image, not github.ref
jeromegn Sep 16, 2024
155aa32
first, pull the deployer image
jeromegn Sep 16, 2024
c69aa93
upgrade docker module, successfully build and deploy the deploy-node …
jeromegn Sep 16, 2024
79413c0
moved a few tests around, start parsing logs and testing the deployer…
jeromegn Sep 16, 2024
35b2db7
merged master
jeromegn Sep 17, 2024
f93cdba
ignore .fly
jeromegn Sep 17, 2024
50f0928
always generate git diff
jeromegn Sep 17, 2024
45210ba
abstracted the deployer run to be reusable
jeromegn Sep 17, 2024
8bfb0d2
run deployer tests during preflight
jeromegn Sep 17, 2024
39171ae
add launch test
jeromegn Sep 17, 2024
0ad2e56
disable depot
jeromegn Sep 18, 2024
6f6c089
go mod tidy
jeromegn Sep 18, 2024
7adf153
add go-example test
jeromegn Sep 18, 2024
ef780b9
refactor deployer tests to make them more succinct
jeromegn Sep 18, 2024
cd59492
more readable tests
jeromegn Sep 25, 2024
d62e134
Merge remote-tracking branch 'origin/master' into deployer
jeromegn Sep 25, 2024
b032feb
fix node scanner
jeromegn Sep 27, 2024
1434718
possibly fix weird setup where override fly.toml should clear a templ…
jeromegn Sep 27, 2024
7fc099c
Deployer: open pr on launch (#3953)
lubien Sep 30, 2024
30c2e94
bomb if plan propose doesn't detect anything
jeromegn Sep 30, 2024
717395f
fix color output for error message when no framework is detected
jeromegn Sep 30, 2024
3b939c0
even if opting out of gha, return the source info
jeromegn Sep 30, 2024
811cfac
test for opt out gha
jeromegn Sep 30, 2024
ff17b7d
download correct default node.js to save some time
jeromegn Sep 30, 2024
42e59ff
try to cache deployer build
jeromegn Sep 30, 2024
fb0063d
setup buildx
jeromegn Sep 30, 2024
f2379ac
use local context for build
jeromegn Sep 30, 2024
a5e56bf
Run deployer tests in separate workflow (#3977)
jeromegn Oct 1, 2024
bc093bc
adjust logs when not detecting runtime or Dockerfile
jeromegn Oct 1, 2024
3057043
synchronously write to stdout/stderr
jeromegn Oct 2, 2024
9ec4879
Custom config for deployer monorepos (#3976)
lubien Oct 7, 2024
25e2811
Merge remote-tracking branch 'origin/master' into deployer
jeromegn Oct 11, 2024
79b1003
add rails 8 test, fix rvm install and usage, better ruby version dete…
jeromegn Oct 11, 2024
6e12d09
use bash_profile instead of profile since we're using a bash login shell
jeromegn Oct 12, 2024
68e01e2
install rvm after mise...
jeromegn Oct 12, 2024
1329ad0
set node.js for nextjs, nuxt and redwood projects
jeromegn Oct 14, 2024
2f3878e
install a default node.js version if anything needs it
jeromegn Oct 15, 2024
14739e4
switch to node 20 by default
jeromegn Oct 15, 2024
a46108d
maybe delete the container more proactively
jeromegn Oct 15, 2024
11ed89f
run deployer tests as root
jeromegn Oct 15, 2024
0044e78
also install gotessplit as root
jeromegn Oct 15, 2024
b2eacad
add a cleanup env var, mostly useful in tests
jeromegn Oct 15, 2024
84665ab
detect a Dockerfile first and foremost
jeromegn Oct 16, 2024
ede91b5
Deployer: skip installing dependencies in some cases (#4019)
jeromegn Oct 21, 2024
c0c1983
ensure flushing of stdout and stderr before exit
jeromegn Oct 21, 2024
2b205e0
sleep 1 second after flushing just to be sure all log lines are ingested
jeromegn Oct 21, 2024
7e16e26
Add node yarn test and fix yarn installation for node > 18 (#4023)
jeromegn Oct 22, 2024
2c8bb4c
removing a few warnings that don't apply to deployers
jeromegn Oct 22, 2024
3a32452
use a depot builder scoped by app so they don't share cache and all t…
jeromegn Oct 22, 2024
8efd9b6
validate existence of fly.toml earlier when deploy-only
jphenow Oct 23, 2024
47466bb
exit after error
jphenow Oct 23, 2024
9ada865
Deployer: actually support Bun (#4042)
jeromegn Oct 29, 2024
c270001
explicitly disallow upstash replicas if no upstash regions provided
jeromegn Oct 30, 2024
8ea62fb
soft skip extensions in tests so the step still shows up in logs
jeromegn Oct 30, 2024
86705ae
fix python version detection from Pipfile, add django fixture
jeromegn Oct 30, 2024
735eb3d
query from slug directly if supplied
jeromegn Oct 31, 2024
6de1bfb
don't prompt for bucket name on tigris if using the --yes flag
jeromegn Oct 31, 2024
64878e3
fix go deployments when missing go.sum
jeromegn Nov 1, 2024
ec683eb
upgrade default deno to 2.0.4, try to detect more deno apps, add test…
jeromegn Nov 1, 2024
ec2751c
attempt at accepting customize from file (#4046)
jeromegn Nov 5, 2024
c542022
add static site fixture
jeromegn Nov 5, 2024
a6fc203
Merge remote-tracking branch 'origin/master' into deployer
lubien Dec 9, 2024
c76b965
Deployers phoenix improvements (#4113)
lubien Dec 17, 2024
3a28913
Port https://github.com/superfly/flyctl/pull/4247 into deployer branc…
clouvet Mar 18, 2025
bcffc53
Deploy image ref (#4471)
lubien Jul 9, 2025
178c73b
Deployer update now (#4593)
lubien Oct 7, 2025
a9b3996
deploy fix: use image ref directly if image resolver fails (#4596)
lubien Oct 9, 2025
610c773
Pass builder ID through fly deploy --image build strategy (#4601)
wjordan Oct 17, 2025
f87a793
Deployer experiment early git push (#4610)
lubien Oct 17, 2025
66e95e7
require uiex in all plan commands (#4625)
lubien Oct 29, 2025
9767ed6
files from diff (#4626)
lubien Oct 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 2 additions & 29 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
VERBOSE: true
DEFAULT_BUMP: "patch"

sync_docs:
if: github.ref == 'refs/heads/master'
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout flyctl
uses: actions/checkout@v4
- uses: jnwng/github-app-installation-token-action@778da2ab509f3ef5e4b902bc15daf25ef3e34939
id: installationToken
with:
appId: 339363
installationId: 37947271
privateKey: ${{ secrets.DOCS_SYNCER_GITHUB_APP_PRIVATE_KEY }}
- name: Checkout docs
uses: actions/checkout@v4
with:
repository: superfly/docs
token: ${{ steps.installationToken.outputs.token }}
path: docs
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
check-latest: true
- name: Publish CLI docs
id: publish-cli-docs
env:
GITHUB_TOKEN: ${{ steps.installationToken.outputs.token }}
run: scripts/publish_docs.sh ${{ github.ref_name }}
GIT_API_TAGGING: false
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ jobs:
needs: test_build
uses: ./.github/workflows/preflight.yml
secrets: inherit

# deployer-tests:
# needs: test_build
# uses: ./.github/workflows/deployer-tests.yml
# secrets: inherit
8 changes: 2 additions & 6 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,13 @@ jobs:
extra_args: --all-files --hook-stage=manual

lint:
strategy:
fail-fast: false
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
# check-latest: true
- uses: golangci/golangci-lint-action@v6
- uses: golangci/golangci-lint-action@v8
with:
version: v1.61.0
working-directory: .
version: v2.4.0
Original file line number Diff line number Diff line change
@@ -1,58 +1,61 @@
name: Preflight GPU Tests

name: Deployer tests
on:
schedule:
- cron: "30 0 * * *"
workflow_dispatch:
inputs:
reason:
description: Brief reason for running this workflow manually
required: false
default: User initiated run
type: string
workflow_call:
push:

jobs:
build:
runs-on: ubuntu-latest-m
build-deployer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
check-latest: true
- name: "Place wintun.dll"
run: cp deps/wintun/bin/amd64/wintun.dll ./
- name: build
uses: goreleaser/goreleaser-action@v5
env:
BUILD_ENV: "development"
- name: "Build flyctl"
run: make build

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
version: latest
args: build --clean --snapshot --verbose
- name: Upload flyctl for preflight
registry: https://index.docker.io/v1/
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Upload flyctl for the deployer tests
uses: actions/upload-artifact@v4
with:
name: flyctl
path: dist/default_linux_amd64_v1/flyctl
name: deployer-flyctl
path: bin/flyctl
overwrite: true

preflight-gpu-tests:
needs: build
if: ${{ github.repository == 'superfly/flyctl' }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
context: .
file: deployer.Dockerfile
tags: flyio/deployer:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max

deployer-tests:
needs: build-deployer
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Add "a10" to this list once capacity increases.
vm_size: ["a100-40gb", "l40s"]
parallelism: [20]
index:
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
vm_size: [""]
parallelism: [10]
index: [0,1,2,3,4,5,6,7,8,9]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
Expand All @@ -63,13 +66,18 @@ jobs:
- name: Install gotesplit, set FLY_PREFLIGHT_TEST_APP_PREFIX
run: |
curl -sfL https://raw.githubusercontent.com/Songmu/gotesplit/v0.2.1/install.sh | sh -s
echo "FLY_PREFLIGHT_TEST_APP_PREFIX=pf-gpu-gha-$(openssl rand -hex 4)" >> "$GITHUB_ENV"
echo "FLY_PREFLIGHT_TEST_APP_PREFIX=pf-gha-$(openssl rand -hex 4)" >> "$GITHUB_ENV"
- uses: actions/download-artifact@v4
with:
name: flyctl
path: master-build
- name: Run preflight GPU tests
id: preflight
name: deployer-flyctl
path: deployer-bin
- name: Move flyctl binary to correct directory
run: |
mkdir -p bin
mv deployer-bin/flyctl bin/flyctl
chmod +x bin/flyctl
- name: Run deployer tests
id: deployer-tests
env:
FLY_PREFLIGHT_TEST_ACCESS_TOKEN: ${{ secrets.FLYCTL_PREFLIGHT_CI_FLY_API_TOKEN }}
FLY_PREFLIGHT_TEST_FLY_ORG: flyctl-ci-preflight
Expand All @@ -78,36 +86,39 @@ jobs:
FLY_PREFLIGHT_TEST_NO_PRINT_HISTORY_ON_FAIL: "true"
FLY_FORCE_TRACE: "true"
FLY_PREFLIGHT_TEST_VM_SIZE: ${{ matrix.vm_size }}
FLY_DEPLOYER_IMAGE: "flyio/deployer:${{ github.sha }}"
FLY_PREFLIGHT_TEST_APP_PREFIX: "deployertest"
run: |
mv master-build/flyctl bin/flyctl
chmod +x bin/flyctl
export PATH=$PWD/bin:$PATH
echo -n failed= >> $GITHUB_OUTPUT
./scripts/preflight.sh -r "${{ github.ref }}" -t "${{ matrix.parallelism }}" -i "${{ matrix.index }}" -o $GITHUB_OUTPUT
./scripts/deployer-tests.sh -r "${{ github.ref }}" -t "${{ matrix.parallelism }}" -i "${{ matrix.index }}" -o $GITHUB_OUTPUT
- name: Post failure to slack
if: ${{ github.ref == 'refs/heads/master' && failure() }}
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0
env:
SLACK_WEBHOOK_URL: ${{ secrets.PREFLIGHT_SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
with:
webhook: ${{ secrets.PREFLIGHT_SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
channel-id: 'C0790M2E0G2'
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":sob: preflight GPU tests failed: ${{ steps.preflight.outputs.failed }} ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
"text": ":sob: deployer tests failed: ${{ steps.deployer-tests.outputs.failed }} ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
}
]
}
- uses: superfly/flyctl-actions/setup-flyctl@master
if: always()
- name: Clean up any un-deleted preflight apps
- name: Clean up any un-deleted deployer-tests apps
if: always()
env:
FLY_API_TOKEN: ${{ secrets.FLYCTL_PREFLIGHT_CI_FLY_API_TOKEN }}
FLY_PREFLIGHT_TEST_FLY_ORG: flyctl-ci-preflight
FLY_PREFLIGHT_TEST_APP_PREFIX: "deployertest"
run: |
./scripts/delete_preflight_apps.sh "$FLY_PREFLIGHT_TEST_APP_PREFIX"
5 changes: 4 additions & 1 deletion .github/workflows/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,17 @@ jobs:
- name: Install gotesplit, set FLY_PREFLIGHT_TEST_APP_PREFIX
run: |
curl -sfL https://raw.githubusercontent.com/Songmu/gotesplit/v0.2.1/install.sh | sh -s
echo "FLY_PREFLIGHT_TEST_APP_PREFIX=pf-gha-$(openssl rand -hex 4)" >> "$GITHUB_ENV"
echo "FLY_PREFLIGHT_TEST_APP_PREFIX=gha-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT" >> "$GITHUB_ENV"
# If this workflow is triggered by code changes (eg PRs), download the binary to save time.
- uses: actions/download-artifact@v4
id: download-flyctl
with:
name: flyctl
path: master-build
continue-on-error: true
# But if this is a manual run, build the binary first.
- run: make
if: steps.download-flyctl.outcome == 'failure'
- name: Run preflight tests
id: preflight
env:
Expand Down Expand Up @@ -80,5 +82,6 @@ jobs:
env:
FLY_API_TOKEN: ${{ secrets.FLYCTL_PREFLIGHT_CI_FLY_API_TOKEN }}
FLY_PREFLIGHT_TEST_FLY_ORG: flyctl-ci-preflight
FLY_PREFLIGHT_TEST_APP_PREFIX: "preflight"
run: |
./scripts/delete_preflight_apps.sh "$FLY_PREFLIGHT_TEST_APP_PREFIX"
41 changes: 41 additions & 0 deletions .github/workflows/sync-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Automatically sync docs for flyctl

on:
workflow_run:
workflows: ["Automatically release a new version of flyctl"]
types:
- completed

workflow_dispatch:

permissions:
contents: write

jobs:
sync_docs:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout flyctl
uses: actions/checkout@v4
- uses: jnwng/github-app-installation-token-action@778da2ab509f3ef5e4b902bc15daf25ef3e34939
id: installationToken
with:
appId: 339363
installationId: 37947271
privateKey: ${{ secrets.DOCS_SYNCER_GITHUB_APP_PRIVATE_KEY }}
- name: Checkout docs
uses: actions/checkout@v4
with:
repository: superfly/docs
token: ${{ steps.installationToken.outputs.token }}
path: docs
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
check-latest: true
- name: Publish CLI docs
id: publish-cli-docs
env:
GITHUB_TOKEN: ${{ steps.installationToken.outputs.token }}
run: scripts/publish_docs.sh ${{ github.ref_name }}
Loading
Loading