Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
adfb6f3
Adapt target to changed Makefiles;
joergdw Apr 24, 2025
8587834
Automatically login into concourse if required and reuse more code;
joergdw Apr 25, 2025
cf9ce10
Merge remote-tracking branch 'os-origin/main' into pipeline-fixes
joergdw Apr 25, 2025
3ba4bd3
🔧 Fixes for the GitHub-Actions;
joergdw Apr 25, 2025
89a756b
🔧 Fix definition of target `bosh-release`
joergdw Apr 28, 2025
a9ca42a
↓ Downgrade fly (concourse-cli) to match the same major-version as on…
joergdw Apr 28, 2025
0c9f39b
🔧 More fixes for the GitHub-Actions;
joergdw Apr 28, 2025
ab847a6
🧪 Try out less redundance in concourse-pipeline-definition;
joergdw Apr 28, 2025
f8ed83c
🚧 Work in progress: Define docker-image;
joergdw Apr 28, 2025
50ee337
🔧 Minimize login-actions to non-interactive-ones for broker-registrat…
joergdw Apr 29, 2025
8f26e59
Merge remote-tracking branch 'os-origin/main' into pipeline-fixes
joergdw Apr 29, 2025
65be4cd
Add clarification into info-output;
joergdw Apr 29, 2025
43b518c
Fix login for the acceptance-test-config;
joergdw Apr 29, 2025
e848f64
🚧 Work in progress: Improve definition of the docker-image;
joergdw Apr 29, 2025
217b9c0
Re-add openapi-target as flake-output
joergdw Apr 30, 2025
502db8d
🚧 Work in progress: Make pipeline use the image as resource to make t…
joergdw Apr 30, 2025
2f25d06
Fix import-error;
joergdw May 6, 2025
392382e
Fix database-setup in the tests;
joergdw May 6, 2025
1be0f7e
🧹 Clean-up image-generation and narrow down its dependencies for the …
joergdw May 6, 2025
053b1ab
🔧 Fixes for Bash-scripts;
joergdw May 6, 2025
aad7cd9
🧹 Clean-up Dockerfile and improve interactive feeling;
joergdw May 6, 2025
b4198a1
Call the new Dockerfile for automated image-builds;
joergdw May 6, 2025
91e61ac
🔧 Fix oci-image-creation for the now devbox-based image;
joergdw May 6, 2025
be18937
🧹 Further clean-up;
joergdw May 6, 2025
1873623
🔧 Environment-fixes for the ci-pipeline;
joergdw May 6, 2025
4688be0
Introduce more debugging-code;
joergdw May 6, 2025
751ff75
Try to fix an environment-issue in the concourse-pipeline;
joergdw May 6, 2025
838acde
🔧 Fix oci-image;
joergdw May 7, 2025
6f99c9e
Try to avoid the `--config`-parameter of devbox-commands;
joergdw May 7, 2025
c11f963
Try to modify the entrypoint used by concourse!
joergdw May 7, 2025
d2393af
More debug-code;
joergdw May 7, 2025
bd7249f
Next try!
joergdw May 7, 2025
e6fc078
Remove all changes related to a different concourse-image;
joergdw May 8, 2025
7561874
Add more automated triggers for better testing;
joergdw May 8, 2025
a9b439c
Fix pipeline-definition;
joergdw May 8, 2025
e130c29
Re-introduce accidentally removed Makefile-targets regarding images;
joergdw May 8, 2025
920a163
Merge branch 'main' into pipeline-fixes
bonzofenix May 8, 2025
17f9fcc
Substitute forgotten prerelease-task-definition;
joergdw May 8, 2025
bd9f065
Add forgotten login-parameter;
joergdw May 8, 2025
311b833
One more!
joergdw May 8, 2025
038daec
Fix forgotten bosh-login;
joergdw May 8, 2025
5ed1245
🔧 Fix another missing bosh-login;
joergdw May 9, 2025
651437b
Merge branch 'main' into pipeline-fixes
joergdw May 9, 2025
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
13 changes: 5 additions & 8 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ then
# for more details
fi

local bbl_state_dir=../app-autoscaler-env-bbl-state/bbl-state
if has bbl && [[ -d "$bbl_state_dir" ]]
then
BBL_STATE_DIRECTORY="$(realpath "$bbl_state_dir")"
export BBL_STATE_DIRECTORY
eval "$(bbl print-env)"
fi
local bbl_state_dir=${BBL_STATE_PATH:-'../app-autoscaler-env-bbl-state/bbl-state'}
source './ci/autoscaler/scripts/common.sh'
bosh_login "${bbl_state_dir}"
echo '🚸 Login for bosh and concourse successful! For more execute: `make cf-login`'

export DBURL="postgres://postgres:postgres@localhost/autoscaler"
export DBURL='postgres://postgres:postgres@localhost/autoscaler'
18 changes: 12 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# # Edit: Please use global git-ignore for this, see official hints in the description of gitignore
# # on <https://git-scm.com/docs/gitignore>.
#
# # macOS system file that stores folder metadata (safe to ignore)
# .DS_Store


# ================================================================================
# 🤖 Generated files
# ================================================================================

config/dev.yml
config/private.yml
releases/*.tgz
Expand Down Expand Up @@ -66,16 +77,11 @@ keys/
.trunk


# ==================== 📦 Devbox ====================
# ==================== 📦 Devbox, ❄ Nix, direnv ====================
.devbox

# ==================== ❄ Nix ====================

# Ignore links to build-output:
/result
/result-*

.direnv

# # macOS system file that stores folder metadata (safe to ignore)
.DS_Store
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export GOWORK = off
$(shell mkdir -p target)
$(shell mkdir -p build)

.DEFAULT_GOAL := build-all
.DEFAULT_GOAL := build_all

.PHONY: check-type
check-db_type:
Expand Down Expand Up @@ -300,8 +300,11 @@ spec-test:
bundle exec rspec

.PHONY: bosh-release
bosh-release: go-mod-tidy go-mod-vendor scheduler db build/autoscaler-test.tgz
build/autoscaler-test.tgz:
bosh-release: build/autoscaler-test.tgz
# 🚸 In the next line, the order of the dependencies is important. Generated code needs to be
# already there for `go-mod-tidy` to work. See additional comment for that target in
# ./src/autoscaler/Makefile.
build/autoscaler-test.tgz: build_all go-mod-tidy go-mod-vendor
@echo " - building bosh release into build/autoscaler-test.tgz"
@mkdir -p build
@bosh create-release --force --timestamp-version --tarball=build/autoscaler-test.tgz
Expand Down Expand Up @@ -370,7 +373,7 @@ deploy-autoscaler-bosh: db.java-libs go-mod-vendor scheduler.build
echo " - deploying autoscaler"
DEBUG="${DEBUG}" ${CI_DIR}/autoscaler/scripts/deploy-autoscaler.sh
deploy-cleanup:
${CI_DIR}/autoscaler/scripts/cleanup-autoscaler.sh;
${CI_DIR}/autoscaler/scripts/cleanup-autoscaler.sh

bosh-release-path := ./target/bosh-releases
prometheus-bosh-release-path := ${bosh-release-path}/prometheus
Expand Down Expand Up @@ -442,8 +445,11 @@ cleanup-autoscaler-deployments:
@${CI_DIR}/autoscaler/scripts/cleanup-autoscaler-deployments.sh

.PHONY: cf-login
cf-login: ## Login to OSS CF dev environment
@${CI_DIR}/autoscaler/scripts/cf-login.sh
cf-login:
@echo '⚠️ Please note that this login only works for cf and concourse,' \
'in spite of performing a login as well on bosh and credhub.' \
'The necessary changes to the environment get lost when make exits its process.'
@${CI_DIR}/autoscaler/scripts/os-infrastructure-login.sh

.PHONY: setup-performance
setup-performance: build-test-app
Expand Down Expand Up @@ -484,6 +490,7 @@ alerts-silence:
${CI_DIR}/autoscaler/scripts/silence_prometheus_alert.sh BOSHJobEphemeralDiskPredictWillFill ;\
${CI_DIR}/autoscaler/scripts/silence_prometheus_alert.sh BOSHJobUnhealthy ;


.PHONY: docker-login docker docker-image
docker-login: target/docker-login
target/docker-login:
Expand All @@ -493,7 +500,6 @@ docker-image: docker-login
docker build -t ghcr.io/cloudfoundry/app-autoscaler-release-tools:latest ci/dockerfiles/autoscaler-tools
docker push ghcr.io/cloudfoundry/app-autoscaler-release-tools:latest


validate-openapi-specs: $(wildcard ./api/*.openapi.yaml)
for file in $^ ; do \
redocly lint --extends=minimal --format=$(if $(GITHUB_ACTIONS),github-actions,codeframe) "$${file}" ; \
Expand Down
3 changes: 3 additions & 0 deletions ci/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ================================================================================
# 🤖 Generated files
# ================================================================================
31 changes: 27 additions & 4 deletions ci/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
.ONESHELL:
SHELL := /bin/bash
.SHELLFLAGS := -eu -o pipefail -c

repository-root := $(shell realpath --relative-to $$(pwd) $$(git rev-parse --show-toplevel))

# All files that together define the development-environment:
development-environment-definition := \
$(wildcard ${repository-root}/nix/**/*) \
${repository-root}/devbox.json \
${repository-root}/devbox.lock

# 🚸 Overwrite the following parameters to work with a different repository on a different registry:
OCI_REGISTRY ?= ghcr.io
OCI_REPOSITORY ?= cloudfoundry/app-autoscaler-release-tools
OCI_TAG ?= main

.PHONY: docker-login
docker-login:
@logged_in=$$(jq '.auths | has("${OCI_REGISTRY}")' ~/.docker/config.json)
readonly logged_in
if [[ "$${logged_in}" != 'true' ]]
then
docker login '${OCI_REGISTRY}'
else
echo 'Already logged in into ${OCI_REGISTRY}, skipping login.'
fi

.PHONY: set-autoscaler-pipeline
set-autoscaler-pipeline:
Expand All @@ -15,10 +42,6 @@ unpause-pipeline:
delete-pipeline:
@./scripts/delete-pipeline.sh

.PHONY: set-target
set-target:
@fly --target app-autoscaler-release login --team-name app-autoscaler --concourse-url https://concourse.app-runtime-interfaces.ci.cloudfoundry.org

.PHONY: lint
lint:
@shellcheck --external-sources --shell='bash' **/scripts/*.sh
Expand Down
Loading
Loading