Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e7143bf
fix: import the `push.sh` script in the push command (#131)
EricRibeiro Jun 13, 2022
1697d7c
fix: replace `deploy` steps to `run` (#129)
kelvintaywl Jun 13, 2022
ef1889f
fix: enable to expand env vars in `extra_build_args` (#130)
ymtdzzz Jun 13, 2022
f90fa12
Merge branch 'master' into update-docker-tag-args
micahvdk Jul 28, 2022
3674f2f
no need to save local ifs variable in function
micahvdk Jul 28, 2022
37c70de
fix: issues related to `publish`, `install-docker-compose` and `updat…
EricRibeiro Aug 22, 2022
87dc209
feat: clean-up after `install-docker-compose` (#148)
EricRibeiro Aug 22, 2022
39faf1f
Merge branch 'master' into update-docker-tag-args
EricRibeiro Aug 29, 2022
ce0c7f2
Support expanding env vars on the extra_build_args parameter (#149)
devblackops Sep 2, 2022
83e2896
fix: error when downloading the credential helper's latest version (#…
EricRibeiro Sep 22, 2022
014287b
chore: update comment to reflect dev's input (#157)
EricRibeiro Sep 23, 2022
f825d17
add example with bash substitution
micahvdk Oct 25, 2022
448b4c0
add test with bash substitution
micahvdk Oct 25, 2022
d8f04f6
trigger ci
micahvdk Oct 25, 2022
034897c
remove unnecessary change
micahvdk Oct 25, 2022
b8177ce
remove unnecessary change
micahvdk Oct 25, 2022
3d432d7
chore: [ci skip] replace CPEng with orb-publishers team in CODEOWNERS…
Jaryt Nov 23, 2022
253987c
fix: evaluate and expand all orb parameters (#171)
EricRibeiro Dec 5, 2022
68c004d
feat: adds support for arm64 (M1) architecture while installing goss …
fruit Dec 6, 2022
8b3cd56
chore: set default value to current upstream default value (#173)
ssplatt Feb 20, 2023
b6600db
fix: install hadolint for hadolint command (#175)
brivu Feb 21, 2023
fd4948a
feat/hadolint failure threshold (#177)
brivu Feb 23, 2023
6b4292d
Merge branch 'master' into update-docker-tag-args
brivu Feb 24, 2023
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ workflows:
requires: [orb-tools/publish]
filters:
tags:
only: /.*/
only: /.*/
204 changes: 199 additions & 5 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,42 @@ promotion_requires: &promotion_requires
test-credentials-store-docker,
test-credentials-store-machine,
test-credentials-store-macos,
test-credentials-store-docker-custom-tag,
test-credentials-store-machine-custom-tag,
test-credentials-store-macos-custom-tag,
test-hadolint-install,
publish-machine,
publish-docker-cache,
publish-docker-cache-not-found,
publish-docker-with-buildkit,
publish-docker-multiple-tags,
publish-docker-env-var-image-param,
test-pull,
test-install-docker-tools-docker-latest,
test-install-docker-tools-docker-old,
test-install-docker-tools-macos-latest,
test-install-docker-tools-macos-old,
test-install-docker-tools-machine-latest,
test-install-docker-tools-machine-old,
test-install-docker-tools-machine-arm,
test-install-docker-compose-with-checksums,
test-install-docker-compose-with-sha256,
test-install-docker-compose-with-checksums-and-sha256,
test-docker-latest,
test-docker-old,
test-macos-latest,
test-macos-old,
test-machine-latest,
test-machine-old,
test-build-command-workspace
test-build-command-workspace,
test-build-with-args,
test-build-bash-substitution
]

filters: &filters
tags:
only: /.*/

orbs:
build-tools: circleci/build-tools@3.0.0
docker: circleci/docker@dev:<<pipeline.git.revision>>
Expand Down Expand Up @@ -82,12 +93,17 @@ jobs:
debug:
type: boolean
default: false
goss-architecture:
type: enum
default: amd64
enum: [ amd64, arm64 ]
executor: <<parameters.executor>>
steps:
- checkout
- jq/install
- docker/install-docker-tools:
install-goss-dgoss: << parameters.install-goss >>
goss-architecture: << parameters.goss-architecture >>
test-pull:
executor: docker-latest
steps:
Expand Down Expand Up @@ -125,10 +141,14 @@ jobs:
type: env_var_name
docker-password:
type: env_var_name
release-tag:
type: string
default: ""
executor: <<parameters.executor>>
steps:
- docker/install-docker-credential-helper:
helper-name: <<parameters.helper-name>>
release-tag: <<parameters.release-tag>>
- docker/configure-docker-credentials-store:
helper-name: <<parameters.helper-name>>
- run:
Expand Down Expand Up @@ -179,6 +199,30 @@ jobs:
ls
exit 1
fi
test-build-with-args:
docker:
- image: cimg/base:stable
steps:
- checkout
- setup_remote_docker
- docker/build:
dockerfile: test3.Dockerfile
image: cpeorbtesting/docker-orb-test
tag: $CIRCLE_BUILD_NUM-$CIRCLE_SHA1
extra_build_args: --build-arg COMMIT_HASH=$CIRCLE_SHA1
test-build-bash-substitution:
docker:
- image: cimg/base:stable
environment:
DOCKER_ACCOUNT: CPEOrbTesting
DOCKER_REPO: docker_orb_test
steps:
- checkout
- setup_remote_docker
- docker/build:
dockerfile: test3.Dockerfile
image: ${DOCKER_ACCOUNT,,}/${DOCKER_REPO/_/-}
tag: ${CIRCLE_BUILD_NUM}-${CIRCLE_SHA1:0:10}
test-dockerlint:
docker:
- image: cimg/node:17.7.2
Expand All @@ -198,7 +242,54 @@ jobs:
debug: <<parameters.debug>>
dockerfile: <<parameters.dockerfile>>
treat-warnings-as-errors: <<parameters.treat-warnings-as-errors>>
test-install-docker-compose:
parameters:
docker-compose-version:
type: string
default: latest
description: >
Version of `docker-compose` to install, defaults to the latest stable release.
If specifying a version other than latest, provide a full release tag,
as listed at https://github.com/docker/compose/releases or
https://api.github.com/repos/docker/compose/releases, e.g., `1.23.1`.

install-dir:
type: string
default: /usr/local/bin
description: >
Directory in which to install `docker-compose`
executor:
type: executor

executor: << parameters.executor >>

steps:
- docker/install-docker
- docker/install-docker-compose:
version: << parameters.docker-compose-version>>
install-dir: << parameters.install-dir>>

test-hadolint-install:
parameters:
executor:
type: executor
executor: << parameters.executor >>
steps:
- checkout
- docker/hadolint:
dockerfiles: test.Dockerfile
ignore-rules: DL4005,DL3008,DL3009,DL3015
trusted-registries: docker.io,my-company.com:5000
- run:
name: Verifying hadolint install
command: |
if ! command -v hadolint; then
echo "hadolint not installed"
exit 1
else
echo "hadolint installed successfully"
exit 0
fi
workflows:
test-deploy:
jobs:
Expand All @@ -207,6 +298,13 @@ workflows:
ignore-rules: DL4005,DL3008,DL3009,DL3015,DL3059
trusted-registries: docker.io,my-company.com:5000
dockerfiles: test.Dockerfile:test2.Dockerfile
failure-threshold: none
filters: *filters
- test-hadolint-install:
name: test-install-hadolint-<< matrix.executor >>
matrix:
parameters:
executor: [docker-latest, machine-arm, macos-latest]
filters: *filters
- test-dockerlint:
name: dockerlint
Expand All @@ -221,6 +319,25 @@ workflows:
requires:
- test-create-workspace
filters: *filters
- test-build-with-args:
filters: *filters

# begin test-install-docker-compose
- test-install-docker-compose:
name: test-install-docker-compose-with-checksums
executor: docker-latest
filters: *filters
- test-install-docker-compose:
name: test-install-docker-compose-with-sha256
docker-compose-version: v2.0.1
executor: docker-latest
filters: *filters
- test-install-docker-compose:
name: test-install-docker-compose-with-checksums-and-sha256
docker-compose-version: v2.9.0
executor: docker-latest
filters: *filters
# end test-install-docker-compose

# begin test-check-command
- test-check-command:
Expand Down Expand Up @@ -276,6 +393,33 @@ workflows:
pre-steps:
- docker/install-docker
filters: *filters
- test-credentials-store:
name: test-credentials-store-docker-custom-tag
executor: docker-latest
context: CPE-orb-docker-testing
helper-name: pass
docker-username: DOCKER_USER
docker-password: DOCKER_PASS
release-tag: "v0.6.4"
filters: *filters
- test-credentials-store:
name: test-credentials-store-machine-custom-tag
executor: machine-latest
context: CPE-orb-docker-testing
docker-username: DOCKER_USER
docker-password: DOCKER_PASS
release-tag: "v0.6.4"
filters: *filters
- test-credentials-store:
name: test-credentials-store-macos-custom-tag
executor: macos-latest
context: CPE-orb-docker-testing
docker-username: DOCKER_USER
docker-password: DOCKER_PASS
release-tag: "v0.6.4"
pre-steps:
- docker/install-docker
filters: *filters
# end test-credentials-store

# begin docker/publish
Expand Down Expand Up @@ -375,6 +519,42 @@ workflows:
docker-password: DOCKER_PASS
use-docker-credentials-store: true
filters: *filters
- docker/publish:
pre-steps:
- run: echo 'export DOCKER_USERNAME=cpeorbtesting' >> $BASH_ENV
- run: echo 'export DOCKER_NAME=docker-orb-test' >> $BASH_ENV
name: publish-docker-env-var-image-param
executor: docker-latest
context: CPE-orb-docker-testing
use-remote-docker: true
dockerfile: test.Dockerfile
image: $DOCKER_USERNAME/$DOCKER_NAME
tag: $CIRCLE_SHA1,$CIRCLE_BUILD_NUM
docker-username: DOCKER_USER
docker-password: DOCKER_PASS
use-docker-credentials-store: true
filters: *filters
- docker/publish:
pre-steps:
- run:
name: Export env vars
command: |
echo 'export DOCKER_USERNAME=cpeorbtesting' >> $BASH_ENV
echo 'export DOCKER_NAME=docker-orb-test' >> $BASH_ENV
echo 'export DOCKERFILE=test.Dockerfile' >> $BASH_ENV
echo 'export REGISTRY=docker.io' >> $BASH_ENV
name: publish-docker-env-var-all-params
executor: docker-latest
context: CPE-orb-docker-testing
use-remote-docker: true
dockerfile: $DOCKERFILE
image: $DOCKER_USERNAME/$DOCKER_NAME
tag: $CIRCLE_SHA1,$CIRCLE_BUILD_NUM
docker-username: DOCKER_USER
docker-password: DOCKER_PASS
use-docker-credentials-store: true
registry: $REGISTRY
filters: *filters
# end docker/publish

# begin test-install-docker-tools
Expand All @@ -383,6 +563,14 @@ workflows:
matrix:
parameters:
executor: [docker-latest, docker-old, machine-latest, machine-old]
goss-architecture: [amd64]
filters: *filters
- test-install-docker-tools:
name: test-install-docker-tools-<< matrix.executor >>
matrix:
parameters:
executor: [machine-arm]
goss-architecture: [arm64]
filters: *filters
- test-install-docker-tools:
name: test-install-docker-tools-<< matrix.executor >>
Expand All @@ -392,7 +580,7 @@ workflows:
install-goss: false
filters: *filters
# end test-install-docker-tools

# begin test
- test:
name: test-<< matrix.executor >>
Expand Down Expand Up @@ -427,10 +615,10 @@ workflows:
executors:
macos-old:
macos:
xcode: 10.3.0
xcode: 11.7.0
macos-latest:
macos:
xcode: 13.1.0
xcode: 14.0.0
docker-old:
docker:
- image: cimg/base:2020.08-20.04
Expand All @@ -443,3 +631,9 @@ executors:
machine-latest:
machine:
image: ubuntu-2004:current
machine-arm:
resource_class: arm.medium
machine:
image: ubuntu-2004:202101-01

# VS Code Extension Version: 1.3.0
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Ping these folks when changes are made to this repository
* @CircleCI-Public/cpeng
* @CircleCI-Public/orb-publishers
5 changes: 2 additions & 3 deletions src/@orb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ display:
source_url: https://github.com/CircleCI-Public/docker-orb

orbs:
bt: circleci/build-tools@2.6.3
jq: circleci/jq@2.0
orb-tools: circleci/orb-tools@9.1
bt: circleci/build-tools@3.0
jq: circleci/jq@2.2
7 changes: 6 additions & 1 deletion src/commands/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ steps:
steps:
- run: echo 'export DOCKER_BUILDKIT=1' >> $BASH_ENV

- when:
condition: <<parameters.extra_build_args>>
steps:
- run: echo 'PARAM_EXTRA_BUILD_ARGS="<<parameters.extra_build_args>>"' >> $BASH_ENV

- when:
condition: <<parameters.attach-at>>
steps:
Expand All @@ -126,9 +131,9 @@ steps:
PARAM_DOCKER_CONTEXT: <<parameters.docker-context>>
PARAM_DOCKERFILE_NAME: <<parameters.dockerfile>>
PARAM_DOCKERFILE_PATH: <<parameters.path>>
PARAM_EXTRA_BUILD_ARGS: <<parameters.extra_build_args>>
PARAM_IMAGE: <<parameters.image>>
PARAM_REGISTRY: <<parameters.registry>>
PARAM_TAG: <<parameters.tag>>
PARAM_USE_BUILDKIT: <<parameters.use-buildkit>>
SCRIPT_UTILS: <<include(scripts/utils.sh)>>
command: <<include(scripts/build.sh)>>
7 changes: 1 addition & 6 deletions src/commands/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ parameters:
This option is only supported on Ubuntu/Debian/macOS platforms.

steps:
- orb-tools/check-env-var-param:
param: <<parameters.docker-username>>

- orb-tools/check-env-var-param:
param: <<parameters.docker-password>>

- when:
condition: <<parameters.use-docker-credentials-store>>
steps:
Expand All @@ -47,4 +41,5 @@ steps:
PARAM_REGISTRY: <<parameters.registry>>
PARAM_DOCKER_USERNAME: <<parameters.docker-username>>
PARAM_DOCKER_PASSWORD: <<parameters.docker-password>>
SCRIPT_UTILS: <<include(scripts/utils.sh)>>
command: <<include(scripts/check.sh)>>
1 change: 1 addition & 0 deletions src/commands/configure-docker-credentials-store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ steps:
environment:
PARAM_HELPER_NAME: "<<parameters.helper-name>>"
PARAM_DOCKER_CONFIG_PATH: "<<parameters.docker-config-path>>"
SCRIPT_UTILS: <<include(scripts/utils.sh)>>
command: <<include(scripts/configure-docker-credentials-store.sh)>>
Loading