Skip to content

Commit

Permalink
feat(ctr): use new lacework/lacework-cli repository (#206)
Browse files Browse the repository at this point in the history
Signed-off-by: Salim Afiune Maya <[email protected]>
  • Loading branch information
afiune authored Sep 11, 2020
1 parent 75e0348 commit fa1e268
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
api-key: CI_API_KEY
api-secret: CI_API_SECRET
registry: index.docker.io
repository: techallylw/lacework-cli
repository: lacework/lacework-cli
tag: << parameters.tag >>

workflows:
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set -eou pipefail
readonly project_name=go-sdk
readonly package_name=lacework-cli
readonly binary_name=lacework
readonly docker_org=techallylw
readonly docker_org=lacework
readonly docker_tags=(
latest
scratch
Expand Down
29 changes: 27 additions & 2 deletions scripts/release_containers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
set -eou pipefail

# The repository where we are hosting the lacework-cli containers
# TODO @afiune switch it to "lacework/lacework-cli" repository
readonly repository="techallylw/lacework-cli"
readonly repository="lacework/lacework-cli"
# @afiune let us continue posting the Lacework CLI to the old reporitory for a few
readonly old_repo="techallylw/lacework-cli"
readonly project_name=lacework-cli

log() {
Expand All @@ -30,6 +31,11 @@ log "releasing container from SCRATCH"
docker build -t "${repository}:scratch" --no-cache .
docker push "${repository}:scratch"

# @afiune let us continue posting the Lacework CLI to the old reporitory for a few
log "releasing old container for SCRATCH"
docker image tag "${repository}:scratch" "${old_repo}:scratch"
docker push "${old_repo}:scratch"

# when updating the distributions below, please make sure to update
# the script 'release.sh' inside the 'script/' folder
distros=(
Expand All @@ -45,6 +51,11 @@ for dist in "${distros[@]}"; do
log "releasing container for ${dist}"
docker build -f "cli/images/${dist}/Dockerfile" --no-cache -t "${repository}:${dist}" .
docker push "${repository}:${dist}"

# @afiune let us continue posting the Lacework CLI to the old reporitory for a few
log "releasing old container for ${dist}"
docker image tag "${repository}:${dist}" "${old_repo}:${dist}"
docker push "${old_repo}:${dist}"
done

log "creating docker manifest"
Expand All @@ -59,4 +70,18 @@ docker manifest create "${repository}:latest" \
log "pushing docker manifest"
docker manifest push "${repository}:latest" --purge

# @afiune let us continue posting the Lacework CLI to the old reporitory for a few
log "creating docker manifest for the old repository ${old_repo}"
docker manifest create "${old_repo}:latest" \
"${old_repo}:scratch" \
"${old_repo}:ubi-8" \
"${old_repo}:centos-8" \
"${old_repo}:debian-10" \
"${old_repo}:ubuntu-1804" \
"${old_repo}:amazonlinux-2" --amend

log "pushing docker manifest for the old repository ${old_repo}"
docker manifest push "${old_repo}:latest" --purge

log "All docker containers have been released! (https://hub.docker.com/repository/docker/${repository})"
log "All docker containers have been released! (https://hub.docker.com/repository/docker/${old_repo})"

0 comments on commit fa1e268

Please sign in to comment.