Skip to content

Commit

Permalink
build: Start publishing k-apps server
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolajb committed Oct 8, 2024
1 parent e73f0e4 commit ed6ffaa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ jobs:
GIT_TAG: ${{ env.GIT_TAG }}
run: devbox run -- just release

- name: Release kommander applications server
env:
DOCKER_USERNAME: ${{ secrets.NEXUS_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
GIT_TAG: ${{ env.GIT_TAG }}
run: devbox run -- just release-server

- name: Release OCI artifact
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
Expand Down
19 changes: 15 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,23 @@ archive_name := "kommander-applications-" + git_tag+ ".tar.gz"
published_url := "https://downloads.d2iq.com" / s3_path / archive_name

release publish="true" tmp_dir=`mktemp --directory`: (_prepare-archive tmp_dir) && _cleanup
if {{ publish }}; then aws s3 cp --acl {{ s3_acl }} {{ archive_name }} {{ s3_uri }}; fi
@echo "Published to {{ published_url }}"
#!/usr/bin/env bash
set -euox pipefail
if {{ publish }}; then
aws s3 cp --acl {{ s3_acl }} {{ archive_name }} {{ s3_uri }}
@echo "Published to {{ published_url }}"
else
@echo "Skipping publish"
fi
release-oci publish="true" tmp_dir=`mktemp --directory`: (_prepare-files-for-a-bundle tmp_dir)
if {{ publish }}; then \
cd {{ tmp_dir }} && echo "${DOCKER_PASSWORD}" | oras push --password-stdin --username "${DOCKER_USERNAME}" --verbose {{ registry }}/{{ repository }}:{{ git_tag }} .;
#!/usr/bin/env bash
set -euox pipefail
cd {{ tmp_dir }}
if {{ publish }}; then
oras push --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}" --verbose {{ registry }}/{{ repository }}:{{ git_tag }} .
else
@echo "Skipping publish"
fi
release-server publish="true" tmp_dir=`mktemp --directory`: (_prepare-archive tmp_dir) && _cleanup
Expand Down

0 comments on commit ed6ffaa

Please sign in to comment.