From 84bd328695fda671ef87322b3eca79755c10ebc4 Mon Sep 17 00:00:00 2001 From: Luca Guerra Date: Wed, 15 Dec 2021 10:54:18 +0000 Subject: [PATCH] update release --- .github/workflows/release-final.yaml | 10 +++++----- scripts/release/release_deb.sh | 8 ++++---- scripts/release/release_rpm.sh | 10 ++++------ scripts/release/release_tgz.sh | 6 +++--- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release-final.yaml b/.github/workflows/release-final.yaml index 497c29cb3e..174cc07de7 100644 --- a/.github/workflows/release-final.yaml +++ b/.github/workflows/release-final.yaml @@ -16,8 +16,8 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} - name: Login to Github Packages uses: docker/login-action@v1 @@ -43,7 +43,7 @@ jobs: REPOSITORY_NAME: stable REPOSITORY_DIR: rpm_repo PACKAGES_DIR: packages - S3_BUCKET_NAME: lucag-test-personal + S3_BUCKET: lucag-test-personal RELEASE: ${{ github.event.release.name }} # These permissions are needed to interact with GitHub's OIDC Token endpoint. @@ -101,7 +101,7 @@ jobs: REPOSITORY_DIR: deb_repo PACKAGES_DIR: packages RELEASE: ${{ github.event.release.name }} - S3_BUCKET_NAME: lucag-test-personal + S3_BUCKET: lucag-test-personal KEY_ID: DCC6C4EF6455E261 # change this to EC51E8C4 later # These permissions are needed to interact with GitHub's OIDC Token endpoint. @@ -156,7 +156,7 @@ jobs: REPOSITORY_DIR: tgz_repo PACKAGES_DIR: packages RELEASE: ${{ github.event.release.name }} - S3_BUCKET_NAME: lucag-test-personal + S3_BUCKET: lucag-test-personal # These permissions are needed to interact with GitHub's OIDC Token endpoint. permissions: diff --git a/scripts/release/release_deb.sh b/scripts/release/release_deb.sh index d525941017..103faddf30 100755 --- a/scripts/release/release_deb.sh +++ b/scripts/release/release_deb.sh @@ -7,14 +7,14 @@ echo "DEB_BASEARCH: $DEB_BASEARCH" # e.g. amd64 echo "REPOSITORY_NAME: $REPOSITORY_NAME" echo "PACKAGES_DIR: $PACKAGES_DIR" echo "SCRIPTS_DIR: $SCRIPTS_DIR" -echo "S3_BUCKET_NAME: $S3_BUCKET_NAME" +echo "S3_BUCKET: $S3_BUCKET" KEY_ID="$KEY_ID" # only check that it is set DEB_REPOSITORY_DIR=$REPOSITORY_DIR/deb/ mkdir -p $REPOSITORY_DIR/deb/stable-$DEB_BASEARCH -aws s3 sync s3://$S3_BUCKET_NAME/$REPOSITORY_NAME/deb/stable-$DEB_BASEARCH/ $REPOSITORY_DIR/deb/stable-$DEB_BASEARCH/ --exact-timestamps --acl public-read # --delete +aws s3 sync s3://$S3_BUCKET/$REPOSITORY_NAME/deb/stable-$DEB_BASEARCH/ $REPOSITORY_DIR/deb/stable-$DEB_BASEARCH/ --exact-timestamps --acl public-read # --delete # ls -1tdr $REPOSITORY_DIR/deb/stable-$DEB_BASEARCH/*sysdig* | head -n -5 | xargs -d '\n' rm -f || true cp $PACKAGES_DIR/*deb $REPOSITORY_DIR/deb/stable-$DEB_BASEARCH @@ -52,5 +52,5 @@ cd - sed -e s/_REPOSITORY_/$REPOSITORY_NAME/g < $SCRIPTS_DIR/draios.list > $REPOSITORY_DIR/deb/draios.list -aws s3 cp $REPOSITORY_DIR/deb/draios.list s3://$S3_BUCKET_NAME/$REPOSITORY_NAME/deb/ --acl public-read -aws s3 sync $REPOSITORY_DIR/deb/stable-$DEB_BASEARCH/ s3://$S3_BUCKET_NAME/$REPOSITORY_NAME/deb/stable-$DEB_BASEARCH/ --exact-timestamps --acl public-read # --delete +aws s3 cp $REPOSITORY_DIR/deb/draios.list s3://$S3_BUCKET/$REPOSITORY_NAME/deb/ --acl public-read +aws s3 sync $REPOSITORY_DIR/deb/stable-$DEB_BASEARCH/ s3://$S3_BUCKET/$REPOSITORY_NAME/deb/stable-$DEB_BASEARCH/ --exact-timestamps --acl public-read --delete diff --git a/scripts/release/release_rpm.sh b/scripts/release/release_rpm.sh index 3aecd2bdda..41110dc9f3 100755 --- a/scripts/release/release_rpm.sh +++ b/scripts/release/release_rpm.sh @@ -8,13 +8,11 @@ echo "RPM_BASEARCH: $RPM_BASEARCH" echo "REPOSITORY_NAME: $REPOSITORY_NAME" echo "PACKAGES_DIR: $PACKAGES_DIR" echo "SCRIPTS_DIR: $SCRIPTS_DIR" -echo "S3_BUCKET_NAME: $S3_BUCKET_NAME" +echo "S3_BUCKET: $S3_BUCKET" mkdir -p $REPOSITORY_DIR/rpm/$RPM_BASEARCH -# NOTE: the ACLs for public reading are removed until we use a test private bucket. Will need to be enabled for production - -aws s3 sync s3://$S3_BUCKET_NAME/$REPOSITORY_NAME/rpm/$RPM_BASEARCH/ $REPOSITORY_DIR/rpm/$RPM_BASEARCH/ --exact-timestamps --acl public-read # --delete +aws s3 sync s3://$S3_BUCKET/$REPOSITORY_NAME/rpm/$RPM_BASEARCH/ $REPOSITORY_DIR/rpm/$RPM_BASEARCH/ --exact-timestamps --acl public-read # --delete # ls -1tdr $REPOSITORY_DIR/rpm/$RPM_BASEARCH/*sysdig*.rpm | head -n -5 | xargs -d '\n' rm -f || true cp $PACKAGES_DIR/*rpm $REPOSITORY_DIR/rpm/$RPM_BASEARCH @@ -23,5 +21,5 @@ createrepo $REPOSITORY_DIR/rpm/$RPM_BASEARCH cp $SCRIPTS_DIR/draios.repo $REPOSITORY_DIR/rpm sed -i s/_REPOSITORY_/$REPOSITORY_NAME/g $REPOSITORY_DIR/rpm/draios.repo -aws s3 cp $REPOSITORY_DIR/rpm/draios.repo s3://$S3_BUCKET_NAME/$REPOSITORY_NAME/rpm/ --acl public-read # --delete -aws s3 sync $REPOSITORY_DIR/rpm/$RPM_BASEARCH/ s3://$S3_BUCKET_NAME/$REPOSITORY_NAME/rpm/$RPM_BASEARCH/ --exact-timestamps --acl public-read # --delete +aws s3 cp $REPOSITORY_DIR/rpm/draios.repo s3://$S3_BUCKET/$REPOSITORY_NAME/rpm/ --acl public-read # --delete +aws s3 sync $REPOSITORY_DIR/rpm/$RPM_BASEARCH/ s3://$S3_BUCKET/$REPOSITORY_NAME/rpm/$RPM_BASEARCH/ --exact-timestamps --acl public-read --delete diff --git a/scripts/release/release_tgz.sh b/scripts/release/release_tgz.sh index dea9dbccc1..1d0ff14985 100755 --- a/scripts/release/release_tgz.sh +++ b/scripts/release/release_tgz.sh @@ -5,13 +5,13 @@ set -euxo pipefail echo "REPOSITORY_DIR: $REPOSITORY_DIR" echo "BASEARCH: $BASEARCH" echo "REPOSITORY_NAME: $REPOSITORY_NAME" -echo "S3_BUCKET_NAME: $S3_BUCKET_NAME" +echo "S3_BUCKET: $S3_BUCKET" echo "PACKAGES_DIR: $PACKAGES_DIR" mkdir -p $REPOSITORY_DIR/tgz/$BASEARCH -aws s3 sync s3://$S3_BUCKET_NAME/$REPOSITORY_NAME/tgz/$BASEARCH/ $REPOSITORY_DIR/tgz/$BASEARCH/ --exact-timestamps --acl public-read # --delete +aws s3 sync s3://$S3_BUCKET/$REPOSITORY_NAME/tgz/$BASEARCH/ $REPOSITORY_DIR/tgz/$BASEARCH/ --exact-timestamps --acl public-read # --delete # ls -1tdr $REPOSITORY_DIR/tgz/$BASEARCH/*sysdig* | head -n -5 | xargs -d '\n' rm -f || true cp $PACKAGES_DIR/*tar.gz $REPOSITORY_DIR/tgz/$BASEARCH -aws s3 sync $REPOSITORY_DIR/tgz/$BASEARCH/ s3://$S3_BUCKET_NAME/$REPOSITORY_NAME/tgz/$BASEARCH --exact-timestamps --acl public-read # --delete +aws s3 sync $REPOSITORY_DIR/tgz/$BASEARCH/ s3://$S3_BUCKET/$REPOSITORY_NAME/tgz/$BASEARCH --exact-timestamps --acl public-read --delete