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

T345689 build three versions plain #478

Merged
merged 37 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e31ad40
feat: build three versions
rti Sep 21, 2023
377d270
chore: skip version test for now
rti Sep 21, 2023
d272f88
fix: rm mv
rti Sep 22, 2023
17772e7
fix: typo
rti Sep 22, 2023
56fd203
fix: prerelease env var
rti Sep 25, 2023
b819863
fix: github token parameter error
rti Sep 25, 2023
baf710d
chore: rename input
rti Sep 25, 2023
e211ca1
fix: description
rti Sep 25, 2023
8108d4c
fix: metadata glob
rti Sep 25, 2023
57d10c9
fix: do not always skip version test
rti Sep 25, 2023
cd4f0d7
feat: test knows about channels
rti Sep 26, 2023
9c1daf7
Merge branch 'main' into T345689-build-three-versions-plain
rti Sep 26, 2023
119f3d9
Merge branch 'main' into T345689-build-three-versions-plain
rti Sep 26, 2023
661c4db
chore: try flatten dirs in .github
rti Sep 27, 2023
d190109
Merge remote-tracking branch 'origin/main' into T345689-build-three-v…
rti Sep 27, 2023
8f9fabd
fix: date format in env files
rti Sep 27, 2023
5c8abca
Revert "chore: try flatten dirs in .github"
rti Sep 27, 2023
de25115
docs: make test CHANNEL
rti Sep 27, 2023
c5ccab2
fix: test-all with channel
rti Sep 27, 2023
533ef89
docs: update
rti Sep 28, 2023
14d6651
Merge remote-tracking branch 'origin/main' into T345689-build-three-v…
rti Sep 28, 2023
1447cc1
Merge branch 'main' into T345689-build-three-versions-plain
rti Sep 28, 2023
59ee30e
docs(README): fix build command instructions
rti Oct 9, 2023
bbd6312
docs(flake/shellHook): fix build command instructions
rti Oct 9, 2023
9699c3b
Merge remote-tracking branch 'origin/main' into T345689-build-three-v…
rti Oct 9, 2023
4427626
Merge remote-tracking branch 'origin/main' into T345689-build-three-v…
rti Oct 31, 2023
79c1332
chore: remove merged in wmde12 meta data
rti Oct 31, 2023
c36ab12
chore: remove channels, build one version only
rti Oct 31, 2023
d11b27e
chore: remove TO_VERSION
rti Oct 31, 2023
1d8d681
fix: version test
rti Oct 31, 2023
dc7fba0
fix: type annotation
rti Oct 31, 2023
41ba1f5
Merge branch 'main' into T345689-build-three-versions-plain
rti Oct 31, 2023
96713c9
chore: add versions contents to variables.env
rti Nov 1, 2023
4b21840
chore: bump mediawiki to 1.40.1
rti Nov 1, 2023
4e4bd74
chore: remove versions.env
rti Nov 1, 2023
a8be767
chore: remove semver env vars
rti Nov 1, 2023
74ca22b
fix: metadata step
rti Nov 1, 2023
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
56 changes: 56 additions & 0 deletions .github/actions/prep-env-and-cache/action.yml
adeeri marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: 'checkout-and-prepare'
description: 'Prepare our github actions environment'

inputs:
env_file:
description: 'the env file used for defining the environment'
required: true

runs:
using: "composite"
steps:
- name: Print the env from variables.env
run: cat variables.env
shell: bash

- name: Set the env from variables.env
uses: c-py/action-dotenv-to-setenv@v4
with:
env-file: variables.env

- name: Print the current env
run: cat ${{ inputs.env_file }}
shell: bash

- name: Set the env from ${{ inputs.env_file }}
uses: c-py/action-dotenv-to-setenv@v4
with:
env-file: ${{ inputs.env_file }}

# https://phabricator.wikimedia.org/T346882
- name: Cache composer files
id: cache-composer
uses: actions/cache@v3
env:
cache-name: cache-wikibase-composer
with:
path: cache
key: cache-wikibase-composer

- shell: bash
run: |
echo "Composer Cache Hit: ${{ steps.cache-composer.outputs.cache-hit }}"

- name: Cache files in git_cache
id: cache-git
uses: actions/cache@v3
env:
cache-name: cache-wikibase-git-repo
with:
path: git_cache
key: cache-wikibase-git-repo

- shell: bash
run: |
echo "Git Cache Hit: ${{ steps.cache-git.outputs.cache-hit }}"

67 changes: 33 additions & 34 deletions .github/actions/scan-image/action.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
name: 'scan-docker'
description: 'Scan image and upload results'
name: "scan-image"
description: "Scan image and upload results"
inputs:
image_tag:
description: 'tag to give to latest image'
required: true
image_name:
description: 'name of the docker image to work with'
description: "name of the docker image to work with"
required: true

runs:
using: "composite"

steps:
- uses: anchore/scan-action@v3
id: scan
with:
acs-report-enable: true
severity-cutoff: critical
fail-build: false
image: ${{ inputs.image_name }}:${{ inputs.image_tag }}
- uses: anchore/scan-action@v3
id: scan
with:
severity-cutoff: critical
fail-build: false
image: ${{ inputs.image_name }}

# As this step depends on github.event.pull_request it never ran until https://github.com/wmde/wikibase-release-pipeline/pull/317 was done
# So disable it in that PR and fix it in a followup...
# uploads it to the ui
# - uses: github/codeql-action/upload-sarif@v1
# if: |
# github.actor != 'dependabot[bot]' &&
# (github.event.pull_request.head.repo.full_name == github.repository)
# with:
# sarif_file: ${{ steps.scan.outputs.sarif }}
# As this step depends on github.event.pull_request it never
# ran until https://github.com/wmde/wikibase-release-pipeline/pull/317 was done
# So disable it in that PR and fix it in a followup...
# uploads it to the ui
# - uses: github/codeql-action/upload-sarif@v1
# if: |
# github.actor != 'dependabot[bot]' &&
# (github.event.pull_request.head.repo.full_name == github.repository)
# with:
# sarif_file: ${{ steps.scan.outputs.sarif }}

# output to terminal and move to non-conflicting name
- name: Inspect action SARIF report
shell: bash
run: |
cat ${{ steps.scan.outputs.sarif }}
mv ${{ steps.scan.outputs.sarif }} /tmp/${{ inputs.image_name }}.sarif
- name: Inspect action SARIF report
shell: bash
run: |
cat ${{ steps.scan.outputs.sarif }}
mkdir -p /tmp/sarif-reports
cp ${{ steps.scan.outputs.sarif }} /tmp/sarif-reports/${{ inputs.image_name }}.sarif

- name: Archive docker production artifacts
uses: actions/upload-artifact@v2
with:
name: ScanArtifacts
if-no-files-found: error
path: /tmp/${{ inputs.image_name }}.sarif
- name: Archive scan artifacts
uses: actions/upload-artifact@v3
with:
name: ScanResults
if-no-files-found: error
path: /tmp/sarif-reports/${{ inputs.image_name }}.sarif
31 changes: 31 additions & 0 deletions .github/actions/upload-results/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "checkout-and-prepare"
description: "Upload build results as artifacts"

inputs:
component:
description: "the name of the built artifact"
required: true

runs:
using: "composite"
steps:
- name: Archive build_metadata Artifacts (if any)
uses: actions/upload-artifact@v3
with:
name: Metadata
path: artifacts/build_metadata_*.env
if-no-files-found: ignore

- name: Archive tar artifacts (if any)
uses: actions/upload-artifact@v3
with:
name: TarBalls
path: artifacts/${{ inputs.component }}.tar.gz
if-no-files-found: ignore

- name: Archive Docker artifact
uses: actions/upload-artifact@v3
with:
name: DockerImages
path: artifacts/${{ inputs.component }}.docker.tar.gz
if-no-files-found: error
Loading