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

BYOC and Self-Hosted Dogfood #4076

Merged
merged 5 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 26 additions & 0 deletions .github/workflows/ci-docker-satellites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,29 @@ jobs:
SATELLITE_NAME: "core-test"
EARTHLY_ORG: "earthly-technologies"
secrets: inherit

satellites-byoc-smoke-test:
needs: build-earthly
uses: ./.github/workflows/reusable-satellite-smoke-test.yml
with:
BUILT_EARTHLY_PATH: "./build/linux/amd64/earthly"
RUNS_ON: "ubuntu-latest"
BINARY: "docker"
SUDO: ""
SATELLITE_NAME: "core-byoc"
EARTHLY_ORG: "earthly-technologies"
USE_VPN: true
secrets: inherit

satellites-self-hosted-smoke-test:
needs: build-earthly
uses: ./.github/workflows/reusable-satellite-smoke-test.yml
with:
BUILT_EARTHLY_PATH: "./build/linux/amd64/earthly"
RUNS_ON: "ubuntu-latest"
BINARY: "docker"
SUDO: ""
SATELLITE_NAME: "self-hosted"
EARTHLY_ORG: "earthly-technologies"
USE_VPN: true
secrets: inherit
70 changes: 70 additions & 0 deletions .github/workflows/reusable-satellite-smoke-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Satellite Smoke Test

on:
workflow_call:
inputs:
BUILT_EARTHLY_PATH:
required: true
type: string
RUNS_ON:
required: true
type: string
SUDO:
type: string
required: false
BINARY:
required: true
type: string
SATELLITE_NAME:
required: true
type: string
EARTHLY_ORG:
required: false
type: string
USE_VPN:
required: false
type: boolean

jobs:
satellite-smoke-test:
runs-on: ${{inputs.RUNS_ON}}
env:
FORCE_COLOR: 1
EARTHLY_TOKEN: "${{ secrets.EARTHLY_TOKEN }}"
EARTHLY_ORG: "${{ inputs.EARTHLY_ORG }}"
EARTHLY_SATELLITE: ${{ inputs.SATELLITE_NAME }}
EARTHLY_INSTALL_ID: "earthly-githubactions"
DOCKERHUB_MIRROR_USERNAME: "${{ secrets.DOCKERHUB_MIRROR_USERNAME }}"
DOCKERHUB_MIRROR_PASSWORD: "${{ secrets.DOCKERHUB_MIRROR_PASSWORD }}"
# Used in our github action as the token - TODO: look to change it into an input
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/stage2-setup
with:
DOCKERHUB_MIRROR_USERNAME: "${{ secrets.DOCKERHUB_MIRROR_USERNAME }}"
DOCKERHUB_MIRROR_PASSWORD: "${{ secrets.DOCKERHUB_MIRROR_PASSWORD }}"
DOCKERHUB_USERNAME: "${{ secrets.DOCKERHUB_USERNAME }}"
DOCKERHUB_PASSWORD: "${{ secrets.DOCKERHUB_TOKEN }}"
EARTHLY_TOKEN: "${{ secrets.EARTHLY_TOKEN }}"
BINARY: "${{ inputs.BINARY }}"
SUDO: "${{ inputs.SUDO }}"
BUILT_EARTHLY_PATH: "${{ inputs.BUILT_EARTHLY_PATH }}"
SATELLITE_NAME: "${{ inputs.SATELLITE_NAME }}"
USE_SATELLITE: true
- name: Configure Tailscale
uses: tailscale/github-action@v2
if: ${{ inputs.USE_VPN }}
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci
- name: Set EARTHLY_VERSION_FLAG_OVERRIDES env
run: |-
set -euo pipefail
EARTHLY_VERSION_FLAG_OVERRIDES="$(tr -d '\n' < .earthly_version_flag_overrides)"
echo "EARTHLY_VERSION_FLAG_OVERRIDES=$EARTHLY_VERSION_FLAG_OVERRIDES" >> "$GITHUB_ENV"
- name: Run satellite smoke test
run: ${{inputs.BUILT_EARTHLY_PATH}} github.com/earthly/hello-world+hello
Loading