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

Add latest tag #998

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
2 changes: 1 addition & 1 deletion .gitlab/build/build_gcs_base_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ build-gcs-base:
- git checkout "$DATAFED_GCS_SUBMODULE_VERSION"
- docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY_TOKEN}"
- docker build --progress plain -t "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}:latest" - < "./docker-files/Dockerfile.ubuntu-20.04"
- docker push "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}"
- docker push "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}:latest"

placeholder:
extends: .placeholder
2 changes: 1 addition & 1 deletion .gitlab/build/build_gcs_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ build-gcs:
- ./scripts/generate_datafed.sh
- docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY_TOKEN}"
- docker build --build-arg DEPENDENCIES="${REGISTRY}/datafed/dependencies-${BRANCH_LOWER}:latest" --build-arg RUNTIME="${REGISTRY}/datafed/runtime-${BRANCH_LOWER}:latest" --build-arg GCS_IMAGE="${REGISTRY}/datafed/gcs-base-${BRANCH_LOWER}:latest" -f repository/docker/Dockerfile.gcs -t "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}:latest" .
- docker push "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}"
- docker push "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}:latest"

placeholder:
extends: .placeholder
2 changes: 1 addition & 1 deletion .gitlab/build/force_build_gcs_base_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ build-gcs-base:
- git checkout "$DATAFED_GCS_SUBMODULE_VERSION"
- docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY_TOKEN}"
- docker build --progress plain -t "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}:latest" - < "./docker-files/Dockerfile.ubuntu-20.04"
- docker push "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}"
- docker push "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}:latest"
2 changes: 1 addition & 1 deletion .gitlab/build/force_build_gcs_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ build-gcs:
- ./scripts/generate_datafed.sh
- docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY_TOKEN}"
- docker build --build-arg DEPENDENCIES="${REGISTRY}/datafed/dependencies-${BRANCH_LOWER}:latest" --build-arg RUNTIME="${REGISTRY}/datafed/runtime-${BRANCH_LOWER}:latest" --build-arg GCS_IMAGE="${REGISTRY}/datafed/gcs-base-${BRANCH_LOWER}:latest" -f repository/docker/Dockerfile.gcs -t "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}:latest" .
- docker push "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}"
- docker push "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}:latest"
2 changes: 1 addition & 1 deletion .gitlab/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
- ./scripts/generate_datafed.sh
- docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY_TOKEN}"
- docker build --build-arg DEPENDENCIES="${REGISTRY}/datafed/dependencies-${BRANCH_LOWER}:latest" --build-arg RUNTIME="${REGISTRY}/datafed/runtime-${BRANCH_LOWER}:latest" -f ${DOCKER_FILE_PATH} -t "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}:latest" .
- docker push "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider refactoring to reduce duplication across build files

The consistent application of this change across multiple files (build_gcs_base_image.yml, build_gcs_image.yml, force_build_gcs_base_image.yml, force_build_gcs_image.yml, and common.yml) suggests there might be some duplication in the build configuration. In the future, consider refactoring these files to reduce duplication and improve maintainability.

.docker_build_and_push:
  script:
    - export IMAGE_TAG="${CI_PROJECT_NAME,,}"
    - export BRANCH_LOWER="${CI_COMMIT_REF_NAME,,}"
    - docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY_TOKEN}"
    - docker build --progress plain -t "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}:latest" - < "${DOCKERFILE_PATH}"
    - docker push "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}:latest"

- docker push "${REGISTRY}/${IMAGE_TAG}-${BRANCH_LOWER}:latest"

.error_logs_client_end_to_end:
stage: log
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
18. [995] - Fixes issue with project and user folders in repo being created under root user permissions.
19. [994] - Fixes issue with spaces not being preserved in shell scripts from docker compose .env file.
20. [996] - Fixes bug in lego install script where function name had additional s
21. [998] - Fixing missing :latest tag on push in container, in common.yml of ci files
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick (documentation): Consider changing 'Fixing' to 'Fixes' for consistency with other entries.


# v2023.10.23.15.50

Expand Down
Loading