Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions .mise/tasks/orb/publish-dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env bash
#MISE description="Publish a dev version of the CircleCI orb to the registry."
#MISE tools.circleci="latest"
#MISE depends=["orb:build"]

set -euo pipefail
Expand All @@ -17,4 +16,4 @@ fi

CIRCLECI_ORB_VERSION="${1:-first}"

exec circleci orb publish orb.yml "$CIRCLECI_ORB_NAME"@dev:"$CIRCLECI_ORB_VERSION"
circleci orb publish orb.yml "$CIRCLECI_ORB_NAME"@dev:"$CIRCLECI_ORB_VERSION"
Comment thread
malept marked this conversation as resolved.
2 changes: 0 additions & 2 deletions .mise/tasks/orb/validate
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env bash
#MISE description="Validate the CircleCI orb."
#MISE tools.circleci="latest"
#MISE depends=["orb:build"]
#
# This script validates the CircleCI orb using the CircleCI CLI.
Expand All @@ -18,7 +17,6 @@ LIB_DIR="${DIR}/../../../shell/lib"

# shellcheck source=../../../shell/lib/box.sh
source "$LIB_DIR/box.sh"

# shellcheck source=../../../shell/lib/logging.sh
source "$LIB_DIR/logging.sh"

Expand Down
11 changes: 9 additions & 2 deletions .mise/tasks/stencil/_default
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/usr/bin/env bash
#MISE description="Run Stencil on the current repo without updating any module versions."
#MISE tools={"github:getoutreach/stencil" = "latest"}
#MISE depends=["devbase:sync"]
#MISE depends_post=["stencil:post"]

exec stencil --skip-update --frozen-lockfile
set -euo pipefail

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
LIB_DIR="$DIR/../../../shell/lib"

# shellcheck source=../../../shell/lib/mise/stub.sh
source "$LIB_DIR/mise/stub.sh"

mise_exec_tool_with_bin github:getoutreach/stencil stencil --skip-update --frozen-lockfile
9 changes: 7 additions & 2 deletions .mise/tasks/stencil/post/_default
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/usr/bin/env bash
#MISE description="Discover and run tasks meant to be run after Stencil completes."
#MISE tools={"gojq" = "latest"}
#MISE depends=["devbase:sync"]

set -euo pipefail

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
LIB_DIR="$DIR/../../../../shell/lib"

# shellcheck source=../../../../shell/lib/mise/stub.sh
source "$LIB_DIR/mise/stub.sh"

# Why: word splitting is not an issue with task names.
# shellcheck disable=SC2046
exec mise run $(mise tasks ls --json | gojq --raw-output '. | map(select(.name | startswith("stencil:post:")).name) | join(" ::: ")')
exec mise run $(mise tasks ls --json | mise_exec_tool gojq --raw-output '. | map(select(.name | startswith("stencil:post:")).name) | join(" ::: ")')
1 change: 0 additions & 1 deletion .mise/tasks/stencil/post/catalog-sync
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env bash
#MISE description="Sync service catalog values if it is not managed by a Stencil module."
#MISE tools={"gojq" = "latest"}
#
# Syncs the service catalog manifest for the given repository with
# the metadata present in the repository.
Expand Down
13 changes: 3 additions & 10 deletions .mise/tasks/stencil/post/circleci-orb-sync
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env bash
#MISE description="Sync CircleCI orb versions if files aren't managed by a Stencil module."
#MISE tools={"circleci" = "0.1.34950", "gojq" = "latest"}
#
# Syncs the CircleCI orb definition with the version of devbase in the
# stencil.lock file. By default, it only updates .circleci/config.yml
Expand All @@ -18,18 +17,12 @@ set -euo pipefail
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
DEVBASE_LIB_DIR="$DIR/../../../../shell/lib"

# shellcheck source=../../../../shell/lib/bootstrap.sh
source "$DEVBASE_LIB_DIR"/bootstrap.sh
# shellcheck source=../../../../shell/lib/box.sh
source "$DEVBASE_LIB_DIR"/box.sh
# shellcheck source=../../../../shell/lib/github.sh
source "$DEVBASE_LIB_DIR"/github.sh
# shellcheck source=../../../../shell/lib/logging.sh
source "$DEVBASE_LIB_DIR"/logging.sh
# shellcheck source=../../../../shell/lib/mise/stub.sh
source "$DEVBASE_LIB_DIR"/mise/stub.sh
# shellcheck source=../../../../shell/lib/sed.sh
source "$DEVBASE_LIB_DIR"/sed.sh
# shellcheck source=../../../../shell/lib/shell.sh
source "$DEVBASE_LIB_DIR"/shell.sh

ensure_bash_5_or_greater

Expand Down Expand Up @@ -82,6 +75,6 @@ for config in "${configFiles[@]}"; do
info_sub "Updating $config"
sed_replace "$org/shared@.\+" "$org/shared@$replaceVersion" "$config"
if [[ $config == "$fullRepoCircleCIConfigPath" ]]; then
circleci config validate --org-slug="github/$org" "$config"
mise_exec_tool circleci config validate --org-slug="github/$org" "$config"
fi
done
12 changes: 9 additions & 3 deletions .mise/tasks/stencil/upgrade
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#!/usr/bin/env bash
#MISE description="Run Stencil on the current repo and update any module versions if available."
#MISE tools={"github:getoutreach/stencil" = "latest"}
#MISE depends=["devbase:sync"]
#MISE depends_post=["stencil:post"]

mise upgrade github:getoutreach/stencil@latest
exec stencil --skip-update
set -euo pipefail

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
LIB_DIR="$DIR/../../../shell/lib"

# shellcheck source=../../../shell/lib/mise/stub.sh
source "$LIB_DIR/mise/stub.sh"

mise_exec_tool_with_bin github:getoutreach/stencil stencil --skip-update
78 changes: 0 additions & 78 deletions mise.devbase.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions mise.devbase.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ terraform = "1.4.4"
tombi = "0.7.27"
"github:getoutreach/kubecfg" = "0.34.0"
"github:getoutreach/lintroller" = "1.20.0"
"github:getoutreach/stencil" = "1.45.1"
"go:golang.org/x/tools/cmd/goimports" = "0.43.0"
Loading