Skip to content

Commit

Permalink
Merge pull request #390 from stackhpc/yoga-xena-merge
Browse files Browse the repository at this point in the history
yoga: xena merge
  • Loading branch information
markgoddard authored Feb 13, 2023
2 parents 4f34623 + 9370bd0 commit 6b7c047
Show file tree
Hide file tree
Showing 9 changed files with 283 additions and 16 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/stackhpc-all-in-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ jobs:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
KAYOBE_IMAGE: ${{ inputs.kayobe_image }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

- name: Install terraform
uses: hashicorp/setup-terraform@v1
uses: hashicorp/setup-terraform@v2

- name: Initialise terraform
run: terraform init
Expand Down Expand Up @@ -167,16 +167,14 @@ jobs:
ENABLE_OVN: ${{ inputs.neutron_plugin == 'ovn' }}
OS_DISTRIBUTION: ${{ inputs.os_distribution }}

# https://renehernandez.io/snippets/multiline-strings-as-a-job-output-in-github-actions/
# Use a heredoc to define a multiline string output
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
- name: Set SSH key output
id: ssh_key
run: |
ssh_key="$(cat terraform/aio/id_rsa)"
ssh_key="${ssh_key//'%'/'%25'}"
ssh_key="${ssh_key//$'\n'/'%0A'}"
ssh_key="${ssh_key//$'\r'/'%0D'}"
echo "::add-mask::$ssh_key"
echo "::set-output name=ssh_key::$ssh_key"
echo "ssh_key<<EOF" >> $GITHUB_OUTPUT
cat terraform/aio/id_rsa >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
- name: Pull latest Kayobe image
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/stackhpc-build-kayobe-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout kayobe config
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/stackhpc-container-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,15 @@ jobs:
# stackhpc-release-train repository.
- name: Trigger container image repository sync
run: |
filter='${{ inputs.regexes }}'
if [[ -n $filter ]] && [[ ${{ github.event.inputs.seed }} == 'true' ]]; then
filter="$filter bifrost"
fi
gh workflow run \
container-sync.yml \
--repo stackhpc/stackhpc-release-train \
--ref main
--ref main \
-f filter="$filter"
env:
GITHUB_TOKEN: ${{ secrets.STACKHPC_RELEASE_TRAIN_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stackhpc-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
fetch-depth: 0
- name: Setup Python ${{ matrix.python-version }} 🐍
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Tox 📦
Expand Down
10 changes: 10 additions & 0 deletions etc/kayobe/containers/pulp/post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,13 @@
register: pulp_manager_result
failed_when:
- "'Successfully set password' not in pulp_manager_result.stdout"

- name: Manage Pulp content checksums
become: true
command: >-
docker exec -u root pulp
bash -c
'pulpcore-manager handle-artifact-checksums'
when:
- stackhpc_pulp_sync_for_local_container_build | bool
- pulp_settings.changed
3 changes: 2 additions & 1 deletion etc/kayobe/containers/pulp/pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
dest: /opt/kayobe/containers/pulp/settings.py
mode: 0644
become: true
register: pulp_settings

- name: Configure TLS for local Pulp
when: pulp_enable_tls | bool
Expand All @@ -33,7 +34,7 @@
template:
src: "{{ item.src }}"
dest: "/opt/kayobe/containers/pulp/certs/{{ item.dest }}"
mode: 0644
mode: 0600
become: true
loop:
- src: "{{ pulp_cert_path }}"
Expand Down
4 changes: 4 additions & 0 deletions etc/kayobe/containers/pulp/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
ANSIBLE_API_HOSTNAME='{{ pulp_url }}'
ANSIBLE_CONTENT_HOSTNAME='{{ pulp_url }}/pulp/content'
TOKEN_AUTH_DISABLED=True
{% if stackhpc_pulp_sync_for_local_container_build | bool %}
ALLOWED_CONTENT_CHECKSUMS = ["sha1", "sha224", "sha256", "sha384", "sha512"]
{% endif %}

Loading

0 comments on commit 6b7c047

Please sign in to comment.