skills / deploy-to-azure Goto Github PK
View Code? Open in Web Editor NEWCreate two deployment workflows using GitHub Actions and Microsoft Azure.
License: MIT License
Create two deployment workflows using GitHub Actions and Microsoft Azure.
License: MIT License
We now have a designated discussion area for each course! ๐
This means all of our course links need to be updated to point to the correct discussion page.
There are two places in each course where discussions are referenced
These two files will have a link to https://github.com/orgs/skills/discussions
that will need to be replaced with the link for the course specific discussion. You can find those links here, in the left menu section. Copy the link to the discussion category for this course and replace it in those two files.
Be sure to link your PR to this issue for review.
The environment should use 'with' not 'env' from line 84 to line 100. I kept facing this issue wondering why environment variables weren't being set
Prereq: On Mac
I changed the lines 84 - 100 for 'env' -> 'with' in 2-setup-azure-environment.yml and it resolved the issue.
In Step 5: Deploy to a production environment based on labels, when running the deploy-prod.yml
workflow, the npm install and build webpack step from build job emits several warnings of deprecation and vulnerabilities for the dependencies of the webpack used in the exercise.
deploy-prod.yml
workflow will be triggerednpm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm WARN deprecated [email protected]: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)added 1680 packages, and audited 1681 packages in 13s
47 packages are looking for funding
runnpm fund
for details12 vulnerabilities (1 low, 3 moderate, 8 high)
To address issues that do not require attention, run:
npm audit fixTo address all issues (including breaking changes), run:
npm audit fix --forceRun
npm audit
for details.
Reference of the latest commit from this repository in which I did my exercise: 02e588b
A change we recently accepted removed the creation of a secret called AZURE_CREDENTIALS
. That secret is still utilized in one of the workflows we ask the learner to create:
deploy-to-azure/.github/steps/3-spinup-environment.md
Lines 64 to 67 in ae0c3ff
In 5-deploy-to-prod-environment.md
it says Step 5: Deploy to a production environment based on labels
.
In X-finish.md
it says Deploy to a production environment based on labels
.
However the exercises never deployed to production based on labels. It was based on push to main in
.github/workflows/deploy-prod.yml
name: Deploy to production
on:
push:
branches:
- main
Descriptions may have been outdated.
# This will run after the "Configure Azure environment" workflow
# completes on the azure-configuration branch
# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
on:
workflow_dispatch:
workflow_run:
workflows: ["Deploy to staging"]
types: [completed]
branches: [staging-test]
Should be
This will run after the "Deploy to staging" workflow
and completes on the staging-test branch
A clear and concise description of what the bug is, and what you expected to happen.
Please include screenshots.
Add any other context about the problem here.
Proposing we update the course name to "Deploy to Azure" to be more beginner-friendly.
A bash script in the /scripts directory does not have permission to be run from the workflow on creation of the repo
Run ./.github/script/initialize-repository.sh --dry-run=false
/home/runner/work/_temp/16d9e30a-ec25-477a-bff6-b69b72279dcc.sh: line 1: ./.github/script/initialize-repository.sh: Permission denied
https://github.com/larmitage-bjss/deploy-to-azure/actions/runs/7491800267/job/20393860444
Error while executing the spinup-destroy.yml workflow
Happens consistently.
Run az appservice plan create --resource-group cd-with-actions --name actions-ttt-deployment --is-linux --sku F1 --subscription ***
WARNING: Resource provider 'Microsoft.Web' used by this operation is not registered. We are registering for you.
WARNING: Registration succeeded.
ERROR: This region has quota of 0 instances for your subscription. Try selecting different region or SKU.
Error: Process completed with exit code 1.
Describe the bug
In the detail panel Finish of the readme.md of the course is a call for feedback:
What's next?
We'd love to hear what you thought of this course.
The 'skills/continuous-delivery-azure' repository doesn't contain the 'TBD-feedback-link' path in 'main'.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The link should lead to the github skills evaluation page or https://github.com/skills/.github/discussions
Device information
Describe the bug
Workflow "Check step 2, Set up the Azure environment" fails at the job. Create azure-configuration pull request
with a error:
pull request create failed: GraphQL: Head sha can't be blank, Base sha can't be blank, No commits between main and azure-configuration, Head ref must be a branch (createPullRequest)
Error: Process completed with exit code 1.
To Reproduce
Steps to reproduce the behavior:
Follow Readme.md guide at the step 2.16 commit checks will fail and you will not be able to proceed the course.
Additional context
at this step workflow should create a PR from azure-configuration branch which is currently missing in the this template
Describe the bug
Redme.md Step missing for Activity 1: Add triggers to production deployment workflow after steps 6.
To Reproduce
Please read the instructions and it will jump to the end and lack of information to complete the task.
Expected behavior
Some more intermediate steps with instruction.
I used a workaround from #39 (comment), by adding
- uses: actions/setup-node@v3
with:
node-version: 16
after both checkout actions.
However, since the step has already updated to 5, my new PR (with a commit adding node 16) will not get automatically squash merged by run: gh pr merge --squash staging-test
because below check fails since now is step 5
if: >-
${{ !github.event.repository.is_template
&& needs.get_current_step.outputs.current_step == 4 }}
The following will not run too. Not sure why this script wants to Merge main into each branch, since throughout the exercises, after run: gh pr merge --squash
, only main
branch is meaningful and the others are left hanging useless.
run: |
chmod +x ./.github/script/initialize-repository.sh
./.github/script/initialize-repository.sh
Step 5 actions also cannot complete because of same issue
Describe the bug
Workflow step state is non-0
It appears that previous development on the template did not revert https://github.com/skills/continuous-delivery-azure/blob/main/.github/script/STEP back to 0
Invalid YAML for multi-line conditional
Using all of the examples above, this is invalid syntax for block YAML use cases.
Instead of:
if: ${{ github.repository_owner != 'TBD-organization'
&& needs.get_current_step.outputs.current_step == 6 }}
One of the following forms must be used:
Single line
if: ${{ github.repository_owner != 'TBD-organization' && needs.get_current_step.outputs.current_step == 6 }}
Multi line block
if: |
${{ github.repository_owner != 'TBD-organization'
&& needs.get_current_step.outputs.current_step == 6 }}
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Device information
Additional context
Add any other context about the problem here.
Describe the bug
Building the image with action fails, changed to specific Node v16 and seemed to run.
Under Step 2: Set up Azure environment > Activity 1, the command within the following step:
Produces the following warning:
Option '--sdk-auth' has been deprecated and will be removed in a future release.
Step 3, Activity 1, subheading "Configuring your Azure environment" instructs to review the new workflow file spinup-destroy.yml
in azure-configuration
branch. However, I cannot see neither the file nor the branch being mentioned.
Follow the lab manual to the section indicated at Describe the bug section of this issue.
I am expeting to see both the file and the branch being mentioned at Describe the bug section of this issue.
(no relevant screenshot; left empty intentionally)
The issue isn't related to the device I am using.
A clear and concise description of what the problem is, and what you solution you want.
What changes this feature would introduce. Any risks these changes involve. Any alternative solutions or features you've considered.
Add any other context or screenshots about the feature request here.
Describe the bug
This script is missing and fails the action run.
The course asks users to add a label that doesn't already exist, so they have to create it themselves.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.