Skip to content

Commit

Permalink
Merge pull request #7223 from freedomofpress/stg-gha-staging
Browse files Browse the repository at this point in the history
Migrate staging job to GitHub Actions; remove CircleCI
  • Loading branch information
legoktm authored Aug 15, 2024
2 parents 8387df8 + d0a3d79 commit bf83ffc
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 206 deletions.
161 changes: 0 additions & 161 deletions .circleci/config.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Staging
on:
push:
branches:
- 'stg-*'
- 'release/*'
schedule:
- cron: '0 3 * * *'

jobs:
staging:
runs-on: ubuntu-latest
env:
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
steps:
- uses: actions/checkout@v4
- name: Run staging tests on GCE
run: |
make ci-go
- name: Teardown (if needed)
if: always()
run: |
make ci-teardown || true
6 changes: 3 additions & 3 deletions devops/gce-nested/ci-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

# If these scripts are run on developer workstations, the CI env
# vars populated by CircleCI won't be present; make a sane default.
if [ -z "${CIRCLE_BUILD_NUM:-}" ]; then
export CIRCLE_BUILD_NUM="${USER}"
if [ -z "${GITHUB_RUN_ID:-}" ]; then
export GITHUB_RUN_ID="${USER}"
fi

# Set common vars we'll need throughout the CI scripts.
TOPLEVEL="$(git rev-parse --show-toplevel)"
export TOPLEVEL
GCE_CREDS_FILE="${TOPLEVEL}/.gce.creds"
export GCE_CREDS_FILE
export BUILD_NUM="${CIRCLE_BUILD_NUM}"
export BUILD_NUM="${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
export PROJECT_ID="securedrop-ci"
export JOB_NAME="sd-ci-nested"
export GCLOUD_MACHINE_TYPE="c2-standard-8"
Expand Down
1 change: 1 addition & 0 deletions devops/gce-nested/gce-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function create_sd_ci_gce_instance() {
--metadata "ssh-keys=${SSH_USER_NAME}:$(cat $SSH_PUBKEY)"

# Give box a few more seconds for SSH to become available
echo "Sleeping for 20s to wait for SSH to become available"
sleep 20
fi
}
Expand Down
2 changes: 1 addition & 1 deletion devops/gce-nested/gce-stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ TOPLEVEL="$(git rev-parse --show-toplevel)"
. "${TOPLEVEL}/devops/gce-nested/ci-env.sh"

# Destroy remote instance
gcloud_call --quiet compute instances delete "${JOB_NAME}-${BUILD_NUM}"
gcloud_call compute instances delete "${JOB_NAME}-${BUILD_NUM}"
41 changes: 0 additions & 41 deletions devops/scripts/rebase-ci.sh

This file was deleted.

0 comments on commit bf83ffc

Please sign in to comment.