-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: evaluate and expand all orb parameters (#171)
* feat: add utils function to expand orb parameters * fix: import `utils.sh` to emulate behaviour before orb-tools migration * fix: shellcheck * ci: add test with params coming from env vars
- Loading branch information
1 parent
3d432d7
commit 253987c
Showing
28 changed files
with
152 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ promotion_requires: &promotion_requires | |
filters: &filters | ||
tags: | ||
only: /.*/ | ||
|
||
orbs: | ||
build-tools: circleci/[email protected] | ||
docker: circleci/docker@dev:<<pipeline.git.revision>> | ||
|
@@ -246,7 +246,7 @@ jobs: | |
- docker/install-docker | ||
- docker/install-docker-compose: | ||
version: << parameters.docker-compose-version>> | ||
install-dir: << parameters.install-dir>> | ||
install-dir: << parameters.install-dir>> | ||
|
||
workflows: | ||
test-deploy: | ||
|
@@ -485,6 +485,27 @@ workflows: | |
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 | ||
|
@@ -502,7 +523,7 @@ workflows: | |
install-goss: false | ||
filters: *filters | ||
# end test-install-docker-tools | ||
|
||
# begin test | ||
- test: | ||
name: test-<< matrix.executor >> | ||
|
@@ -552,4 +573,6 @@ executors: | |
image: ubuntu-2004:202010-01 | ||
machine-latest: | ||
machine: | ||
image: ubuntu-2004:current | ||
image: ubuntu-2004:current | ||
|
||
# VS Code Extension Version: 1.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "${!PARAM_DOCKER_PASSWORD}" | docker login -u "${!PARAM_DOCKER_USERNAME}" --password-stdin "$PARAM_REGISTRY" | ||
# Import "utils.sh". | ||
eval "$SCRIPT_UTILS" | ||
expand_env_vars_with_prefix "PARAM_" | ||
|
||
echo "${!PARAM_DOCKER_PASSWORD}" | docker login -u "${!PARAM_DOCKER_USERNAME}" --password-stdin "$PARAM_REGISTRY" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.