-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always build landing-page container from sources & remove Dockerfile.local. Update vsix and the package-lock of the node/monitor package. Add paths to run the service tests. Make sure last next tag points to release. Create reuseable workflow for manually publishing demo applications. Set Node version to 16.14.0 instead of 16.x. Improve README. Contributed on behalf of STMicroelectronics
- Loading branch information
Showing
13 changed files
with
192 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Publish Demos CI | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
publish_type: | ||
description: "Which build to trigger" | ||
required: true | ||
default: "next" | ||
type: choice | ||
options: | ||
- next | ||
- latest | ||
publish_theia_cloud_demo: | ||
description: "Should theia-cloud-demo be published" | ||
type: boolean | ||
required: true | ||
publish_theia_cloud_activity_demo_theia: | ||
description: "Should theia-cloud-activity-demo-theia be published" | ||
type: boolean | ||
required: true | ||
publish_theia_cloud_activity_demo: | ||
description: "Should theia-cloud-activity-demo be published" | ||
type: boolean | ||
required: true | ||
|
||
jobs: | ||
publish-theia-cloud-demo: | ||
if: ${{ inputs.publish_theia_cloud_demo }} == true | ||
uses: ./.github/workflows/reusable-demo.yml | ||
with: | ||
docker_org: theiacloud | ||
docker_image: theia-cloud-demo | ||
docker_file: demo/dockerfiles/demo-theia-docker/Dockerfile | ||
publish_type: ${{ inputs.publish_type }} | ||
secrets: | ||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
publish-theia-cloud-activity-demo-theia: | ||
if: ${{ inputs.publish_theia_cloud_activity_demo_theia }} == true | ||
uses: ./.github/workflows/reusable-demo.yml | ||
with: | ||
docker_org: theiacloud | ||
docker_image: theia-cloud-activity-demo-theia | ||
docker_file: demo/dockerfiles/demo-theia-monitor-theia/Dockerfile | ||
publish_type: ${{ inputs.publish_type }} | ||
secrets: | ||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
publish-theia-cloud-activity-demo: | ||
if: ${{ inputs.publish_theia_cloud_activity_demo }} == true | ||
uses: ./.github/workflows/reusable-demo.yml | ||
with: | ||
docker_org: theiacloud | ||
docker_image: theia-cloud-activity-demo | ||
docker_file: demo/dockerfiles/demo-theia-monitor-vscode/Dockerfile | ||
publish_type: ${{ inputs.publish_type }} | ||
secrets: | ||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Reusable workflow publishing demo applications | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
docker_org: | ||
required: true | ||
type: string | ||
docker_image: | ||
required: true | ||
type: string | ||
docker_file: | ||
required: true | ||
type: string | ||
publish_type: | ||
description: "Pubish as latest ('latest') or next ('next')" | ||
required: true | ||
type: string | ||
secrets: | ||
dockerhub_username: | ||
required: true | ||
dockerhub_token: | ||
required: true | ||
|
||
env: | ||
VERSION: 0.9.0-next | ||
|
||
jobs: | ||
publish-next: | ||
runs-on: ubuntu-latest | ||
if: ${{ inputs.publish_type }} == 'next' | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Create docker tags | ||
id: get_tags | ||
run: | | ||
echo "sha_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:${{ env.VERSION }}.$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT | ||
echo "version_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:${{ env.VERSION }}" >> $GITHUB_OUTPUT | ||
- name: Build Docker image | ||
run: docker build -t ${{ steps.get_tags.outputs.version_tag }} -f ${{ inputs.docker_file }} . | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.dockerhub_username }} | ||
password: ${{ secrets.dockerhub_token }} | ||
|
||
# Push version and SHA tag for main pushes of next versions (This avoids duplicate pushes for release commits on main) | ||
- name: Push version and SHA tag | ||
if: endsWith(env.VERSION, '-next') | ||
run: | | ||
docker push ${{ steps.get_tags.outputs.version_tag }} | ||
docker tag ${{ steps.get_tags.outputs.version_tag }} ${{ steps.get_tags.outputs.sha_tag }} | ||
docker push ${{ steps.get_tags.outputs.sha_tag }} | ||
publish-latest: | ||
runs-on: ubuntu-latest | ||
if: ${{ inputs.publish_type }} == 'latest' | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Create docker tags | ||
id: get_tags | ||
run: | | ||
echo "version_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:${{ env.VERSION }}" >> $GITHUB_OUTPUT | ||
echo "next_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:${{ env.VERSION }}-next" >> $GITHUB_OUTPUT | ||
echo "latest_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:latest" >> $GITHUB_OUTPUT | ||
- name: Build Docker image | ||
run: docker build -t ${{ steps.get_tags.outputs.version_tag }} -f ${{ inputs.docker_file }} . | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.dockerhub_username }} | ||
password: ${{ secrets.dockerhub_token }} | ||
|
||
# Push version, next and latest tag for releases (version should be valid semver) | ||
- name: Push version and latest tag | ||
run: | | ||
docker push ${{ steps.get_tags.outputs.version_tag }} | ||
docker tag ${{ steps.get_tags.outputs.version_tag }} ${{ steps.get_tags.outputs.latest_tag }} | ||
docker push ${{ steps.get_tags.outputs.latest_tag }} | ||
docker tag ${{ steps.get_tags.outputs.version_tag }} ${{ steps.get_tags.outputs.next_tag }} | ||
docker push ${{ steps.get_tags.outputs.next_tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
FROM theiacloud/theia-cloud-demo:0.9.0-next as production-stage | ||
|
||
COPY --chown=theia:theia theiacloud-monitor-0.9.0.vsix /home/theia/applications/browser/plugins | ||
COPY --chown=theia:theia theiacloud-monitor-0.9.0-next.vsix /home/theia/applications/browser/plugins |
Binary file removed
BIN
-281 KB
demo/dockerfiles/demo-theia-monitor-vscode/theiacloud-monitor-0.8.1.vsix
Binary file not shown.
Binary file added
BIN
+281 KB
demo/dockerfiles/demo-theia-monitor-vscode/theiacloud-monitor-0.9.0-next.vsix
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
# This docker file build uses the local common package | ||
|
||
# build stage | ||
FROM node:16-alpine as build-stage | ||
WORKDIR /app | ||
COPY node/common/src ./common/src | ||
COPY node/common/package.json node/common/tsconfig.json ./common/ | ||
COPY node/configs ./configs/ | ||
COPY node/tsconfig.json node/package*.json ./ | ||
COPY node/landing-page/. ./landing-page/ | ||
RUN npm ci | ||
|
||
RUN npm ci && npm run build -w common | ||
|
||
RUN npm run build:nolint -w landing-page | ||
|
||
# production stage | ||
FROM nginx:stable-alpine as production-stage | ||
COPY --from=build-stage /app/dist /usr/share/nginx/html | ||
COPY --from=build-stage /app/landing-page/dist /usr/share/nginx/html | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] | ||
CMD ["nginx", "-g", "daemon off;"] |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.