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

*DRAFT** ci: Revert linux deploy changes #2139

Closed
wants to merge 6 commits into from
Closed
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
1 change: 0 additions & 1 deletion .github/workflows/all_solutions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,6 @@ jobs:
name: deploy-artifacts
path: |
${{ github.workspace }}\build\BuildArtifacts
${{ github.workspace }}\deploy
if-no-files-found: error

# This job is necessary in order for us to have a branch protection rule for tests with a matrix
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/deploy_agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ jobs:
path: ${{ github.workspace }}/build/BuildArtifacts
if-no-files-found: error

- name: Upload Deploy Tooling Locally
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: deploy-tooling
path: ${{ github.workspace }}/deploy/
if-no-files-found: error

deploy-downloadsite:
needs: get-external-artifacts
if: ${{ github.event.inputs.downloadsite == 'true' }}
Expand Down Expand Up @@ -262,19 +255,18 @@ jobs:
sudo apt-get update -y
sudo apt-get install -y dos2unix
shell: bash


- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Download Deploy Artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: deploy-artifacts
path: ${{ github.workspace }}/

- name: Download Deploy Tooling
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: deploy-tooling
path: ${{ github.workspace }}/deploy

- name: Get GPG Key
id: write_gpgkey
run: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/post_deploy_agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ on:
description: 'Agent Version to validate. Needs to match the version from the Release Workflow (all_solutions.yml). Format: X.X.X'
required: true
type: string
external_call:
type: boolean
default: true
required: false
workflow_call:
inputs:
agent_version:
description: 'Agent Version to validate. Needs to match the version from the Release Workflow (all_solutions.yml). Format: X.X.X'
required: true
type: string

external_call:
type: boolean
default: true
required: false

permissions:
contents: read
packages: read
Expand All @@ -37,7 +37,7 @@ jobs:
disable-sudo: false
egress-policy: audit
- name: Wait for APT to update
if: ${{ github.event.inputs.external_call }} # only wait if this workflow was called by another workflow
if: ${{ github.event.inputs.external_call == 'true' }} # only wait if this workflow was called by another workflow
run: |
echo "Sleeping 5 minutes to wait for apt to update itself"
sleep 300
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
fetch-depth: 0

- name: Wait for YUM to update
if: ${{ github.event.inputs.external_call }} # only wait if this workflow was called by another workflow
if: ${{ github.event.inputs.external_call == 'true'}} # only wait if this workflow was called by another workflow
run: |
echo "Sleeping 5 minutes to wait for yum to update itself"
sleep 300
Expand Down
39 changes: 7 additions & 32 deletions .github/workflows/publish_release_notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,7 @@ env:
DOTNET_NOLOGO: true

jobs:

get-external-artifacts:
name: Get and Publish Deploy Artifacts Locally
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
disable-sudo: true
egress-policy: audit

- name: Download Deploy Artifacts
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2.28.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: all_solutions.yml
run_id: ${{ github.event.inputs.run_id }}
name: deploy-artifacts
path: ${{ github.workspace }}
repo: ${{ github.repository }}

- name: Upload Deploy Artifacts Locally
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: deploy-artifacts
path: ${{ github.workspace }}/build/BuildArtifacts
if-no-files-found: error

publish-release-notes:
needs: get-external-artifacts
name: Create and Publish Release Notes
runs-on: ubuntu-latest
steps:
Expand All @@ -74,10 +45,14 @@ jobs:
fetch-depth: 0

- name: Download Deploy Artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2.28.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: all_solutions.yml
run_id: ${{ github.event.inputs.run_id }}
name: deploy-artifacts
path: ${{ github.workspace }}/artifacts
path: ${{ github.workspace }}/deploy-artifacts
repo: ${{ github.repository }}

- name: Set Docs PR Branch Name
run: |
Expand All @@ -97,7 +72,7 @@ jobs:
BUILD_PATH: ${{ github.workspace }}/build/ReleaseNotesBuilder/ReleaseNotesBuilder.csproj
RUN_PATH: ${{ github.workspace }}/build/ReleaseNotesBuilder/bin/Release/net7.0/
CHANGELOG: ${{ github.workspace }}/src/Agent/CHANGELOG.md
CHECKSUMS: ${{ github.workspace }}/artifacts/DownloadSite/SHA256/checksums.md
CHECKSUMS: ${{ github.workspace }}/deploy-artifacts/build/BuildArtifacts/DownloadSite/SHA256/checksums.md
OUTPUT_PATH: ${{ github.workspace }}

- name: Create branch
Expand Down
4 changes: 2 additions & 2 deletions deploy/linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM debian:stable-20231120@sha256:6a798ffaa39776765d80c63afffc5920d09f8003b1b7d6a24026527d826c8de7
FROM debian:buster-20230703-slim@sha256:cddb688e1263b9752275b064171ef6ac9c70ae21a77c774339aecfb53690b9a1

RUN apt-get update && apt-get install -y \
apt-utils \
dpkg-dev \
createrepo-c \
createrepo \
awscli \
curl \
dos2unix \
Expand Down
2 changes: 1 addition & 1 deletion deploy/linux/deploy_scripts/deploy-packages.bash
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fi
export TARGET='production' # this is just a string used in local paths for repository data pulled down from S3 and then pushed back up

# Make sure we have all the external tools we need
for CMD in apt-ftparchive gpg createrepo_c curl rsync; do
for CMD in apt-ftparchive gpg createrepo curl rsync; do
if ! command -v $CMD > /dev/null; then
die 'command not found:' $CMD
fi
Expand Down
2 changes: 1 addition & 1 deletion deploy/linux/deploy_scripts/libexec/repoman-rebuild.bash
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ rebuild_yum() {

printf \\n
if [[ -d "$REPO_DIR" ]]; then
createrepo_c --update --checksum sha "$REPO_DIR"
createrepo --update --checksum sha "$REPO_DIR"
fi
done
}
Expand Down
2 changes: 1 addition & 1 deletion deploy/linux/deploy_scripts/puppet/manifests/site.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}

# YUM repo mgmt
package { "createrepo-c":
package { "createrepo":
ensure => installed
}

Expand Down
Loading