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

feat: Built a multi-arch docker image #37

Merged
merged 1 commit into from
May 29, 2023
Merged
Show file tree
Hide file tree
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
37 changes: 23 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ slack_image: &slack_image
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD

orbs:
docker: circleci/docker@2.2.0

work_directory: &work_directory
working_directory: ~/ldap-search-api

Expand Down Expand Up @@ -116,6 +113,24 @@ jobs:
- store_test_results:
path: build/test-results

publish:
executor: docker-executor
steps:
- checkout
- setup_remote_docker
- attach_workspace:
at: ~/ldap-search-api
- run: |
TAG=${CIRCLE_SHA1:0:8}
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
docker buildx create --name rockbuilder \
--driver docker-container --use --bootstrap
docker buildx build \
--platform linux/amd64,linux/arm64 \
--push \
-t devatherock/ldap-search-api:$TAG \
-t devatherock/ldap-search-api:latest .

dockerhub_readme:
machine:
image: ubuntu-2204:2023.04.2
Expand Down Expand Up @@ -153,9 +168,10 @@ jobs:
TAG=${CIRCLE_TAG#v}
DEV_TAG=${CIRCLE_SHA1:0:8}
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
docker pull devatherock/ldap-search-api:$DEV_TAG
docker tag devatherock/ldap-search-api:$DEV_TAG devatherock/ldap-search-api:$TAG
docker push devatherock/ldap-search-api:$TAG
docker buildx create --name rockbuilder \
--driver docker-container --use --bootstrap
docker buildx imagetools create \
-t devatherock/ldap-search-api:$TAG devatherock/ldap-search-api:$DEV_TAG

notify:
<<: *slack_image
Expand Down Expand Up @@ -184,18 +200,11 @@ workflows:
- jumpcloud-credentials
requires:
- validate_yamls
- docker/publish:
name: publish
executor: docker-executor
- publish:
context:
- docker-credentials
requires:
- build
image: devatherock/ldap-search-api
attach-at: ~/ldap-search-api
tag: "${CIRCLE_SHA1:0:8},latest"
use-remote-docker: true
docker-username: DOCKER_USERNAME
- dockerhub_readme:
context:
- docker-credentials
Expand Down
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

## [Unreleased]
### Added
- Renovate config
- [#5](https://github.com/devatherock/ldap-search-api/issues/5): Query parameter to limit number of results
- [#7](https://github.com/devatherock/ldap-search-api/issues/7): Query parameter to specify the attributes to be returned in the result
- [#27](https://github.com/devatherock/ldap-search-api/issues/27): Tests for built-in endpoints like `/health`

### Changed
- [#30](https://github.com/devatherock/ldap-search-api/issues/30): Updated dockerhub readme in CI pipeline
- [#32](https://github.com/devatherock/ldap-search-api/issues/32): Built a multi-arch docker image

## [0.5.0] - 2023-05-24
### Added
- Renovate config
- [#5](https://github.com/devatherock/ldap-search-api/issues/5): Query parameter to limit number of results
- [#7](https://github.com/devatherock/ldap-search-api/issues/7): Query parameter to specify the attributes to be returned in the result

## [0.4.0] - 2023-05-22
### Added
Expand Down