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

fix(fairwindsops): add nova, polaris and pluto #13

Merged
merged 1 commit into from
Sep 3, 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
31 changes: 31 additions & 0 deletions fairwindsops/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# FairwindsOps

## nova ([releases](https://github.com/FairwindsOps/nova/releases))

```yaml
ownbrew:
packages:
- name: nova
tap: foomo/tap/fairwindsops/nova
version: 3.10.1
```

## pluto ([releases](https://github.com/FairwindsOps/pluto/releases))

```yaml
ownbrew:
packages:
- name: pluto
tap: foomo/tap/fairwindsops/pluto
version: 5.20.2
```

## polaris ([releases](https://github.com/FairwindsOps/polaris/releases))

```yaml
ownbrew:
packages:
- name: polaris
tap: foomo/tap/fairwindsops/polaris
version: 9.2.1
```
47 changes: 47 additions & 0 deletions fairwindsops/nova.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

set -e

# colors
CRed='\033[1;31m'
CGray='\033[0;37m'
CGreen='\033[1;32m'
CYellow='\033[1;33m'
NC='\033[0m'

# logging
info() {
echo -e "${CGray}${1}${NC}"
}

warn() {
echo -e "${CYellow}${1}${NC}"
}

error() {
echo -e "${CRed}${1}${NC}"
}

success() {
echo -e "${CGreen}${1}${NC}"
}

# vars
os="${os:-${1}}"
arch="${arch:-${2}}"
version="${version:-${3}}"

info "downloading ..."
curl -fL "https://github.com/FairwindsOps/nova/releases/download/v${version}/nova_${version}_${os}_${arch}.tar.gz" -o "${TEMP_DIR}/nova.tar.gz"
curl -fL "https://github.com/FairwindsOps/nova/releases/download/v${version}/checksums.txt" -o "${TEMP_DIR}/nova.tar.gz.sha256"

info "validating ..."
echo "$(cat "${TEMP_DIR}/nova.tar.gz.sha256" | grep "nova_${version}_${os}_${arch}.tar.gz" | awk '{print $1;}') ${TEMP_DIR}/nova.tar.gz" | shasum -a 256 --check --quiet

info "extracting ..."
tar -xzvf "${TEMP_DIR}/nova.tar.gz" -C "${TEMP_DIR}" nova
mv -f "${TEMP_DIR}/nova" "${BIN_DIR}/nova-${version}-${os}-${arch}"
chmod a+x "${BIN_DIR}/nova-${version}-${os}-${arch}"

info "cleanup ..."
rm "${TEMP_DIR}/nova.tar.gz" "${TEMP_DIR}/nova.tar.gz.sha256"
5 changes: 5 additions & 0 deletions fairwindsops/nova_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

source .include/test.sh

test "$(dirname $0)/nova.sh" "3.10.1"
47 changes: 47 additions & 0 deletions fairwindsops/pluto.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

set -e

# colors
CRed='\033[1;31m'
CGray='\033[0;37m'
CGreen='\033[1;32m'
CYellow='\033[1;33m'
NC='\033[0m'

# logging
info() {
echo -e "${CGray}${1}${NC}"
}

warn() {
echo -e "${CYellow}${1}${NC}"
}

error() {
echo -e "${CRed}${1}${NC}"
}

success() {
echo -e "${CGreen}${1}${NC}"
}

# vars
os="${os:-${1}}"
arch="${arch:-${2}}"
version="${version:-${3}}"

info "downloading ..."
curl -fL "https://github.com/FairwindsOps/pluto/releases/download/v${version}/pluto_${version}_${os}_${arch}.tar.gz" -o "${TEMP_DIR}/pluto.tar.gz"
curl -fL "https://github.com/FairwindsOps/pluto/releases/download/v${version}/checksums.txt" -o "${TEMP_DIR}/pluto.tar.gz.sha256"

info "validating ..."
echo "$(cat "${TEMP_DIR}/pluto.tar.gz.sha256" | grep "pluto_${version}_${os}_${arch}.tar.gz" | awk '{print $1;}') ${TEMP_DIR}/pluto.tar.gz" | shasum -a 256 --check --quiet

info "extracting ..."
tar -xzvf "${TEMP_DIR}/pluto.tar.gz" -C "${TEMP_DIR}" pluto
mv -f "${TEMP_DIR}/pluto" "${BIN_DIR}/pluto-${version}-${os}-${arch}"
chmod a+x "${BIN_DIR}/pluto-${version}-${os}-${arch}"

info "cleanup ..."
rm "${TEMP_DIR}/pluto.tar.gz" "${TEMP_DIR}/pluto.tar.gz.sha256"
5 changes: 5 additions & 0 deletions fairwindsops/pluto_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

source .include/test.sh

test "$(dirname $0)/pluto.sh" "5.20.2"
47 changes: 47 additions & 0 deletions fairwindsops/polaris.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

set -e

# colors
CRed='\033[1;31m'
CGray='\033[0;37m'
CGreen='\033[1;32m'
CYellow='\033[1;33m'
NC='\033[0m'

# logging
info() {
echo -e "${CGray}${1}${NC}"
}

warn() {
echo -e "${CYellow}${1}${NC}"
}

error() {
echo -e "${CRed}${1}${NC}"
}

success() {
echo -e "${CGreen}${1}${NC}"
}

# vars
os="${os:-${1}}"
arch="${arch:-${2}}"
version="${version:-${3}}"

info "downloading ..."
curl -fL "https://github.com/FairwindsOps/polaris/releases/download/${version}/polaris_${os}_${arch}.tar.gz" -o "${TEMP_DIR}/polaris.tar.gz"
curl -fL "https://github.com/FairwindsOps/polaris/releases/download/${version}/checksums.txt" -o "${TEMP_DIR}/polaris.tar.gz.sha256"

info "validating ..."
echo "$(cat "${TEMP_DIR}/polaris.tar.gz.sha256" | grep "polaris_${os}_${arch}.tar.gz" | awk '{print $1;}') ${TEMP_DIR}/polaris.tar.gz" | shasum -a 256 --check --quiet

info "extracting ..."
tar -xzvf "${TEMP_DIR}/polaris.tar.gz" -C "${TEMP_DIR}" polaris
mv -f "${TEMP_DIR}/polaris" "${BIN_DIR}/polaris-${version}-${os}-${arch}"
chmod a+x "${BIN_DIR}/polaris-${version}-${os}-${arch}"

info "cleanup ..."
rm "${TEMP_DIR}/polaris.tar.gz" "${TEMP_DIR}/polaris.tar.gz.sha256"
5 changes: 5 additions & 0 deletions fairwindsops/polaris_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

source .include/test.sh

test "$(dirname $0)/polaris.sh" "9.2.1"
11 changes: 11 additions & 0 deletions sigstore/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# sigstore

## cosign ([releases](https://github.com/sigstore/cosign/releases))

```yaml
ownbrew:
packages:
- name: cosign
tap: foomo/tap/sigstore/cosign
version: 2.4.0
```
38 changes: 38 additions & 0 deletions sigstore/cosign.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

set -e

# colors
CRed='\033[1;31m'
CGray='\033[0;37m'
CGreen='\033[1;32m'
CYellow='\033[1;33m'
NC='\033[0m'

# logging
info() {
echo -e "${CGray}${1}${NC}"
}

warn() {
echo -e "${CYellow}${1}${NC}"
}

error() {
echo -e "${CRed}${1}${NC}"
}

success() {
echo -e "${CGreen}${1}${NC}"
}

# vars
os="${os:-${1}}"
arch="${arch:-${2}}"
version="${version:-${3}}"

info "downloading ..."
curl -fL "https://github.com/sigstore/cosign/releases/download/v${version}/cosign-${os}-${arch}" -o "${BIN_DIR}/cosign-${version}-${os}-${arch}"

info "extracting ..."
chmod a+x "${BIN_DIR}/cosign-${version}-${os}-${arch}"
5 changes: 5 additions & 0 deletions sigstore/cosign_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

source .include/test.sh

test "$(dirname $0)/cosign.sh" "2.4.0"
Loading