-
Notifications
You must be signed in to change notification settings - Fork 53
Fixes for the pipeline #3731
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
Draft
joergdw
wants to merge
16
commits into
main
Choose a base branch
from
pipeline-fixes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Fixes for the pipeline #3731
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
adfb6f3
Adapt target to changed Makefiles;
joergdw 8587834
Automatically login into concourse if required and reuse more code;
joergdw cf9ce10
Merge remote-tracking branch 'os-origin/main' into pipeline-fixes
joergdw 3ba4bd3
🔧 Fixes for the GitHub-Actions;
joergdw 89a756b
🔧 Fix definition of target `bosh-release`
joergdw a9ca42a
↓ Downgrade fly (concourse-cli) to match the same major-version as on…
joergdw 0c9f39b
🔧 More fixes for the GitHub-Actions;
joergdw ab847a6
🧪 Try out less redundance in concourse-pipeline-definition;
joergdw f8ed83c
🚧 Work in progress: Define docker-image;
joergdw 50ee337
🔧 Minimize login-actions to non-interactive-ones for broker-registrat…
joergdw 8f26e59
Merge remote-tracking branch 'os-origin/main' into pipeline-fixes
joergdw 65be4cd
Add clarification into info-output;
joergdw 43b518c
Fix login for the acceptance-test-config;
joergdw e848f64
🚧 Work in progress: Improve definition of the docker-image;
joergdw 217b9c0
Re-add openapi-target as flake-output
joergdw 502db8d
🚧 Work in progress: Make pipeline use the image as resource to make t…
joergdw 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 hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -5,20 +5,55 @@ on: | |
paths: | ||
- 'ci/dockerfiles/**' | ||
- '.github/workflows/image.yml' | ||
- '.tool-versions' | ||
pull_request: | ||
paths: | ||
- 'ci/dockerfiles/**' | ||
- '.github/workflows/image.yml' | ||
- '.tool-versions' | ||
workflow_dispatch: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-devbox-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
name: Build and Push app-autoscaler-release-devbox | ||
env: | ||
IMAGE_NAME: ${{ github.repository }}-devbox | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push | ||
id: build-and-push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ci/dockerfiles/autoscaler-devbox/Dockerfile | ||
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main | ||
|
||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
container: jetpackio/devbox:latest@sha256:3d164648f5ca0fa66cd080ee7c895af54e0a3ec19e19b232a2fea21628e82cfb | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
@@ -29,40 +64,42 @@ jobs: | |
matrix: | ||
image_suffix: ["tools"] | ||
name: Build and Push app-autoscaler-release-${{ matrix.image_suffix }} | ||
env: | ||
IMAGE_NAME: ${{ github.repository }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5 | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.image_suffix }} | ||
|
||
- name: Get ginkgo version from autoscaler-release | ||
id: ginkgo | ||
run: | | ||
version=$(devbox info ginkgo | head --lines=1 | cut --field=2 --delimiter=" ") | ||
echo "GINKGO version from devbox: '${version}'" | ||
version=$(grep "ginkgo " .tool-versions| cut -f 2 -d " ") | ||
echo "GINKGO version from .tool-versions: \'${version}\'" | ||
echo "version=${version}" >> "$GITHUB_OUTPUT" | ||
|
||
- id: get-golang-version | ||
shell: bash | ||
run: | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [actionlint] reported by reviewdog 🐶 |
||
version=$(devbox info go | head --lines=1 | cut --field=2 --delimiter=" ") | ||
echo "Go version from devbox: '${version}'" | ||
version=$(grep "golang " .tool-versions| cut -f 2 -d " ") | ||
echo "Go version from .tool-versions: \'${version}\'" | ||
echo "version=${version}" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Build and push | ||
id: build-and-push | ||
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ci/dockerfiles/autoscaler-${{ matrix.image_suffix }} | ||
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
|
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 @@ | ||
# ================================================================================ | ||
# 🤖 Generated files | ||
# ================================================================================ |
This file contains hidden or 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,39 @@ | ||
FROM jetpackio/devbox:latest | ||
|
||
# Installing your devbox project | ||
WORKDIR /code | ||
USER root:root | ||
RUN mkdir --parents /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code | ||
USER ${DEVBOX_USER}:${DEVBOX_USER} | ||
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json | ||
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.lock devbox.lock | ||
|
||
|
||
# # 💡 Here maybe the chown is missing! | ||
# # Step 6: Copying local flakes directories | ||
#COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} ./.devbox/virtenv/mysql/flake ./.devbox/virtenv/mysql/flake | ||
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} ./.devbox ./.devbox | ||
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} ./nix ./nix | ||
|
||
# 💡 The issue probably is, that we don't copy the necessary files before. | ||
# I alternatively will try to avoid the copies and read-only-mount those directories | ||
# into the image. | ||
RUN \ | ||
# --mount=type=bind,source=./nix,target=/code/nix,readonly \ | ||
# --mount=type=bind,source=./.devbox,target=/code/.devbox,readonly \ | ||
<<-EODI | ||
echo "ls -lah /code: $(ls -lah /code)" | ||
echo "ls -lah /code/.devbox: $(ls -lah /code/.devbox)" | ||
echo "ls -lah /code/.devbox/gen: $(ls -lah /code/.devbox/gen)" | ||
devbox run -- echo "Installed Packages." | ||
EODI | ||
|
||
# Make use of the installed devbox-environment: | ||
ENV \ | ||
PATH="/code/.devbox/nix/profile/default/bin:${PATH}" \ | ||
LD_LIBRARY_PATH="/code/.devbox/nix/profile/default/lib" | ||
|
||
# 🚧 To-do: Check if “ENTRYPOINT” is not the better alternative, see: | ||
# <https://www.bmc.com/blogs/docker-cmd-vs-entrypoint> | ||
ENTRYPOINT ["devbox", "run", "--"] | ||
# CMD ["devbox", "shell"] |
This file contains hidden or 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,13 @@ | ||
# ==================== Ignore everything by default ==================== | ||
* | ||
|
||
|
||
|
||
# ==================== What we actually need ==================== | ||
!./nix | ||
!/flake.nix | ||
!/flake.lock | ||
|
||
!./.devbox | ||
!/devbox.json | ||
!/devbox.lock |
This file contains hidden or 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
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.
📝 [actionlint] reported by reviewdog 🐶
shellcheck reported issue in this script: SC2028:info:2:6: echo may not expand escape sequences. Use printf [shellcheck]