Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treefmt: enable actionlint, fix issues #716

Merged
merged 2 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/cluster_recreate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
creds: ${{ secrets.CONTRAST_CI_INFRA_AZURE }}
- name: Cleanup .azure dir
run: |
rm $HOME/.azure/{commandIndex.json,versionCheck.json}
rm "$HOME/.azure/{commandIndex.json,versionCheck.json}"
- name: Destroy existing CI cluster
continue-on-error: true
run: |
Expand All @@ -40,6 +40,6 @@ jobs:
echo "SYNC_IP=$SYNC_IP" | tee -a "$GITHUB_ENV"
- name: Create fifo
run: |
fifoUUID=$(curl -fsSL http://$SYNC_IP:8080/fifo/new | jq -r '.uuid')
fifoUUID=$(curl -fsSL "http://$SYNC_IP:8080/fifo/new" | jq -r '.uuid')
echo "Fifo UUID: $fifoUUID"
kubectl create configmap sync-server-fifo --from-literal=uuid=$fifoUUID
kubectl create configmap sync-server-fifo "--from-literal=uuid=$fifoUUID"
6 changes: 3 additions & 3 deletions .github/workflows/e2e_openssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ jobs:
- name: Set sync environemnt
run: |
sync_ip=$(kubectl get svc sync -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo "SYNC_ENDPOINT=http://$sync_ip:8080" | tee -a $GITHUB_ENV
echo "SYNC_ENDPOINT=http://$sync_ip:8080" | tee -a "$GITHUB_ENV"
sync_uuid=$(kubectl get configmap sync-server-fifo -o jsonpath='{.data.uuid}')
echo "SYNC_FIFO_UUID=$sync_uuid" | tee -a $GITHUB_ENV
echo "SYNC_FIFO_UUID=$sync_uuid" | tee -a "$GITHUB_ENV"
- name: Build and prepare deployments
run: |
just coordinator initializer openssl port-forwarder node-installer
Expand All @@ -69,4 +69,4 @@ jobs:
- name: Cleanup
if: cancelled() && !inputs.skip-undeploy
run: |
kubectl delete ns $(cat workspace/e2e.namespace) --timeout 5m
kubectl delete ns "$(cat workspace/e2e.namespace)" --timeout 5m
6 changes: 3 additions & 3 deletions .github/workflows/e2e_policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ jobs:
- name: Set sync environemnt
run: |
sync_ip=$(kubectl get svc sync -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo "SYNC_ENDPOINT=http://$sync_ip:8080" | tee -a $GITHUB_ENV
echo "SYNC_ENDPOINT=http://$sync_ip:8080" | tee -a "$GITHUB_ENV"
sync_uuid=$(kubectl get configmap sync-server-fifo -o jsonpath='{.data.uuid}')
echo "SYNC_FIFO_UUID=$sync_uuid" | tee -a $GITHUB_ENV
echo "SYNC_FIFO_UUID=$sync_uuid" | tee -a "$GITHUB_ENV"
- name: Build and prepare deployments
run: |
just coordinator initializer openssl port-forwarder node-installer
Expand All @@ -69,4 +69,4 @@ jobs:
- name: Undeploy
if: always() && inputs.skip-undeploy != 'true'
run: |
kubectl delete ns $(cat workspace/e2e.namespace) --timeout 5m
kubectl delete ns "$(cat workspace/e2e.namespace)" --timeout 5m
2 changes: 1 addition & 1 deletion .github/workflows/e2e_regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ jobs:
- name: Cleanup
if: cancelled() && !inputs.skip-undeploy
run: |
kubectl delete ns $(cat workspace/e2e.namespace) --timeout 5m
kubectl delete ns "$(cat workspace/e2e.namespace)" --timeout 5m
5 changes: 3 additions & 2 deletions .github/workflows/e2e_runtime-reproducibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ jobs:
- uses: ./.github/actions/setup_nix
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
cachixToken: "" # Don't use the cachix cache
Freax13 marked this conversation as resolved.
Show resolved Hide resolved
- uses: nicknovitski/nix-develop@a2060d116a50b36dfab02280af558e73ab52427d # v1.1.0
- name: Build
id: build
run: |
nix build .#${{ matrix.build-target }} --option substituters https://cache.nixos.org --builders ""
reference_checksum="$(cat result/index.json | jq -r '.manifests[0].digest')"
reference_checksum="$(jq -r '.manifests[0].digest' result/index.json)"
Comment on lines -35 to +36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

echo "reference-checksum-${{ matrix.os }}-${{ matrix.build-target}}=$reference_checksum" >> "$GITHUB_OUTPUT"

nix build .#${{ matrix.build-target }} --rebuild --option substituters https://cache.nixos.org --builders "" -o rebuild
rebuild_checksum="$(cat rebuild/index.json | jq -r '.manifests[0].digest')"
rebuild_checksum="$(jq -r '.manifests[0].digest' rebuild/index.json)"
echo "rebuild-checksum-${{ matrix.os }}-${{ matrix.build-target}}=$rebuild_checksum" >> "$GITHUB_OUTPUT"
- name: Upload Build Artifacts
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e_servicemesh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ jobs:
- name: Set sync environemnt
run: |
sync_ip=$(kubectl get svc sync -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo "SYNC_ENDPOINT=http://$sync_ip:8080" | tee -a $GITHUB_ENV
echo "SYNC_ENDPOINT=http://$sync_ip:8080" | tee -a "$GITHUB_ENV"
sync_uuid=$(kubectl get configmap sync-server-fifo -o jsonpath='{.data.uuid}')
echo "SYNC_FIFO_UUID=$sync_uuid" | tee -a $GITHUB_ENV
echo "SYNC_FIFO_UUID=$sync_uuid" | tee -a "$GITHUB_ENV"
- name: Build and prepare deployments
run: |
just coordinator initializer port-forwarder service-mesh-proxy node-installer
Expand All @@ -69,4 +69,4 @@ jobs:
- name: Cleanup
if: cancelled() && !inputs.skip-undeploy
run: |
kubectl delete ns $(cat workspace/e2e.namespace) --timeout 5m
kubectl delete ns "$(cat workspace/e2e.namespace)" --timeout 5m
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,12 @@ jobs:
echo "serviceMeshImgTagged=$(tag "$serviceMeshImg")" | tee -a "$GITHUB_ENV"
- name: Create file with image replacements
run: |
echo "ghcr.io/edgelesssys/contrast/coordinator:latest=$coordinatorImgTagged" > image-replacements.txt
echo "ghcr.io/edgelesssys/contrast/initializer:latest=$initializerImgTagged" >> image-replacements.txt
echo "ghcr.io/edgelesssys/contrast/service-mesh-proxy:latest=$serviceMeshImgTagged" >> image-replacements.txt
echo "ghcr.io/edgelesssys/contrast/node-installer-microsoft:latest=$nodeInstallerImgTagged" >> image-replacements.txt
{
echo "ghcr.io/edgelesssys/contrast/coordinator:latest=$coordinatorImgTagged"
echo "ghcr.io/edgelesssys/contrast/initializer:latest=$initializerImgTagged"
echo "ghcr.io/edgelesssys/contrast/service-mesh-proxy:latest=$serviceMeshImgTagged"
echo "ghcr.io/edgelesssys/contrast/node-installer-microsoft:latest=$nodeInstallerImgTagged"
} > image-replacements.txt
- name: Upload image replacements file (for main branch PR)
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
Expand Down
1 change: 1 addition & 0 deletions treefmt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
projectRootFile = "flake.nix";
programs = {
# keep-sorted start block=true
actionlint.enable = true;
deadnix.enable = true;
formatjson5 = {
enable = true;
Expand Down