Skip to content

Commit ebd9ba5

Browse files
committed
Update release to publish to Pixie OSS ghcr.io registry
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent 6244739 commit ebd9ba5

3 files changed

Lines changed: 10 additions & 17 deletions

File tree

.github/workflows/cloud_release.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ jobs:
1717
name: Build Release
1818
runs-on: oracle-16cpu-64gb-x86-64
1919
needs: get-dev-image
20+
permissions:
21+
contents: read
22+
packages: write
2023
container:
2124
image: ${{ needs.get-dev-image.outputs.image-with-tag }}
2225
steps:
@@ -30,15 +33,16 @@ jobs:
3033
with:
3134
download_toplevel: 'true'
3235
BB_API_KEY: ${{ secrets.BB_IO_API_KEY }}
33-
- id: gcloud-creds
34-
uses: ./.github/actions/gcloud_creds
35-
with:
36-
SERVICE_ACCOUNT_KEY: ${{ secrets.GH_RELEASE_SA_PEM_B64 }}
3736
- name: Import GPG key
3837
env:
3938
BUILDBOT_GPG_KEY_B64: ${{ secrets.BUILDBOT_GPG_KEY_B64 }}
4039
run: |
4140
echo "${BUILDBOT_GPG_KEY_B64}" | base64 --decode | gpg --no-tty --batch --import
41+
- uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v2
42+
with:
43+
registry: ghcr.io
44+
username: ${{ github.actor }}
45+
password: ${{ secrets.GITHUB_TOKEN }}
4246
- name: Build & Push Artifacts
4347
env:
4448
REF: ${{ github.event.ref }}
@@ -47,7 +51,6 @@ jobs:
4751
GH_API_KEY: ${{ secrets.GITHUB_TOKEN }}
4852
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
4953
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
50-
GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.gcloud-creds.outputs.gcloud-creds }}
5154
BUILDBOT_GPG_KEY_ID: ${{ secrets.BUILDBOT_GPG_KEY_ID }}
5255
shell: bash
5356
run: |

ci/artifact_mirrors.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,3 @@
44
- name: gh-releases
55
type: gh-releases
66
url_format: 'https://github.com/${gh_repo}/releases/download/release/${component}/v${version}/${artifact_name}'
7-
- name: pixie-oss-gcs
8-
type: gcs
9-
bucket: pixie-dev-public
10-
path_format: '${component}/${version}/${artifact_name}'
11-
url_format: 'https://storage.googleapis.com/pixie-dev-public/${component}/${version}/${artifact_name}'

ci/cloud_build_release.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@ if [[ "${release_tag}" == *"-"* ]]; then
3434
fi
3535

3636
echo "The image tag is: ${release_tag}"
37-
image_repo="gcr.io/pixie-oss/pixie-prod"
37+
image_repo="ghcr.io/pixie-io"
3838

3939
bazel run -c opt \
4040
--config=stamp \
4141
--config=x86_64_sysroot \
42-
--action_env=GOOGLE_APPLICATION_CREDENTIALS \
4342
--//k8s:image_repository="${image_repo}" \
4443
--//k8s:image_version="${release_tag}" \
4544
//k8s/cloud:cloud_images_push
@@ -53,17 +52,13 @@ done < <(bazel run -c opt \
5352
--//k8s:image_version="${release_tag}" \
5453
//k8s/cloud:list_image_bundle)
5554

56-
all_licenses_opts=("//tools/licenses:all_licenses" "--action_env=GOOGLE_APPLICATION_CREDENTIALS" "--remote_download_outputs=toplevel")
55+
all_licenses_opts=("//tools/licenses:all_licenses" "--remote_download_outputs=toplevel")
5756
all_licenses_path="$(bazel cquery "${all_licenses_opts[@]}" --output starlark --starlark:expr "target.files.to_list()[0].path" 2> /dev/null)"
5857
bazel build "${all_licenses_opts[@]}"
5958

6059
upload_artifact_to_mirrors "cloud" "${release_tag}" "${all_licenses_path}" "licenses.json"
61-
# The licenses file uses a non-standard path (outside of the "component/version/artifact" convention)
62-
# so for now we'll also copy it to the legacy path.
63-
gsutil cp "${all_licenses_path}" "gs://pixie-dev-public/oss-licenses/${release_tag}.json"
6460
if [[ "${release}" == "true" ]]; then
6561
upload_artifact_to_mirrors "cloud" "latest" "${all_licenses_path}" "licenses.json"
66-
gsutil cp "${all_licenses_path}" "gs://pixie-dev-public/oss-licenses/latest.json"
6762
fi
6863

6964
# Write YAMLs + image paths to a tar file to support easy deployment.

0 commit comments

Comments
 (0)