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

test build on gha-sat #4120

Draft
wants to merge 57 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
9849a64
test build-earthly in satellite runner
idelvall May 16, 2024
0418c24
unset EARTHLY_SATELLITE
idelvall May 16, 2024
d6ee683
unset EARTHLY_SATELLITE
idelvall May 16, 2024
d56b655
unset EARTHLY_SATELLITE
idelvall May 16, 2024
993fa48
run tests on earthly-satellite#gha-earthly-1
idelvall May 16, 2024
df6d118
run tests on earthly-satellite#gha-earthly-1
idelvall May 16, 2024
ff6dc65
run tests on earthly-satellite#gha-earthly-1
idelvall May 16, 2024
9553496
run tests on earthly-satellite#gha-earthly-1
idelvall May 16, 2024
f05a9a0
run tests on earthly-satellite#gha-earthly-1
idelvall May 16, 2024
c22bd6b
run test-no-qemu-group7
idelvall May 16, 2024
74f2441
run test-no-qemu-group7
idelvall May 16, 2024
15a472e
run more tests
idelvall May 16, 2024
db19070
clear SATELLITE_NAME
idelvall May 16, 2024
ce9ac93
clear SATELLITE_NAME
idelvall May 16, 2024
06dc5f5
clear SATELLITE_NAME
idelvall May 16, 2024
d8e2bee
add
idelvall May 16, 2024
6bb0822
add
idelvall May 16, 2024
42dd5b6
add
idelvall May 16, 2024
10f869b
add
idelvall May 16, 2024
f1f998d
add
idelvall May 17, 2024
ed116dd
add
idelvall May 17, 2024
334a8e3
add
idelvall May 17, 2024
24419ac
add
idelvall May 17, 2024
73b729b
add
idelvall May 20, 2024
ab183f4
add
idelvall May 20, 2024
cc1c7a6
add
idelvall May 20, 2024
e508b9d
add
idelvall May 20, 2024
9445b45
add experimental warning
idelvall May 24, 2024
890ffdc
reun in brand new satellite
idelvall May 24, 2024
db2373a
merge
idelvall May 24, 2024
f79bbc9
merge
idelvall May 24, 2024
24c0618
test in v.0.8.12
idelvall May 24, 2024
81f1d0d
test in selfhosted
idelvall May 24, 2024
621cecf
test sh
idelvall May 29, 2024
cc3b9a0
Merge branch 'main' into nacho/test-gha-sats
idelvall May 29, 2024
0b38358
test sh
idelvall May 29, 2024
57f4c52
test sh
idelvall May 29, 2024
69bb355
test sh
idelvall May 29, 2024
f0a0f33
test sh
idelvall May 29, 2024
c2c8818
test sh
idelvall May 29, 2024
76d5bfe
test sh
idelvall May 30, 2024
4f432c2
add
idelvall May 31, 2024
33b4b8b
test
idelvall Jun 3, 2024
bb8a215
merge
idelvall Jun 3, 2024
2b945d7
merge
idelvall Jun 3, 2024
d399127
merge
idelvall Jun 3, 2024
bc08033
merge
idelvall Jun 4, 2024
92bb57f
merge
idelvall Jun 4, 2024
2e62a1f
merge
idelvall Jun 4, 2024
47b0dcc
merge
idelvall Jun 4, 2024
f151f74
merge
idelvall Jun 4, 2024
40ce0b2
merge
idelvall Jun 4, 2024
8fcb275
merge
idelvall Jun 6, 2024
7103e10
merge
idelvall Jun 11, 2024
e1081a6
merge
idelvall Jun 11, 2024
c9edd30
add
idelvall Jun 13, 2024
7957a85
add
idelvall Jun 13, 2024
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
21 changes: 4 additions & 17 deletions .github/actions/stage2-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ inputs:
required: false
type: boolean
default: false
USE_NEXT:
required: false
type: boolean
default: false
SATELLITE_NAME:
required: false
type: string
Expand Down Expand Up @@ -71,26 +67,17 @@ runs:
shell: bash
- run: |-
echo "Extracting earthly binary from stage1 of build"
export TAG=${GITHUB_SHA}-ubuntu-latest-${{inputs.BINARY}}
if [ "${{inputs.USE_NEXT}}" = "true" ]; then export TAG="$TAG-ticktock"; fi
BUILDKITD_IMAGE=docker.io/earthly/buildkitd-staging ${{inputs.SUDO}} ./earthly upgrade
BUILDKITD_IMAGE=docker.io/earthly/buildkitd-staging TAG=${GITHUB_SHA}-gha-sh-1-${{inputs.BINARY}} ${{inputs.SUDO}} ./earthly upgrade
echo "${{inputs.SUDO}} chown -R $USER ~/.earthly"
${{inputs.SUDO}} chown -R $USER ~/.earthly # restore non-sudo user ownership
test -n "${{inputs.BUILT_EARTHLY_PATH}}" || (echo "BUILT_EARTHLY_PATH is empty" && exit 1)
mkdir -p $(dirname "${{inputs.BUILT_EARTHLY_PATH}}")
${{inputs.SUDO}} ls "${HOME}/.earthly/"
${{inputs.SUDO}} mv "${HOME}/.earthly/earthly-$TAG" "${{inputs.BUILT_EARTHLY_PATH}}"
${{inputs.SUDO}} mv ${HOME}/.earthly/earthly-${GITHUB_SHA}-gha-sh-1-${{inputs.BINARY}} "${{inputs.BUILT_EARTHLY_PATH}}"
echo "extracted ${{inputs.BUILT_EARTHLY_PATH}}"
shell: bash
- if: ${{ inputs.USE_NEXT == 'true' }}
run: |-
export expected_buildkit_client_sha="$(cat earthly-next | head -c 12)"
test -n "$expected_buildkit_client_sha" || ( echo "expected_buildkit_client_sha is empty" && exit 1)
(strings ${{inputs.BUILT_EARTHLY_PATH}} | grep "$expected_buildkit_client_sha" ) || ( echo "expected to find $expected_buildkit_client_sha in earthly binary" && exit 1)
echo "correctly found $expected_buildkit_client_sha in earthly binary; this confirms earthly-next was used"
shell: bash
- run: |-
echo "Setting up mirror credentials in .arg and .secret"
export earthly="${{inputs.BUILT_EARTHLY_PATH}}"
export earthly=${{inputs.BUILT_EARTHLY_PATH}}
# setup secrets
echo "DOCKERHUB_MIRROR_USER=$($earthly secret --org earthly-technologies --project core get -n dockerhub-mirror/user || kill $$)" > .secret
echo "DOCKERHUB_MIRROR_PASS=$($earthly secret --org earthly-technologies --project core get -n dockerhub-mirror/pass || kill $$)" >> .secret
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/build-earthly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@ on:
required: false
type: boolean
default: false
USE_NEXT:
required: false
type: boolean
default: false

jobs:

build-earthly:
name: build (and push) earthly using ${{inputs.BINARY}} and earthly-next=${{inputs.USE_NEXT}}
name: build (and push) earthly using ${{inputs.BINARY}}
if: ${{!inputs.SKIP_JOB}}
runs-on: ${{inputs.RUNS_ON}}
env:
Expand All @@ -37,7 +33,6 @@ jobs:
# Used in our github action as the token - TODO: look to change it into an input
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: earthly/actions-setup@main
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -75,9 +70,6 @@ jobs:
- name: Podman Login
run: ${{inputs.SUDO}} ${{inputs.BINARY}} login docker.io --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_TOKEN }}"
if: inputs.BINARY == 'podman'
- name: Update Buildkit to earthly-next
if: inputs.USE_NEXT
run: ${{inputs.SUDO}} $(which earthly) +update-buildkit --BUILDKIT_GIT_SHA=$(cat earthly-next)
- name: Build latest earthly using released earthly
run: ${{inputs.SUDO}} $(which earthly) --use-inline-cache +for-linux
- name: Earthly bootstrap using latest earthly build
Expand All @@ -87,11 +79,12 @@ jobs:
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"
unset EARTHLY_SATELLITE
- name: Build and push +ci-release using latest earthly build
run: |-
export TAG_SUFFIX="${{inputs.RUNS_ON}}-${{inputs.BINARY}}"
if [ "${{inputs.USE_NEXT}}" = "true" ]; then export TAG_SUFFIX="$TAG_SUFFIX-ticktock"; fi
${{inputs.SUDO}} ./build/linux/amd64/earthly --ci --push --build-arg TAG_SUFFIX +ci-release
runs_on="${{inputs.RUNS_ON}}"
runs_on=${runs_on//earthly-satellite#/}
${{inputs.SUDO}} ./build/linux/amd64/earthly --ci --push +ci-release --TAG_SUFFIX="$runs_on-${{inputs.BINARY}}"
- name: Buildkit logs (runs on failure)
run: ${{inputs.SUDO}} ${{inputs.BINARY}} logs earthly-buildkitd
if: ${{ failure() }}
101 changes: 0 additions & 101 deletions .github/workflows/ci-docker-satellites.yml

This file was deleted.

Loading
Loading