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

Release 0.79.0 #1557

Merged
merged 7 commits into from
Nov 2, 2022
Merged
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
9 changes: 9 additions & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Release Notes
=============

Version 0.79.0
--------------

- Management Command for Renaming Files on S3 (#1538)
- Bump nokogiri from 1.13.6 to 1.13.9 in /docs (#1537)
- ocw hugo themes sentry dsn added (#1548)
- Use registry-image in concourse pipelines (#1553)
- name offline site zip with short_id instead of name (#1546)

Version 0.78.3 (Released November 01, 2022)
--------------

Expand Down
4 changes: 4 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,10 @@
"YT_UPLOAD_LIMIT": {
"description": "Max Youtube uploads allowed per day",
"required": false
},
"OCW_HUGO_THEMES_SENTRY_DSN": {
"description": "The sentry DSN that will be used in ocw-hugo-themes",
"required": false
}
},
"keywords": [
Expand Down
8 changes: 8 additions & 0 deletions content_sync/pipelines/concourse.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,10 @@ def upsert_pipeline(self): # pylint:disable=too-many-locals
f" --endpoint-url {DEV_ENDPOINT_URL}" if is_dev() else "",
)
.replace("((resource-base-url))", resource_base_url or "")
.replace(
"((ocw-hugo-themes-sentry-dsn))",
settings.OCW_HUGO_THEMES_SENTRY_DSN or "",
)
)
self.upsert_config(config_str, pipeline_name)

Expand Down Expand Up @@ -669,6 +673,10 @@ def upsert_pipeline(self): # pylint:disable=too-many-locals
and self.PROJECTS_BRANCH == settings.GITHUB_WEBHOOK_BRANCH
),
)
.replace(
"((ocw-hugo-themes-sentry-dsn))",
settings.OCW_HUGO_THEMES_SENTRY_DSN or "",
)
)
self.upsert_config(config_str, self.PIPELINE_NAME)

Expand Down
27 changes: 14 additions & 13 deletions content_sync/pipelines/definitions/concourse/mass-build-sites.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
resource_types:
- name: http-resource
type: docker-image
type: registry-image
source:
repository: jgriff/http-resource
tag: latest
- name: s3-resource-iam
type: docker-image
type: registry-image
source:
repository: governmentpaas/s3-resource
tag: latest
Expand Down Expand Up @@ -37,7 +37,7 @@ resources:
task-config: &webhook-config
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: curlimages/curl}
# END ONLINE-ONLY
jobs:
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
config:
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: mitodl/ocw-course-publisher, tag: 0.3}
inputs:
- name: ocw-hugo-themes
Expand All @@ -91,7 +91,7 @@ jobs:
config:
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: bash, tag: latest}
outputs:
- name: publishable_sites
Expand All @@ -113,6 +113,7 @@ jobs:
GIT_KEY: ((git-private-key-var))
SITEMAP_DOMAIN: ((sitemap-domain))
PREFIX: ((prefix))
SENTRY_DSN: ((ocw-hugo-themes-sentry-dsn))
# START DEV-ONLY
AWS_ACCESS_KEY_ID: ((minio-root-user))
AWS_SECRET_ACCESS_KEY: ((minio-root-password))
Expand All @@ -121,7 +122,7 @@ jobs:
config:
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: mitodl/ocw-course-publisher, tag: 0.3}
inputs:
- name: publishable_sites
Expand All @@ -140,7 +141,7 @@ jobs:
if [[ "$GIT_KEY" != "" ]]
then
echo $GIT_KEY > $CURDIR/git.key
sed -i -E "s/(-----BEGIN[^-]+-----)(.+)(-----END[^-]+-----)/-----BEGINSSHKEY-----\2\-----ENDSSHKEY-----/" git.key
sed -i -E "s/(-----BEGIN[^-]+-----)(.+)(-----END[^-]+-----)/-----BEGINSSHKEY-----\2\-----ENDSSHKEY-----/" git.key
sed -i -E "s/\s/\n/g" git.key
sed -i -E "s/SSHKEY/ OPENSSH PRIVATE KEY/g" git.key
chmod 400 $CURDIR/git.key
Expand Down Expand Up @@ -207,14 +208,14 @@ jobs:
echo "STARTING S3 SYNC FOR $NAME" > /dev/tty
# START OFFLINE-ONLY
cd $CURDIR/$SHORT_ID/public
zip $NAME.zip -r ./
PUBLISH_S3_RESULT=$(aws s3((cli-endpoint-url)) sync ./ s3://((ocw-bucket))$PREFIX/$BASE_URL --exclude="*" --include="$NAME.zip" --metadata site-id=$NAME --only-show-errors) || PUBLISH_S3_RESULT=1
zip $SHORT_ID.zip -r ./
PUBLISH_S3_RESULT=$(aws s3((cli-endpoint-url)) sync ./ s3://((ocw-bucket))$PREFIX/$BASE_URL --exclude="*" --include="$SHORT_ID.zip" --metadata site-id=$NAME --only-show-errors) || PUBLISH_S3_RESULT=1
if [[ $PUBLISH_S3_RESULT == 1 ]]
then
echo "SYNCING $NAME.zip to s3://((ocw-bucket))$PREFIX/$SITE_URL failed for $NAME" > /dev/tty
echo "SYNCING $SHORT_ID.zip to s3://((ocw-bucket))$PREFIX/$SITE_URL failed for $NAME" > /dev/tty
return 1
fi
rm $NAME.zip
rm $SHORT_ID.zip
cd $CURDIR
# END OFFLINE-ONLY
# START ONLINE-ONLY
Expand Down Expand Up @@ -271,7 +272,7 @@ jobs:
config:
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: curlimages/curl}
run:
path: curl
Expand All @@ -285,4 +286,4 @@ jobs:
- 'Fastly-Soft-Purge: 1'
- https://api.fastly.com/service/((fastly_((version)).service_id))/purge_all
# END NON-DEV
# END ONLINE-ONLY
# END ONLINE-ONLY
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
resource_types:
- name: http-resource
type: docker-image
type: registry-image
source:
repository: jgriff/http-resource
tag: latest
- name: s3-resource-iam
type: docker-image
type: registry-image
source:
repository: governmentpaas/s3-resource
tag: latest
task-config: &webhook-config
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: curlimages/curl}
jobs:
- name: remove-unpublished-sites
Expand All @@ -25,7 +25,7 @@ jobs:
config:
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: bash, tag: latest}
outputs:
- name: unpublishable_sites
Expand All @@ -51,7 +51,7 @@ jobs:
config:
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: curlimages/curl}
run:
path: curl
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
config:
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: amazon/aws-cli, tag: latest}
run:
path: sh
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
config:
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: curlimages/curl}
run:
path: curl
Expand Down
21 changes: 11 additions & 10 deletions content_sync/pipelines/definitions/concourse/site-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
resource_types:
- name: http-resource
type: docker-image
type: registry-image
source:
repository: jgriff/http-resource
tag: latest
- name: s3-resource-iam
type: docker-image
type: registry-image
source:
repository: governmentpaas/s3-resource
tag: latest
# START NON-DEV
- name: slack-alert
type: docker-image
type: registry-image
source:
repository: arbourd/concourse-slack-alert-resource
tag: v0.15.0
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
"version": "((pipeline_name))",
"status": "errored"
}
# START NON-DEV
# START NON-DEV
- put: slack-webhook
timeout: 1m
params:
Expand All @@ -119,7 +119,7 @@ jobs:
"version": "((pipeline_name))",
"status": "errored"
}
# START NON-DEV
# START NON-DEV
- put: slack-webhook
timeout: 1m
params:
Expand All @@ -137,7 +137,7 @@ jobs:
"version": "((pipeline_name))",
"status": "aborted"
}
# START NON-DEV
# START NON-DEV
- put: slack-webhook
timeout: 1m
params:
Expand Down Expand Up @@ -327,13 +327,14 @@ jobs:
STATIC_API_BASE_URL: ((static-api-base-url))
OCW_IMPORT_STARTER_SLUG: ((ocw-import-starter-slug))
SITEMAP_DOMAIN: ((sitemap-domain))
SENTRY_DSN: ((ocw-hugo-themes-sentry-dsn))
# START DEV-ONLY
RESOURCE_BASE_URL: ((resource-base-url))
# END DEV-ONLY
config:
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: mitodl/ocw-course-publisher, tag: 0.3}
inputs:
- name: ocw-hugo-themes
Expand Down Expand Up @@ -419,14 +420,14 @@ jobs:
- name: course-markdown
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: amazon/aws-cli, tag: latest}
run:
path: sh
args:
- -exc
- |
aws s3((cli-endpoint-url)) sync s3://((ocw-studio-bucket))/((s3-path)) s3://((ocw-bucket))/((site-url)) --metadata site-id=((site-name))
aws s3((cli-endpoint-url)) sync s3://((ocw-studio-bucket))/((s3-path)) s3://((ocw-bucket))/((site-url)) --metadata site-id=((site-name))
aws s3((cli-endpoint-url)) sync course-markdown/public s3://((ocw-bucket))/((base-url)) --metadata site-id=((site-name))
# START DEV-ONLY
on_success:
Expand Down Expand Up @@ -506,7 +507,7 @@ jobs:
config:
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: curlimages/curl}
run:
path: curl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
config:
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: mitodl/ocw-course-publisher, tag: 0.3}
inputs:
- name: ocw-hugo-themes
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ((minio-root-password))
# END DEV-ONLY
image_resource:
type: docker-image
type: registry-image
source: {repository: amazon/aws-cli, tag: latest}
run:
path: sh
Expand All @@ -64,7 +64,7 @@ jobs:
config:
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: curlimages/curl}
run:
path: curl
Expand All @@ -81,7 +81,7 @@ jobs:
config:
platform: linux
image_resource:
type: docker-image
type: registry-image
source: {repository: curlimages/curl}
run:
path: curl
Expand All @@ -92,4 +92,4 @@ jobs:
- -H
- 'Fastly-Key: ((fastly_live.api_token))'((purge_header))
- https://api.fastly.com/service/((fastly_live.service_id))/purge/ocw-hugo-themes
# END NON-DEV
# END NON-DEV
Loading