-
Notifications
You must be signed in to change notification settings - Fork 2
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
First version of dind repo #2
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
DOCKERHUB_USER=earthly | ||
IMAGE_NAME=dind | ||
EARTHLY_REPO_VERSION=ido-dind-preparations | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# PRs require approval from the earthly core team | ||
* @earthly/core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
{ | ||
$schema: "https://docs.renovatebot.com/renovate-schema.json", | ||
extends: [ | ||
"config:recommended" | ||
], | ||
configMigration: true, | ||
prHourlyLimit: 1, | ||
schedule: [ // utc timezone | ||
'after 6am on monday', | ||
], | ||
enabledManagers: [ | ||
'dockerfile', | ||
'custom.regex', | ||
'github-actions', | ||
], | ||
dockerfile: { | ||
fileMatch: [ | ||
'Earthfile', | ||
], | ||
}, | ||
customManagers: [ | ||
{ | ||
// Earthly Version in GH Actions | ||
customType: 'regex', | ||
fileMatch: [ | ||
'.*?\\.yml', | ||
], | ||
matchStrings: [ | ||
'- uses: earthly/actions/setup-earthly@.*?[\\s\\n]+.*?[\\s\\n]+with:[\\s\\n]*version: (?<currentValue>.*?)[\\s\\n/]+', | ||
], | ||
depNameTemplate: 'earthly/earthly', | ||
datasourceTemplate: 'github-releases', | ||
}, | ||
{ | ||
// ARG/LET in Earthfile that have a Renovate comment | ||
customType: 'regex', | ||
fileMatch: [ | ||
'Earthfile', | ||
], | ||
matchStrings: [ | ||
'\\s*#\\s*renovate:\\s*datasource=(?<datasource>.*?)\\s+depName=(?<depName>.*?)[\\s\\n]+(versioning=(?<versioning>.*?)\\s+)?(ARG|LET)\\s+.*?(_VERSION|_VER|version)=(?<currentValue>.*?)($|\\s|\\n)', | ||
], | ||
}, | ||
{ | ||
// Updating the Repology alpine version | ||
customType: 'regex', | ||
fileMatch: [ | ||
'Earthfile', | ||
], | ||
matchStrings: [ | ||
'# renovate: datasource=repology depName=alpine_(?<currentValue>\\d+_\\d+)', | ||
], | ||
currentValueTemplate: "{{{ replace '_' '.' currentValue }}}", | ||
datasourceTemplate: 'docker', | ||
depNameTemplate: 'alpine', | ||
versioningTemplate: 'regex:^(?<major>\\d+)[._](?<minor>\\d+)$', | ||
autoReplaceStringTemplate: '# renovate: datasource=repology depName=alpine_{{{newMajor}}}_{{{newMinor}}}', | ||
}, | ||
{ | ||
// Updating the commit hash of earthly/earthly | ||
customType: 'regex', | ||
fileMatch: ['^\\.arg$'], | ||
matchStrings: [ | ||
'EARTHLY_REPO_VERSION=(?<currentDigest>.*?)($|\\s|\\n)', | ||
], | ||
currentValueTemplate: 'main', | ||
depNameTemplate: 'earthly/earthly', | ||
packageNameTemplate: 'https://github.com/earthly/earthly', | ||
datasourceTemplate: 'git-refs', | ||
}, | ||
], | ||
labels: [ | ||
'renovate', | ||
], | ||
packageRules: [ | ||
// set the group name for alpine dind dependencies | ||
{ | ||
groupName: "{{{ replace 'os\\/(.*?)$' '$1' packageFileDir}}}-dind-image", | ||
matchPackagePatterns: [ | ||
'alpine', | ||
'alpine.*?/docker', | ||
'docker/docker', | ||
], | ||
matchManagers: [ | ||
'custom.regex', | ||
], | ||
matchDatasources: [ | ||
'docker', | ||
'repology', | ||
'github-releases', | ||
], | ||
matchFileNames: [ | ||
'os/**/Earthfile', | ||
], | ||
}, | ||
{ | ||
// let all package updates auto merge | ||
matchPackagePatterns: [ '*' ], | ||
automerge: true, | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: CI | ||
|
||
on: | ||
# TODO: enable when this bug is resolved: https://github.com/earthly/earthly/issues/3930 | ||
# push: | ||
# branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
env: | ||
FORCE_COLOR: 1 | ||
EARTHLY_CONVERSION_PARALLELISM: "5" | ||
EARTHLY_TOKEN: "${{ secrets.EARTHLY_TOKEN }}" | ||
EARTHLY_INSTALL_ID: "earthly-dind-githubactions" | ||
steps: | ||
- uses: earthly/actions/setup-earthly@v1 | ||
with: | ||
version: v0.8.5 | ||
- uses: actions/checkout@v4 | ||
- name: Docker login (non fork only) | ||
run: |- | ||
docker login --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_TOKEN }}" | ||
docker login registry-1.docker.io.mirror.corp.earthly.dev --username "${{ secrets.DOCKERHUB_MIRROR_USERNAME }}" --password "${{ secrets.DOCKERHUB_MIRROR_PASSWORD }}" | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
- name: Configure Earthly to use mirror (non fork only) | ||
run: |- | ||
earthly config global.buildkit_additional_config "'[registry.\"docker.io\"] | ||
mirrors = [\"registry-1.docker.io.mirror.corp.earthly.dev\"]'" | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
- name: Run tests | ||
run: |- | ||
earthly config git "{github.com: {auth: ssh, user: git}}" && \ | ||
eval $(ssh-agent) && \ | ||
earthly secrets --org earthly-technologies --project core get littleredcorvette-id_rsa | ssh-add - && \ | ||
earthly --ci -P --push --org earthly-technologies --satellite dind +test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Release | ||
|
||
on: | ||
pull_request_target: | ||
types: [ closed ] | ||
|
||
jobs: | ||
release: | ||
name: release after merging ${{ github.head_ref }} | ||
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'renovate/') && endsWith(github.head_ref, '-dind-image') | ||
runs-on: ubuntu-latest | ||
env: | ||
FORCE_COLOR: 1 | ||
EARTHLY_CONVERSION_PARALLELISM: "5" | ||
EARTHLY_TOKEN: "${{ secrets.EARTHLY_TOKEN }}" | ||
EARTHLY_INSTALL_ID: "earthly-dind-githubactions" | ||
steps: | ||
- uses: earthly/actions/setup-earthly@v1 | ||
with: | ||
version: v0.8.5 | ||
- uses: actions/checkout@v4 | ||
- name: Docker login (non fork only) | ||
run: |- | ||
docker login --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_TOKEN }}" | ||
docker login registry-1.docker.io.mirror.corp.earthly.dev --username "${{ secrets.DOCKERHUB_MIRROR_USERNAME }}" --password "${{ secrets.DOCKERHUB_MIRROR_PASSWORD }}" | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
- name: Configure Earthly to use mirror (non fork only) | ||
run: |- | ||
earthly config global.buildkit_additional_config "'[registry.\"docker.io\"] | ||
mirrors = [\"registry-1.docker.io.mirror.corp.earthly.dev\"]'" | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
- name: Build & Push image | ||
run: |- | ||
earthly config git "{github.com: {auth: ssh, user: git}}" && \ | ||
eval $(ssh-agent) && \ | ||
earthly secrets --org earthly-technologies --project core get littleredcorvette-id_rsa | ssh-add - && \ | ||
idodod marked this conversation as resolved.
Show resolved
Hide resolved
|
||
earthly --ci -P --push --org earthly-technologies --satellite dind +release --RENOVATE_BRANCH=${{github.head_ref}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Contributing | ||
|
||
## Code of Conduct | ||
|
||
Please refer to the [CNCF Community Code of Conduct v1.0](https://github.com/cncf/foundation/blob/main/code-of-conduct.md) | ||
|
||
## CLA | ||
|
||
### Individual | ||
|
||
All contributions must indicate agreement to the [Earthly Contributor License Agreement](https://gist.github.com/vladaionescu/ed990fa149a38a53ac74b64155bc6766) by logging into GitHub via the CLA assistant and signing the provided CLA. The CLA assistant will automatically notify the PRs that require CLA signing. | ||
|
||
### Entity | ||
|
||
If you are an entity, please use the [Earthly Contributor License Agreement form](https://earthly.dev/cla-form) in addition to requiring your individual contributors to sign all contributions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
VERSION --wildcard-builds 0.8 | ||
|
||
PROJECT earthly-technologies/core | ||
|
||
# test runs tests for all defined dind images in this repo | ||
test: | ||
BUILD --pass-args ./os/*+test-build | ||
|
||
# release expects to get a renovate branch in the form of renovate/<os>-dind-image, extracts the os and then kicks off its +release target | ||
# this is meant to be run by a github workflow | ||
release: | ||
FROM alpine | ||
# RENOVATE_BRANCH is the renovate branch that is expected to get merged and trigger this target | ||
ARG --required RENOVATE_BRANCH | ||
LET os=${RENOVATE_BRANCH#renovate/} | ||
# using a LET/SET in the target path does not work, use an ARG instead until it's fixed | ||
ARG OS=${os%-dind-image} | ||
BUILD --pass-args ./os/$OS+release |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will change to a commit hash.
Renovate is configured so that the commit hash will get updated every week (the intention is that this repo will use the most recent tests and dind installation script in earthly/earthly)