Skip to content

Commit

Permalink
Merge branch 'main' into metricforwarder-on-cf
Browse files Browse the repository at this point in the history
  • Loading branch information
bonzofenix authored May 21, 2024
2 parents cd3e7f5 + d689baf commit 9f5b139
Show file tree
Hide file tree
Showing 93 changed files with 2,253 additions and 959 deletions.
18 changes: 18 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM jetpackio/devbox:latest

# Installing your devbox project
WORKDIR /code
USER root:root
RUN mkdir -p /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


# Step 6: Copying local flakes directories
COPY local-flake local-flake
COPY local-flake local-flake

RUN devbox run -- echo "Installed Packages."

RUN devbox shellenv --init-hook >> ~/.profile
16 changes: 16 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "Devbox Remote Container",
"build": {
"dockerfile": "./Dockerfile",
"context": ".."
},
"customizations": {
"vscode": {
"settings": {},
"extensions": [
"jetpack-io.devbox"
]
}
},
"remoteUser": "devbox"
}
28 changes: 23 additions & 5 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
strict_env
if has nix

# Prefers devbox over nix, as nix is a prerequisite for devbox
if has devbox
then
unset GOPATH # Required for editors to discover the go-tools in the flake.
use flake
layout ruby
fi
unstrict_env # seems to be required for devbox :(
eval "$(devbox generate direnv --print-envrc)"
# check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/
# for more details
else
if has nix
then
unset GOPATH # Required for editors to discover the go-tools in the flake.
use flake
layout ruby
fi
fi

local bbl_state_dir=../app-autoscaler-env-bbl-state/bbl-state
if has bbl && [[ -d "$bbl_state_dir" ]]
then
eval "$(bbl print-env --state-dir "$bbl_state_dir")"
fi

export DBURL="postgres://postgres:postgres@localhost/autoscaler"
4 changes: 4 additions & 0 deletions .final_builds/jobs/golangapiserver/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ builds:
version: 693f150065f0473b24a36fe25eee38b58dc97939705d3ca84eb131b22a1abb8f
blobstore_id: 20d874da-60fb-4cad-759d-00d2f127713b
sha1: sha256:f006f6b9128f5b146588f70a20205d01f935f7ff1182b5138259b0c0ac92f759
6a1ef29a6aa9cfed39fdafc589db01c477bf66ccf0936f90f8234956d22734b2:
version: 6a1ef29a6aa9cfed39fdafc589db01c477bf66ccf0936f90f8234956d22734b2
blobstore_id: aa04275a-fca9-4499-4e2d-9ab935133f27
sha1: sha256:7108de914550db324919e3c980137968eb7548375c99c50e1eefebbed0f74637
71aafdfbb79d7f0da5c0f9640fdaf2ef9a55f62f0b9dc96c132752ba0715fc08:
version: 71aafdfbb79d7f0da5c0f9640fdaf2ef9a55f62f0b9dc96c132752ba0715fc08
blobstore_id: e387d92e-d118-4e2f-4242-36844197fed2
Expand Down
4 changes: 4 additions & 0 deletions .final_builds/packages/changeloglockcleaner/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ builds:
version: e4f3dd1fd1d4f6d17fe05bcc91f6077591426d8b013019f948625da20844494e
blobstore_id: e5291802-c122-420f-6490-bf13c6c4ff7b
sha1: sha256:8e3a81709ffbf170e05f779e68f5da792de230377c455cc9a1dc6eb4d48e3964
e6309f835141fd86bbfc75b9a77e7d3e927e753496b953187ba93a19b2efd883:
version: e6309f835141fd86bbfc75b9a77e7d3e927e753496b953187ba93a19b2efd883
blobstore_id: f24b2646-ed76-483b-49ef-000459a8d519
sha1: sha256:edf14ee1a37bb7467302c871b063fddda028cf2b31ec755e718908a203d6067b
ea399787780c3eaaf74d41a7c64809216bbada67515eb7224e4ae8436f34ff49:
version: ea399787780c3eaaf74d41a7c64809216bbada67515eb7224e4ae8436f34ff49
blobstore_id: e581693a-d761-42f1-4219-695bc3aae3de
Expand Down
4 changes: 4 additions & 0 deletions .final_builds/packages/db/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ builds:
version: f3bd7440d9aaaa145e8fd4081c603b0e6587cf5e86c5346ec84a3c00fa4c3b75
blobstore_id: 0c836920-d6da-40ad-7aed-2a6de2424135
sha1: sha256:be4ea4ee62b13eac0b72c075f1035fec38ddd5dd9c4d4c72248d0d80f3c71561
f4b520784d8b4468533e077ba7f3def7e5e09949dbf96fc31f3ec46c9290b1a7:
version: f4b520784d8b4468533e077ba7f3def7e5e09949dbf96fc31f3ec46c9290b1a7
blobstore_id: d78f3b13-030f-441c-6762-b0271c2a07ba
sha1: sha256:d05d7d187f161e2aa1f16eda77c75e38f2bba496b58f82971cab03a1562c6d70
f4d0b419b4c601e6d06b40cbdde5a7af7fbb09db1c51e76c8fbc414833734bbc:
version: f4d0b419b4c601e6d06b40cbdde5a7af7fbb09db1c51e76c8fbc414833734bbc
blobstore_id: a220577e-29dd-430e-6fa6-d17ac262d393
Expand Down
4 changes: 4 additions & 0 deletions .final_builds/packages/eventgenerator/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ builds:
version: c9ae71008ae626df45396d1f46af07a9d28eb87d0e70077bcb2dd342f4c09d2f
blobstore_id: aaf3b97e-a18e-40df-757f-d64fccbf9e73
sha1: sha256:7e6b0ea2d2eaedacff5fff58ee56bceb43090d280d58da7d001a5e2ac79a6863
caf26f454504445ac505649a2a9b2af07401fa695f2d4fbc947c1061e85fdc98:
version: caf26f454504445ac505649a2a9b2af07401fa695f2d4fbc947c1061e85fdc98
blobstore_id: 96231a80-87cd-43b6-4faf-707e164019cb
sha1: sha256:220f13404191fb927d68487fd56d17ee5d3ce08dca5124f74ce6158a12bd1e71
ce291dac5e126a378311e4c44e14ba7a2cb358a9f90d9a07b5a1721a0c2dd874:
version: ce291dac5e126a378311e4c44e14ba7a2cb358a9f90d9a07b5a1721a0c2dd874
blobstore_id: 568153a3-5d57-43ad-5efa-d5824ce9d013
Expand Down
4 changes: 4 additions & 0 deletions .final_builds/packages/golang-1-linux/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ builds:
version: 8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60
blobstore_id: d2723887-4744-43c2-64e3-289fe6483132
sha1: sha256:efdf65bca81264d9110ec764be7edea1de341781a1ffe59c219db064d71d9fc3
a53d60ed79d278964faa9bc17836ed3bc5f084c0f3d41110c8a6e0b2de5f2dc0:
version: a53d60ed79d278964faa9bc17836ed3bc5f084c0f3d41110c8a6e0b2de5f2dc0
blobstore_id: 39ce080a-6129-4622-6d8a-f07e063992eb
sha1: sha256:7e0fc0e87c06d8aabcb0f84c83fa15fb8f0565e60afbb7f0236050412cb8628e
a54b33c812a8cfc39ba82782a23d74bf33f5a0a92012b41a101cc9d9d48d345c:
version: a54b33c812a8cfc39ba82782a23d74bf33f5a0a92012b41a101cc9d9d48d345c
blobstore_id: 5a8680dd-9f44-40ac-400b-52753e7c9b25
Expand Down
4 changes: 4 additions & 0 deletions .final_builds/packages/golangapiserver/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ builds:
version: 3e301d1d0bbfa63c267ab29dd55dae5368b45e1bba19a0f4a6a59cde790cbbd8
blobstore_id: 94ad2bea-d151-4854-6409-103543a8c808
sha1: sha256:1d0cdfd66c7a9034fba42a162275a008d22284ebb64a69faaee461f13661f41f
3eec59f6dea2f1fbec4467a647f8f16b38e70abcfab571240cb4d24b9b4d3d61:
version: 3eec59f6dea2f1fbec4467a647f8f16b38e70abcfab571240cb4d24b9b4d3d61
blobstore_id: 210b8ef6-02c8-4b9d-574b-697b6e889fcb
sha1: sha256:bd9270f8bbbd10c6afb9897ca0c96dcb9545af100644d12f078bc3185bdb2dd0
421cbd1f220ade05a9f1b2c2c87b73ebf1b7a54f027410791cbf20093657556e:
version: 421cbd1f220ade05a9f1b2c2c87b73ebf1b7a54f027410791cbf20093657556e
blobstore_id: fba0fc7f-acfd-4cfb-6da9-a5a0faf03305
Expand Down
4 changes: 4 additions & 0 deletions .final_builds/packages/metricsforwarder/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ builds:
version: a791b011a6205124b2bcd1cad9182d2808f2027673563f44fea962185ca1da06
blobstore_id: 9767fe09-1b64-4df2-7db4-283e5e6a0baa
sha1: sha256:379ebc84b5dd1c1fbd75500e6ad7dc8e30f06ad969b8bf561e12c72dac79cd43
aaf5a77db73c353879012dac599a6e350ca05e6e0d7283790cec230db1ec0f64:
version: aaf5a77db73c353879012dac599a6e350ca05e6e0d7283790cec230db1ec0f64
blobstore_id: b4087524-f473-4264-4729-8139e9e66ab7
sha1: sha256:dcd5954ad66dc9d1f28e7a8ebd284ddd5c34c622abc9151821d820bcfcd95745
ab0fe4cff6ca72f2378ff923d8f14f91384a7729fb47db7c198bfd7628bde9a3:
version: ab0fe4cff6ca72f2378ff923d8f14f91384a7729fb47db7c198bfd7628bde9a3
blobstore_id: 3a07fe89-4a52-4711-5a42-01729fde0ea2
Expand Down
4 changes: 4 additions & 0 deletions .final_builds/packages/metricsgateway/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ builds:
version: 7b9b4063ce7b24e6d5e47b7664201c4d9678c6ebc65cd3265f6feac251aa2a11
blobstore_id: 41749e6f-29bb-4b94-6ac4-f554cf688d83
sha1: sha256:a6e242235d2572e78aebdcbbebf0f7bd8db0e6d6227c5e8b7db1c2560dcde1ec
7d96bc4da62b05b72ca313c0e1e0bbcb1c2f248a6f1c26a143202d4d935f4d4b:
version: 7d96bc4da62b05b72ca313c0e1e0bbcb1c2f248a6f1c26a143202d4d935f4d4b
blobstore_id: d3045f3d-2093-43af-56e9-808933efd50d
sha1: sha256:beba1ae73b01636291a4ba9fb03a5b4277b1850366fe7d13c7b9dcde68f6474e
8148327fb555e43ba6e70a98f42d1b856909e8d18dbd8a3ebb33c35d27b2e15d:
version: 8148327fb555e43ba6e70a98f42d1b856909e8d18dbd8a3ebb33c35d27b2e15d
blobstore_id: def90c45-af43-4776-4aed-f40574ddb152
Expand Down
4 changes: 4 additions & 0 deletions .final_builds/packages/metricsserver/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ builds:
version: 53bfac1c3279dad9f1b545423c2d99a0ee0b53e680831275e0f0711c8a86543f
blobstore_id: 59f984f9-a736-4573-7651-39ce6a72ac51
sha1: sha256:a1bbc920a53a48b2a9b2c7819b10a5a2f613d0335dd8e05973929a83a01f1dc1
57a355e7b888701441fc196d3214933bd3d12545620b7e66cb13285abc9a0fcf:
version: 57a355e7b888701441fc196d3214933bd3d12545620b7e66cb13285abc9a0fcf
blobstore_id: 8b8e4ebe-22c5-49ea-7145-fbcd808e84fb
sha1: sha256:ae05c04daf5cb2c6e4a33009f9d1a6b2957b1d88b7a17a37a825857626ffe058
5c4c9715ad065a9a0d1019c865dc97213d0fc6b95c0da09a0809f6c8db562ed9:
version: 5c4c9715ad065a9a0d1019c865dc97213d0fc6b95c0da09a0809f6c8db562ed9
blobstore_id: d64cdbcd-bb69-4e51-62ce-7a5596cc4d3e
Expand Down
4 changes: 4 additions & 0 deletions .final_builds/packages/operator/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ builds:
version: 4b77cff680a7d9fc84ecf13a6262dc9720afbdb534d0ad2c3aaa081be788f631
blobstore_id: b2c28cf2-99af-422b-78af-242bc6b6d94f
sha1: sha256:d534c6415b3a2d31abfb64654f2feec6df36bc7b90a31f5b313b6bc55b78b944
4d95c85b947a460c49ba2fb397feb73fc4b7899999356bed2b178f77a231546d:
version: 4d95c85b947a460c49ba2fb397feb73fc4b7899999356bed2b178f77a231546d
blobstore_id: 9730820a-c375-42bf-745a-d2b606a9b8f5
sha1: sha256:1589afcbf365e737cc8828ffd3bbf2dc22c100aec4140bda877df6265bb35bc4
501e226569603edf5648b3c9b7a8bcd0757f3294001f3807603bed573080035a:
version: 501e226569603edf5648b3c9b7a8bcd0757f3294001f3807603bed573080035a
blobstore_id: 5e20a337-6d6e-4974-6641-3474cc678afa
Expand Down
4 changes: 4 additions & 0 deletions .final_builds/packages/scalingengine/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ builds:
version: 910b6b5c0ddf3c58ae8585ea02cb19da4891900bb38513f6d73de7379f7389d4
blobstore_id: b13d8d33-64e1-42b9-7e78-6cdf94ec869d
sha1: sha256:f821b09d1067dc1208b7ae4b7d675657ef21369bc2f3dd291b35d0db30964074
914e5d0eb97437834b847ecf1da8dd608bd26c688b237591c7c3b2d60615402a:
version: 914e5d0eb97437834b847ecf1da8dd608bd26c688b237591c7c3b2d60615402a
blobstore_id: d51edfda-a386-48ae-452c-39be850dc667
sha1: sha256:da3cbd45c30e7a6a9417cd60456a1e68ac07bbe82b4f31044570f48818c68acb
945e99cf13688cbf9ab5f0f8dc7ba578cc8137b0fa0363a01b05cfe9a7300509:
version: 945e99cf13688cbf9ab5f0f8dc7ba578cc8137b0fa0363a01b05cfe9a7300509
blobstore_id: b5331fb7-a589-4136-46cb-c83f64a0e21a
Expand Down
4 changes: 4 additions & 0 deletions .final_builds/packages/scheduler/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,4 +299,8 @@ builds:
version: eb2fb438ab82a5ad95c47614470d6c34b0d45dd2c85316f4d23164655722e157
blobstore_id: 22269c39-57e7-492c-5500-78162fafa579
sha1: sha256:f2ab9dddf88d36090a75a4d46ba4fbd29d73e0884b6a88d40da697241ef5d0e3
f26386698b4f7693f34ce27f27182d00b700a9e599429f7728cc2be0ea797c6f:
version: f26386698b4f7693f34ce27f27182d00b700a9e599429f7728cc2be0ea797c6f
blobstore_id: 5e542e41-a949-4a3f-4873-a103c7f41309
sha1: sha256:aafcf388d0970473f6b17b3d18aec4ff5f769931fa3de59877a5e249c33c5260
format-version: "2"
23 changes: 0 additions & 23 deletions .github/workflows/acceptance_tests_buildin.yaml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/acceptance_tests_buildin_close.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/acceptance_tests_reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ on:
self_hosted_image:
type: string
default: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main
buildin_mode:
required: false
type: boolean
default: false
service_offering_enabled:
required: false
type: boolean
Expand All @@ -29,7 +25,6 @@ defaults:
shell: bash

env:
BUILDIN_MODE: "${{ inputs.buildin_mode }}"
SERVICE_OFFERING_ENABLED: "${{ inputs.service_offering_enabled }}"
PR_NUMBER: "${{ github.event.pull_request.number }}"
DEPLOYMENT_NAME: "${{ inputs.deployment_name }}"
Expand Down
87 changes: 87 additions & 0 deletions .github/workflows/asdf2devbox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: "ASDF to Devbox dependency version sync"
# This is only required until https://github.com/renovatebot/renovate/issues/27543 is resolved
on:
pull_request:
paths:
- ".tool-versions"
jobs:
asdf2devbox:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
# We potentially want to add at the end a commit by the author of the most recent
# commit in this branch. However github has some protection which prevents workflows
# to run in case a commit has been pushed with the default job-specific github-token.
# For this case we need to use another one here.
#
# For more information, see:
# <https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow>
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.APP_AUTOSCALER_CI_TOKEN }} # With push token that can trigger new PR jobs

- name: Configure git
id: configure_git
shell: bash
run: |
#! /usr/bin/env bash
set -eu -o pipefail
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
commit_author_name="$(git log -1 --pretty=format:'%an')"
commit_author_email="$(git log -1 --pretty=format:'%ae')"
commit_subject="$(git log -1 --pretty=format:'%s')"
readonly commit_author_name commit_author_email commit_subject
git config user.name "${commit_author_name}"
git config user.email "${commit_author_email}"
echo "commit_subject=${commit_subject}" >> "$GITHUB_OUTPUT"
- name: Install devbox
uses: jetify-com/[email protected]
with:
enable-cache: 'true'

- name: asdf2devbox.py
shell: bash
run: |
#! /usr/bin/env bash
set -eu -o pipefail
# We need the subsequent standard-message to determine if the last commit
# has already cleaned up everything. In this case this workflow should not
# change anything and we exit early.
# An alternative would be to use a tag for this. But this does affect the whole
# PR instead of just the latest commit.
tidy_message='🤖🦾🛠️ scripts/asdf2devbox.py'
readonly tidy_message
commit_message='${{steps.configure_git.outputs.commit_subject}}'
readonly commit_message
if [[ "${commit_message}" == "${tidy_message}" ]]
then
echo 'This commit was by the asdf2devbox workflow! Exiting …'
exit 0
fi
devbox run scripts/asdf2devbox.py
num_changed_files="$(git status --porcelain | wc --lines)"
declare -i -r num_changed_files
if ((num_changed_files > 0))
then
echo 'Changes to some files were necessary!'
git add .
git commit --message="${tidy_message}"
git push origin "HEAD:${GITHUB_HEAD_REF}"
else
echo 'No files changed!'
fi
echo '🏁'
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
persist-credentials: false

Expand Down
Loading

0 comments on commit 9f5b139

Please sign in to comment.