Skip to content

Commit 299a701

Browse files
committed
Add SKIP_INDEX for CI packs
CI packs should set SKIP_INDEX in the `deploy` job's environment. This way, the pack can be used to test everything else that happens during `deployment` script runs. Example snippet of .circleci/config.yml: ``` jobs: deploy: environment: # This pack should not be on the index SKIP_INDEX: "true" ```
1 parent 74f5081 commit 299a701

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.circle/deployment

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,14 @@ if ! git -C ~/index diff --quiet --exit-code --cached
110110
then
111111
echo "Updating the index repo..."
112112
git -C ~/index commit -m "Update the ${PACK_NAME} pack."
113-
git -C ~/index push -q origin
114-
echo "Index updated."
113+
if [[ ${SKIP_INDEX:-false} == "true" ]]; then
114+
echo "Skipping index update due to SKIP_INDEX=${SKIP_INDEX}"
115+
echo "SKIP_INDEX is for packs that are only used in CI;"
116+
echo "Normal packs push to the index repo at this point."
117+
else
118+
git -C ~/index push -q origin
119+
echo "Index updated."
120+
fi
115121

116122
# echo "Updating the repo description..."
117123
# PACK_DESCRIPTION=$(cat ~/index/v1/index.json | jq ".packs.${PACK_NAME}.description")

0 commit comments

Comments
 (0)