Skip to content

Commit

Permalink
test-already-present: test that package is already present (#63)
Browse files Browse the repository at this point in the history
- Clean up artifacts after installation
- Bugfix for directory includes by default in default ignore files
- Cleaned up code for installing jq iff it is not already present in the container image.

---------

Co-authored-by: Emma Doyle <emma@sbevision.com>
  • Loading branch information
emmeowzing and Emma Doyle committed May 23, 2023
1 parent b7ac592 commit 41f8f04
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
13 changes: 2 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,12 @@ setup: true
orbs:
orb-tools: circleci/orb-tools@11.6.1
circleci-cli: circleci/circleci-cli@0.1.9
# dynamic: bjd2385/dynamic-continuation@dev:alpha
dynamic: bjd2385/dynamic-continuation@3.6.8
dynamic: bjd2385/dynamic-continuation@dev:alpha
# dynamic: bjd2385/dynamic-continuation@3.6.8
general: bjd2385/general@0.6.3
slack: circleci/slack@4.12.5


executors: {}


commands: {}


jobs: {}


workflows:
dynamic-continuation:
jobs:
Expand Down
6 changes: 5 additions & 1 deletion src/jobs/continue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,16 @@ steps:
- run:
name: 'Pre: Install jq'
command: |+
sudo apt show jq | grep "Version: << parameters.jq-version >>" || sudo apt update && sudo apt install -y jq=<< parameters.jq-version >>
if ! sudo apt show jq 2>/dev/null | grep "Version: << parameters.jq-version >>" >/dev/null; then
sudo apt update
sudo apt install -y jq=<< parameters.jq-version >>
fi
- run:
name: 'Pre: Install yq'
command: |+
curl -sSL https://github.com/mikefarah/yq/releases/download/<< parameters.yq-version >>/yq_linux_amd64 -o yq
sudo install yq /usr/local/bin/yq
rm yq
- circleci/install:
version: << parameters.circleci-cli-version >>
- filter:
Expand Down
6 changes: 4 additions & 2 deletions src/scripts/filter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,18 @@ else

cat << IGNORE > ".circleci/${module_dots}.ignore"
# Ignore everything outside of the target directory users can add and remove files from here.
*
.*
!${module_slashes}
!/${module_slashes}/
IGNORE
else
# User provided their own gitignore.
info "user provided their own gitignore \".circleci/${module_dots}.ignore\" for \".circleci/${module_dots}.yml\" workflow."
cat << IGNORE > ".circleci/${module_dots}.ignore.tmp"
# Ignore everything outside of the target directory users can add and remove files from here.
*
.*
!${module_slashes}
!/${module_slashes}/
IGNORE

# Concatenate generated ignore with user-provided config.
Expand Down

0 comments on commit 41f8f04

Please sign in to comment.