Skip to content
Merged
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
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,10 @@ in the environment automatically, so nothing else is needed to wire them up. Opt
`GORULES_OUT` (default `dist`), `GORULES_NAME`, `GORULES_CURRENT`, `GORULES_UNPACK` and
`GORULES_DELETE` (both `'false'` by default), and `GORULES_CLI_VERSION`.

The job publishes `RULES_CHANGED`, `RULES_VERSION`, `RULES_RELEASE` and `RULES_SHA256` as a dotenv
report, so later jobs read them as ordinary variables.
The job publishes `RULES_CHANGED`, `RULES_PROJECT`, `RULES_TARGET`, `RULES_VERSION`,
`RULES_RELEASE` and `RULES_SHA256` as a dotenv report, so later jobs read them as ordinary
variables — a deploy job can route on the target (e.g. per-environment buckets) without parsing
anything.

## Azure Pipelines

Expand Down
8 changes: 7 additions & 1 deletion templates/gitlab-ci-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,20 @@
set -e

if [ "$code" -eq 3 ]; then
echo "RULES_CHANGED=false" > gorules.env
{
echo "RULES_CHANGED=false"
echo "RULES_PROJECT=${GORULES_PROJECT:-}"
echo "RULES_TARGET=${GORULES_TARGET:-main}"
} > gorules.env
echo "Target unchanged, nothing downloaded."
exit 0
fi
if [ "$code" -ne 0 ]; then exit "$code"; fi

{
echo "RULES_CHANGED=true"
echo "RULES_PROJECT=${GORULES_PROJECT:-}"
echo "RULES_TARGET=${GORULES_TARGET:-main}"
node -e 'const r=require("./result.json");console.log("RULES_VERSION="+(r.version||""));console.log("RULES_RELEASE="+(r.release||""));console.log("RULES_SHA256="+(r.sha256||""))'
} > gorules.env
cat gorules.env
Expand Down
Loading