Skip to content

Commit

Permalink
update release
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaGuerra committed Dec 15, 2021
1 parent ce43040 commit 84bd328
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release-final.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions scripts/release/release_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
10 changes: 4 additions & 6 deletions scripts/release/release_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
6 changes: 3 additions & 3 deletions scripts/release/release_tgz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 84bd328

Please sign in to comment.