Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set variables required for build and skip push if creds are missing #80

Merged
merged 3 commits into from
Dec 21, 2023
Merged
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
10 changes: 10 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,18 @@ aliases:
- run:
name: Build all platforms
command: |
export PLATFORMS="linux/amd64,linux/arm/v7,linux/arm64"
export REPO=drpsychick
export IMAGE_NAME=airprint-bridge
if [ "${CIRCLE_BRANCH}" != "master" ]; then export TAG=${TAG}-dev; fi
docker buildx build --progress plain --platform $PLATFORMS --build-arg \
UBUNTU_VERSION=<< parameters.ubuntu_version >> -t $REPO/$IMAGE_NAME:<< parameters.ubuntu_version >> .
- run:
name: Testing cups
command: |
export PLATFORMS="linux/amd64,linux/arm/v7,linux/arm64"
export REPO=drpsychick
export IMAGE_NAME=airprint-bridge
if [ "${CIRCLE_BRANCH}" != "master" ]; then export TAG=${TAG}-dev; fi
docker buildx build --progress plain --platform linux/amd64 --build-arg \
UBUNTU_VERSION=<< parameters.ubuntu_version >> -t $REPO/$IMAGE_NAME:<< parameters.ubuntu_version >> --load .
Expand All @@ -69,6 +75,10 @@ aliases:
- run:
name: Build and push all platforms
command: |
export PLATFORMS="linux/amd64,linux/arm/v7,linux/arm64"
export REPO=drpsychick
export IMAGE_NAME=airprint-bridge
if [ -z "${DOCKER_PASS}" ]; then echo"Skipping push because of missing credentials..."; exit; fi
if [ "${CIRCLE_BRANCH}" != "master" ]; then export TAG=${TAG}-dev; fi
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin &> /dev/null || exit 1
docker buildx build --progress plain --platform $PLATFORMS --build-arg \
Expand Down