Skip to content

provide worker profiles to join command #1283

provide worker profiles to join command

provide worker profiles to join command #1283

Workflow file for this run

name: Pull request
on:
- pull_request
jobs:
sanitize:
name: Sanitize
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21.0"
- name: Go vet
run: |
make vet
- name: Lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.54
tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21.0"
- name: Go vet
run: |
make vet
- name: Unit tests
run: |
make unit-tests
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get short commit hash
run: echo "SHORT_SHA=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21.0"
- name: Build Linux AMD64
run: |
make embedded-cluster-linux-amd64 VERSION=dev-$SHORT_SHA
./output/bin/embedded-cluster version metadata > metadata.json
- name: Install Replicated CLI
run: |
curl -s https://api.github.com/repos/replicatedhq/replicated/releases/latest \
| grep "browser_download_url.*linux_amd64.tar.gz" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -O replicated.tar.gz -qi -
tar xf replicated.tar.gz replicated && rm replicated.tar.gz
mv replicated /usr/local/bin/replicated
- name: Create CI Releases
env:
REPLICATED_APP: "embedded-cluster-smoke-test-staging-app"
REPLICATED_API_TOKEN: ${{ secrets.STAGING_REPLICATED_API_TOKEN }}
REPLICATED_API_ORIGIN: "https://api.staging.replicated.com/vendor"
run: |
export SHORT_SHA=$(git rev-parse --short=7 HEAD)
echo "${SHORT_SHA}"
sed -i "s/__version_string__/${SHORT_SHA}/g" e2e/kots-release-install/cluster-config.yaml
sed -i "s/__version_string__/${SHORT_SHA}-upgrade/g" e2e/kots-release-upgrade/cluster-config.yaml
replicated release create --yaml-dir e2e/kots-release-install --promote CI --version "${SHORT_SHA}"
replicated release create --yaml-dir e2e/kots-release-upgrade --promote CI --version "${SHORT_SHA}-upgrade"
- name: Build CI binary
run: |
export SHORT_SHA=$(git rev-parse --short=7 HEAD)
echo "# channel release object" > e2e/kots-release-install/release.yaml
echo 'channelID: "2cHXb1RCttzpR0xvnNWyaZCgDBP"' >> e2e/kots-release-install/release.yaml
echo 'appSlug: "embedded-cluster-smoke-test-staging-app"' >> e2e/kots-release-install/release.yaml
echo "versionLabel: \"${SHORT_SHA}\"" >> e2e/kots-release-install/release.yaml
cat e2e/kots-release-install/release.yaml
cp output/bin/embedded-cluster output/bin/embedded-cluster-original
make embedded-release # this is done after the metadata.json is generated so as to not include additional charts
- name: Cache files for integration test
env:
S3_BUCKET: "tf-staging-embedded-cluster-bin"
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_SECRET }}
AWS_REGION: "us-east-1"
run: |
export SHORT_SHA=$(git rev-parse --short=7 HEAD)
export EC_VERSION="v${SHORT_SHA}"
./scripts/cache-files.sh
./scripts/create-upgrade-release.sh
- name: upload binary
uses: actions/upload-artifact@v4
with:
name: embedded-release
path: |
output/bin/embedded-cluster
output/bin/embedded-cluster-original
output/bin/embedded-cluster-release-builder
e2e:
runs-on: ubuntu-latest
needs:
- build
strategy:
fail-fast: false
matrix:
tests:
- TestSingleNodeInstallation
- TestSingleNodeInstallationRockyLinux8
- TestSingleNodeInstallationDebian12
- TestSingleNodeInstallationCentos8Stream
- TestVersion
- TestHostPreflight
- TestUnsupportedOverrides
- TestMultiNodeInstallation
- TestMultiNodeReset
- TestCommandsRequireSudo
- TestInstallWithoutEmbed
- TestResetAndReinstall
- TestCollectSupportBundle
steps:
- name: Checkout
uses: actions/checkout@v4
- name: download binary
uses: actions/download-artifact@v4
with:
name: embedded-release
path: output/bin
- uses: ./.github/actions/e2e
with:
test-name: '${{ matrix.tests }}'
license-id: ${{ secrets.STAGING_EMBEDDED_CLUSTER_LICENSE_ID }}
license: ${{ secrets.STAGING_EMBEDDED_CLUSTER_LICENSE }}