Skip to content

Commit

Permalink
Merge branch 'main' into BRE-101-Remove-dept-devops-from-CODEOWNERS
Browse files Browse the repository at this point in the history
  • Loading branch information
michalchecinski authored Oct 14, 2024
2 parents b60a0a6 + d094901 commit 82bd6a6
Show file tree
Hide file tree
Showing 554 changed files with 15,726 additions and 9,121 deletions.
8 changes: 4 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ insert_final_newline = true
indent_style = space
indent_size = 2

[*.{ts}]
quote_type = single
[*.ts]
quote_type = double

[*.{rs}]
[*.rs]
indent_style = space
indent_size = 4

[*.{kt,java,xml,gradle}]
indent_style = space
indent_size = 4

[*.{xml}]
[*.xml]
# VS Code XML extension removes the final newline
insert_final_newline = false
9 changes: 9 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@
.github/workflows/publish-rust-crates.yml @bitwarden/dept-bre
.github/workflows/release-cpp.yml @bitwarden/dept-bre
.github/workflows/publish-dotnet.yml @bitwarden/dept-bre

# Secrets Manager team
crates/bitwarden-sm @bitwarden/team-secrets-manager-dev
crates/bws @bitwarden/team-secrets-manager-dev

# BRE Automations
crates/bws/Cargo.toml
crates/bws/scripts/install.ps1
crates/bws/scripts/install.sh
4 changes: 0 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

<!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. -->

## 📸 Screenshots

<!-- Required for any UI changes; delete if not applicable. Use fixed width images for better display. -->

## ⏰ Reminders before review

- Contributor guidelines followed
Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
- target: i686-linux-android
steps:
- name: Checkout repo
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Install rust
uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a # stable
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
with:
toolchain: stable

Expand All @@ -46,7 +46,7 @@ jobs:
run: cross build -p bitwarden-uniffi --release --target=${{ matrix.settings.target }}

- name: Upload artifact
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: android-${{ matrix.settings.target }}
path: ./target/${{ matrix.settings.target }}/release/libbitwarden_uniffi.so
Expand All @@ -57,20 +57,20 @@ jobs:
needs: build
steps:
- name: Checkout repo (PR)
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
if: github.event_name == 'pull_request'
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}

- name: Checkout repo (Push)
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
if: github.event_name == 'push'
with:
fetch-depth: 0

- name: Install rust
uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a # stable
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
with:
toolchain: stable

Expand All @@ -80,13 +80,13 @@ jobs:
key: cargo-combine-cache

- name: Setup Java
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
with:
distribution: temurin
java-version: 17

- name: Download Artifacts
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8

- name: Move artifacts
working-directory: languages/kotlin/sdk/src/main/jniLibs
Expand All @@ -101,10 +101,11 @@ jobs:
working-directory: languages/kotlin
run: ./build-schemas.sh

- name: Setup gradle
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0

- name: Publish
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
with:
arguments: sdk:publish
build-root-directory: languages/kotlin
run: ./gradlew sdk:publish
working-directory: languages/kotlin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 8 additions & 22 deletions .github/workflows/build-cli-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
push:
branches:
- "main"
- "rc"
- "hotfix-rc"
workflow_dispatch:
pull_request:

Expand All @@ -19,29 +17,23 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Check Branch to Publish
env:
PUBLISH_BRANCHES: "master,rc,hotfix-rc"
id: publish-branch-check
run: |
REF=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
IFS="," read -a publish_branches <<< $PUBLISH_BRANCHES
if [[ "${publish_branches[*]}" =~ "${REF}" ]]; then
if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
echo "is_publish_branch=true" >> $GITHUB_ENV
else
echo "is_publish_branch=false" >> $GITHUB_ENV
fi
########## Set up Docker ##########
- name: Set up QEMU emulators
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1

########## Login to Docker registries ##########
- name: Login to Azure - Prod Subscription
Expand Down Expand Up @@ -77,10 +69,8 @@ jobs:
run: |
REF=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
IMAGE_TAG=$(echo "${REF}" | sed "s#/#-#g") # slash safe branch name
if [[ "${IMAGE_TAG}" == "master" ]]; then
if [[ "${IMAGE_TAG}" == "main" ]]; then
IMAGE_TAG=dev
elif [[ ("${IMAGE_TAG}" == "rc") || ("${IMAGE_TAG}" == "hotfix-rc") ]]; then
IMAGE_TAG=rc
fi
echo "image_tag=${IMAGE_TAG}" >> $GITHUB_OUTPUT
Expand All @@ -89,16 +79,15 @@ jobs:
id: tag-list
env:
IMAGE_TAG: ${{ steps.tag.outputs.image_tag }}
IS_PUBLISH_BRANCH: ${{ env.is_publish_branch }}
run: |
if [[ ("${IMAGE_TAG}" == "dev" || "${IMAGE_TAG}" == "rc") && "${IS_PUBLISH_BRANCH}" == "true" ]]; then
if [[ "${IMAGE_TAG}" == "dev" ]]; then
echo "tags=$_AZ_REGISTRY/bws:${IMAGE_TAG},bitwarden/bws:${IMAGE_TAG}" >> $GITHUB_OUTPUT
else
echo "tags=$_AZ_REGISTRY/bws:${IMAGE_TAG}" >> $GITHUB_OUTPUT
fi
- name: Build and push Docker image
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
uses: docker/build-push-action@32945a339266b759abcbdc89316275140b0fc960 # v6.8.0
with:
context: .
file: crates/bws/Dockerfile
Expand All @@ -123,10 +112,7 @@ jobs:
needs: build-docker
steps:
- name: Check if any job failed
if: |
github.ref == 'refs/heads/master'
|| github.ref == 'refs/heads/rc'
|| github.ref == 'refs/heads/hotfix-rc'
if: github.ref == 'refs/heads/main'
env:
BUILD_DOCKER_STATUS: ${{ needs.build-docker.result }}
run: |
Expand Down
Loading

0 comments on commit 82bd6a6

Please sign in to comment.