CodeDeploy overwrites Directories it's not supposed to touch - continuous-deployment

I run two versions of the same service (beta and prod) on the same EC2 box.
Each service consists of two processes running in two separate directories A, B.
so, in the /var/myproject/ directory, I have four folders
A
A.beta
B
B.beta
I'm using CodeDeploy (as part of a Code Pipeline) to deploy these two stages
here is the appspec.yml I have (for the prod stage)
version: 0.0
os: linux
files:
- source: DeployFolders/ProcessA
destination: /var/myproject/A
- source: DeployFolders/ProcessB
destination: /var/myproject/B
permissions:
- object: /var/myproject/A
mode: 777
- object: /var/myproject/B
mode: 777
for the beta stage
version: 0.0
os: linux
files:
- source: DeployFolders/ProcessA
destination: /var/myproject/A.beta
- source: DeployFolders/ProcessB
destination: /var/myproject/B.beta
permissions:
- object: /var/myproject/A.beta
mode: 777
- object: /var/myproject/B.beta
mode: 777
The Prod stage runs after the beta stage and deletes the beta deployment folders (A.beta and B.beta)
Next deployment, as I deploy the beta stage first, it deletes the prod deployment folders (A and B) that had been created before.
I understand that CodeDeploy must and will overwrite the destination folders, but in this case, it is deleting sibling folders.
What am I doing wrong?

Related

Accessing Cloud SQL from Cloud Build

I want to configure CI/CD from Cloud Repositories that builds my CMS (Directus) when I push to main repository.
In the build-time, the project needs to access Cloud SQL. But I get this error:
I tried this database configuration with gcloud app deploy and it connects Cloud SQL and runs.
cloudbuild.yaml (It crashes at second step, so I didn't add other steps for simplicity):
steps:
- name: node:16
entrypoint: npm
args: ['install']
dir: cms
- name: node:16
entrypoint: npm
args: ['run', 'start']
dir: cms
env:
- 'NODE_ENV=PRODUCTION'
- 'EXTENSIONS_PATH="./extensions"'
- 'DB_CLIENT=pg'
- 'DB_HOST=/cloudsql/XXX:europe-west1:XXX'
- 'DB_PORT="5432"'
- 'DB_DATABASE="XXXXX"'
- 'DB_USER="postgres"'
- 'DB_PASSWORD="XXXXXX"'
- 'KEY="XXXXXXXX"'
- 'SECRET="XXXXXXXXXXXX"'
Node-pg (node library) adds /.s.PGSQL.5432 at the end automatically. That's why it is not written in DB_HOST.
IAM roles:
How can I solve this error? I read so many answers in Stackoverflow but none of them helped me. I found this article but I didn't fully understand how to implement it in my case (https://cloud.google.com/sql/docs/postgres/connect-build).
Without your full Cloud Build yaml, it's hard to say for sure - but, it looks like you aren't following the steps in the documentation correctly.
Roughly what you should be doing is:
Downloading the cloud_sql_proxy into your container space
In a follow up step, start the cloud_sql_proxy then (in the same step) run your script, connecting to the proxy via either tcp or unix socket.
I don't see your yaml describing the proxy at all.

Can't start Oracle Database XE 18.4 Docker Container

I'm having this problem after creating the Oracle Database XE 18.4 image with WSL2. I'm trying to create a container based on this image and I keep receiving these errors, even though I'm doing exactly the same thing that is asked on this tutorial provided by Oracle.
The errors show up when I try to create the container and turn it on for the first time
sed: can't read /etc/oratab: No such file or directory
/opt/oracle/runOracle.sh: line 194: /etc/init.d/oracle-xe-18c: No such file or directory
grep: /etc/oratab: No such file or directory
/opt/oracle/checkDBStatus.sh: line 18: oraenv: No such file or directory
#####################################
########### E R R O R ###############
DATABASE SETUP WAS NOT SUCCESSFUL!
Please check output for further info!
########### E R R O R ###############
#####################################
The following output is now a tail of the alert.log:
tail: cannot open '/opt/oracle/diag/rdbms/*/*/trace/alert*.log' for reading: No such file or directory
tail: no files remaining
I would like to know what on earth could I do to solve these errors and get this database running. As a matter of fact, I can't verify if these files mentioned in the log exist because I can't even connect to this container as it remains on for around 5 seconds due to these errors.
I'm using Docker on Windows integrated with WSL2.
My Docker installation info is:
Client: Docker Engine - Community
Cloud integration: 1.0.12
Version: 20.10.5
API version: 1.41
Go version: go1.13.15
Built: Tue Mar 2 20:14:53 2021
OS/Arch: windows/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 20.10.5
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 363e9a8
Built: Tue Mar 2 20:15:47 2021
OS/Arch: linux/amd64
containerd:
Version: 1.4.4
runc:
Version: 1.0.0-rc93
docker-init:
Version: 0.19.0
The Dockerfile for XE v18.4.0 is different from all the others in the same repo as it tries to pull the image directly from the oracle web server using https during the container build phase. But the container build phase itself happens inside a container (FROM...) so, in my case, it was failing because it did not have the right internet connectivity (shitty proxy with https problems). The image was created, but it did not contain the database engine.
I have modified the Dockerfile inside OracleDatabase\SingleInstance\dockerfiles\18.4.0 so that istead of using the https origin it does a COPY of a (already downloaded) oracle-database-xe-18c-1.0-1.x86_64.rpm inside the image and installs it "locally".
I used as a template the Dockerfile of another version, but it's quite simple.
Tucked away in docker-images\OracleDatabase\SingleInstance\README.md is the following:
IMPORTANT: You will have to provide the installation binaries of Oracle Database (except for Oracle Database 18c XE) and put them into the dockerfiles/<version> folder. You only need to provide the binaries for the edition you are going to install. The binaries can be downloaded from the Oracle Technology Network, make sure you use the linux link: Linux x86-64. The needed file is named linuxx64_<version>_database.zip. You also have to make sure to have internet connectivity for yum. Note that you must not uncompress the binaries. The script will handle that for you and fail if you uncompress them manually!
If you download the OracleXE RPM from https://www.oracle.com/uk/database/technologies/xe-downloads.html and copy it into the version directory as described in the doc, when building the Oracle XE docker image, it seems to do a full install of Oracle XE using the downloaded RPM.
If you skip the manual download of the RPM before building the Docker image, it seems the container will be built, but it tries to do the download when run, which for me at least, didn't work.
Once the Docker image has been built, a container can be started using:
docker run --name oraclexe \
-p 51521:1521 \
-p 55500:5500 \
-v [HOST_PATH]:/opt/oracle/oradata \
-e ORACLE_PWD=mysecurepassword \
-e ORACLE_CHARACTERSET=AL32UTF8 \
oracle/database:18.4.0-xe
Where HOST_PATH is the path to the local directory that Oracle will store the database in.

How to have dynamic version name at run time when deploying google app engine in Travis CI?

I am studying to automate the build and deployment of my google app engine application in Travis, so far it allows me to have static or predefined version name during deployment in .travis.yml.
Is there any way to make it dynamically generated at runtime? Like for example below in my .travis.yml file, I have deployment for production and staging version of the application, both are named or labeled as production and qa-staging, and I would like to suffix the version names with a timestamp or anything as long as it would be unique every successful build and deployment.
language: node_js
node_js:
- "10"
before_install:
- openssl aes-256-cbc -K $encrypted_c423808ed406_key -iv $encrypted_c423808ed406_iv
-in gae-creds.json.enc -out gae-creds.json -d
- chmod +x test.sh
- cat gae-creds.json
install:
- npm install
script:
- "./test.sh"
deploy:
- provider: gae
skip_cleanup: true
keyfile: gae-creds.json
project: traviscicd
no_promote: true
version: qa-staging
on:
branch: staging
- provider: gae
skip_cleanup: true
keyfile: gae-creds.json
project: traviscicd
version: production
on:
branch: master
Have you tried with https://yaml.org/type/timestamp.html ?
Im not sure if the context is the correct but seems a good and elegant option for your yaml file.
Perhaps you can use go generate to generate a version string that can be included? You need to run go generate as part of the build process for it to work, though.

No package found with specified pattern: D:\a\r1\a\**\*.zip

I created a build definition in vsts with npm build and then I copy the build folder to the drop location.
The build pipeline is working fine
Then I created the release definition and it downloads the files correctly also:
2018-08-10T16:29:18.5241580Z Downloading artifact drop from: https://xx.visualstudio.com//_apis/resources/Containers/711976?itemPath=drop&isShallow=true&api-version=4.1-preview.4
2018-08-10T16:29:18.5252684Z Downloading drop/s/build/asset-manifest.json to D:\a\r1\a\InnovationInABox-CI\drop\s\build\asset-manifest.json
2018-08-10T16:29:18.5253850Z Downloaded drop/s/build/asset-manifest.json to D:\a\r1\a\InnovationInABox-CI\drop\s\build\asset-manifest.json
2018-08-10T16:29:18.5338277Z Downloading drop/s/build/favicon.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\favicon.png
2018-08-10T16:29:18.5338720Z Downloaded drop/s/build/favicon.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\favicon.png
2018-08-10T16:29:19.5191236Z Downloading drop/s/build/index.html to D:\a\r1\a\InnovationInABox-CI\drop\s\build\index.html
2018-08-10T16:29:19.5191520Z Downloaded drop/s/build/index.html to D:\a\r1\a\InnovationInABox-CI\drop\s\build\index.html
2018-08-10T16:29:19.5195415Z Downloading drop/s/build/manifest.json to D:\a\r1\a\InnovationInABox-CI\drop\s\build\manifest.json
2018-08-10T16:29:19.5195775Z Downloaded drop/s/build/manifest.json to D:\a\r1\a\InnovationInABox-CI\drop\s\build\manifest.json
2018-08-10T16:29:19.5198280Z Downloading drop/s/build/service-worker.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\service-worker.js
2018-08-10T16:29:19.5198598Z Downloaded drop/s/build/service-worker.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\service-worker.js
2018-08-10T16:29:19.5704236Z Downloading drop/s/build/css/ionicons.min.css to D:\a\r1\a\InnovationInABox-CI\drop\s\build\css\ionicons.min.css
2018-08-10T16:29:19.5725284Z Downloaded drop/s/build/css/ionicons.min.css to D:\a\r1\a\InnovationInABox-CI\drop\s\build\css\ionicons.min.css
2018-08-10T16:29:19.5833575Z Downloading drop/s/build/iconfont/iconfont.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.svg
2018-08-10T16:29:19.5868415Z Downloading drop/s/build/fonts/ionicons.eot to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.eot
2018-08-10T16:29:19.5901623Z Downloading drop/s/build/fonts/ionicons.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.svg
2018-08-10T16:29:19.5922072Z Downloaded drop/s/build/iconfont/iconfont.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.svg
2018-08-10T16:29:19.5967502Z Downloading drop/s/build/iconfont/iconfont.ttf to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.ttf
2018-08-10T16:29:19.5990580Z Downloaded drop/s/build/fonts/ionicons.eot to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.eot
2018-08-10T16:29:19.6014585Z Downloading drop/s/build/iconfont/iconfont.eot to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.eot
2018-08-10T16:29:19.6041800Z Downloaded drop/s/build/iconfont/iconfont.ttf to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.ttf
2018-08-10T16:29:19.6082471Z Downloading drop/s/build/fonts/ionicons.woff to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.woff
2018-08-10T16:29:19.6355639Z Downloading drop/s/build/fonts/ionicons.ttf to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.ttf
2018-08-10T16:29:19.6356035Z Downloaded drop/s/build/fonts/ionicons.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.svg
2018-08-10T16:29:19.6609672Z Downloaded drop/s/build/iconfont/iconfont.eot to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.eot
2018-08-10T16:29:19.6614749Z Downloading drop/s/build/images/icons/icon-128x128.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-128x128.png
2018-08-10T16:29:19.6649976Z Downloaded drop/s/build/images/icons/icon-128x128.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-128x128.png
2018-08-10T16:29:19.6691472Z Downloaded drop/s/build/fonts/ionicons.woff to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.woff
2018-08-10T16:29:19.6715380Z Downloading drop/s/build/images/icons/icon-144x144.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-144x144.png
2018-08-10T16:29:19.6721599Z Downloaded drop/s/build/fonts/ionicons.ttf to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.ttf
2018-08-10T16:29:19.6730634Z Downloaded drop/s/build/images/icons/icon-144x144.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-144x144.png
2018-08-10T16:29:19.6925986Z Downloading drop/s/build/images/icons/icon-192x192.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-192x192.png
2018-08-10T16:29:19.6932585Z Downloaded drop/s/build/images/icons/icon-192x192.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-192x192.png
2018-08-10T16:29:19.7051155Z Downloading drop/s/build/images/icons/icon-384x384.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-384x384.png
2018-08-10T16:29:19.7068272Z Downloaded drop/s/build/images/icons/icon-384x384.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-384x384.png
2018-08-10T16:29:19.7128194Z Downloading drop/s/build/static/css/main.1338bde0.css to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\css\main.1338bde0.css
2018-08-10T16:29:19.7136566Z Downloading drop/s/build/images/icons/icon-72x72.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-72x72.png
2018-08-10T16:29:19.7139811Z Downloaded drop/s/build/images/icons/icon-72x72.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-72x72.png
2018-08-10T16:29:19.7210596Z Downloaded drop/s/build/static/css/main.1338bde0.css to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\css\main.1338bde0.css
2018-08-10T16:29:19.7331736Z Downloading drop/s/build/static/js/1.f6d2865a.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\1.f6d2865a.chunk.js
2018-08-10T16:29:19.7336557Z Downloaded drop/s/build/static/js/1.f6d2865a.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\1.f6d2865a.chunk.js
2018-08-10T16:29:19.7384208Z Downloading drop/s/build/static/js/2.194ad0ec.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\2.194ad0ec.chunk.js
2018-08-10T16:29:19.7388897Z Downloaded drop/s/build/static/js/2.194ad0ec.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\2.194ad0ec.chunk.js
2018-08-10T16:29:19.7493081Z Downloading drop/s/build/images/icons/icon-512x512.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-512x512.png
2018-08-10T16:29:19.7505060Z Downloaded drop/s/build/images/icons/icon-512x512.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-512x512.png
2018-08-10T16:29:19.7521694Z Downloading drop/s/build/images/icons/icon-96x96.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-96x96.png
2018-08-10T16:29:19.7524304Z Downloaded drop/s/build/images/icons/icon-96x96.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-96x96.png
2018-08-10T16:29:19.7531569Z Downloading drop/s/build/images/icons/icon-152x152.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-152x152.png
2018-08-10T16:29:19.7544109Z Downloading drop/s/build/iconfont/iconfont.woff to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.woff
2018-08-10T16:29:19.7561190Z Downloaded drop/s/build/images/icons/icon-152x152.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-152x152.png
2018-08-10T16:29:19.7583131Z Downloaded drop/s/build/iconfont/iconfont.woff to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.woff
2018-08-10T16:29:19.7615220Z Downloading drop/s/build/static/js/4.0230ee4e.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\4.0230ee4e.chunk.js
2018-08-10T16:29:19.7620680Z Downloaded drop/s/build/static/js/4.0230ee4e.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\4.0230ee4e.chunk.js
2018-08-10T16:29:19.8139663Z Downloading drop/s/build/static/media/sign.adf5846b.jpg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\sign.adf5846b.jpg
2018-08-10T16:29:19.8209000Z Downloaded drop/s/build/static/media/sign.adf5846b.jpg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\sign.adf5846b.jpg
2018-08-10T16:29:19.8445251Z Downloading drop/s/build/static/media/uk.bc48afcc.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\uk.bc48afcc.svg
2018-08-10T16:29:19.8451360Z Downloaded drop/s/build/static/media/uk.bc48afcc.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\uk.bc48afcc.svg
2018-08-10T16:29:19.9315367Z Downloading drop/s/build/static/media/france.bcd389de.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\france.bcd389de.svg
2018-08-10T16:29:19.9316203Z Downloading drop/s/build/static/media/spain.6a9dc11f.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\spain.6a9dc11f.svg
2018-08-10T16:29:19.9316588Z Downloaded drop/s/build/static/media/france.bcd389de.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\france.bcd389de.svg
2018-08-10T16:29:19.9317287Z Downloaded drop/s/build/static/media/spain.6a9dc11f.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\spain.6a9dc11f.svg
2018-08-10T16:29:19.9430066Z Downloading drop/s/build/static/media/italy.604345b4.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\italy.604345b4.svg
2018-08-10T16:29:19.9430433Z Downloaded drop/s/build/static/media/italy.604345b4.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\italy.604345b4.svg
2018-08-10T16:29:20.0800791Z Downloading drop/s/build/static/js/3.06bbf4d1.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\3.06bbf4d1.chunk.js
2018-08-10T16:29:20.0801318Z Downloaded drop/s/build/static/js/3.06bbf4d1.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\3.06bbf4d1.chunk.js
2018-08-10T16:29:20.0962282Z Downloading drop/s/build/static/js/0.cdfd5bd5.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\0.cdfd5bd5.chunk.js
2018-08-10T16:29:20.0962659Z Downloaded drop/s/build/static/js/0.cdfd5bd5.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\0.cdfd5bd5.chunk.js
2018-08-10T16:29:20.1118659Z Downloading drop/s/build/static/js/main.03f3e98f.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\main.03f3e98f.js
2018-08-10T16:29:20.1541007Z Downloaded drop/s/build/static/js/main.03f3e98f.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\main.03f3e98f.js
2018-08-10T16:29:20.1566610Z Downloading drop/s/build/static/media/china.4e4d59b7.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\china.4e4d59b7.svg
2018-08-10T16:29:20.1569167Z Downloaded drop/s/build/static/media/china.4e4d59b7.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\china.4e4d59b7.svg
2018-08-10T16:29:21.1552541Z Total Files: 35, Processed: 35, Skipped: 0, Failed: 0, Download time: 3.288 secs, Download size: 1.320MB
2018-08-10T16:29:21.1844380Z Successfully downloaded artifacts to D:\a\r1\a/InnovationInABox-CI
2018-08-10T16:29:21.1897267Z ##[section]Finishing: Download artifact - InnovationInABox-CI
But the next step, is to deploy to an Azure web app: but I get this error:
2018-08-10T16:29:21.8347426Z Got connection details for Azure App Service:'uiapp'
2018-08-10T16:29:24.0708659Z ##[error]Error: No package found with specified pattern: D:\a\r1\a\**\*.zip
2018-08-10T16:29:26.8772211Z Successfully updated deployment History at https://xxx.scm.azurewebsites.net/api/deployments/81533918564296
2018-08-10T16:29:26.8855771Z ##[section]Finishing: Deploy Azure App Service
How can I copy all those files from the build folder (which are not in a .zip file) to Azure webapp?
In my case (build .sln with c# project from azure git) the build was saving the package in D:\a\1\a\ folder (instead of r1\a) and I wasn't able to edit the build steps in the UI so I edited the newly added azure-pipelines.yml file and added one more task at the very end:
- task: PublishBuildArtifacts#1
This copies the .zip package to a "drop" location (r1/a) which the Release Pipeline expects.
​And now the Release Pipeline is finding the file in r1/a folder.
If you are using "Azure App Service Deploy" task, set the "Package or folder" path to: $(System.DefaultWorkingDirectory)\InnovationInABox-CI\drop\s\build.
For anyone else experiencing this problem using Azure DevOps, it's useful to turn on debug mode. For your release, define the pipeline variable System.Debug with value true.
That gave me this output which was much more useful:
Now at least I know it's on my target VM and the path is probably wrong.
You can't use wildcards for folder names unfortunately, only for file names. If you're using a 'Copy Files' build task you can put this value in 'Source Folder':
D:\a\r1\a\
and this value in 'Contents':
**\*.zip
Or you can put the full file directories with *.zip. Good luck.
First i think you should add artifacts1 then attach it to the packages2
In my case (react app deployed as static content to app service) I needed to add a step to archive the build directory before publishing it:
- task: ArchiveFiles#2
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/build'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
- publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
artifact: '$(Build.BuildId)'
Per Azure official document for setting up Pipelines (YAML files) for Node.js, Javascript apps from this link https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/javascript?view=azure-devops&tabs=code
Configure the YAML file as below:
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool#0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
npm install
npm run build
displayName: 'npm install and build'
- task: CopyFiles#2
inputs:
Contents: 'build/**' # Pull the build directory (React)
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts#1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory) # dist or build files
ArtifactName: 'www' # output artifact named www
On the latest version of Azure Devops, edit Release under Pipeline. Note that Build section has been taken off in the latest version (as of June 2020), so some older answers/docs was not working.
Click on Deploy Azure App Services and on the right panel click on ...(Expand Folder) for Package or folder Option
Under Linked Artifacts => MyProject (Build) => www, select dist folder.
Save this and then create release, this should solve the error [error]Error: No package found with the specified pattern: D:\a\r1\a\**\*.zip<br/>
I used the below task in Azure DevOps release yaml pipeline for deployment of azure function app and set the package to $(System.DefaultWorkingDirectory) and it worked for me.
- task: AzureFunctionApp#1
inputs:
azureSubscription: XXXXXXXXX
appType: 'functionApp'
appName: 'funcapp-test'
package: '$(System.DefaultWorkingDirectory)'
appSettings:
deploymentMethod: 'auto'
In my case I use azure template but change vmImage: "windows-latest", When I check logs, find out build command didn't run so I figure out I should change default script of install and build to separate script
trigger:
- main
pool:
vmImage: 'windows-latest'
variables:
buildFolder: 'build'
steps:
- task: NodeTool#0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
npm install
displayName: 'npm install'
- script: |
npm run build
displayName: 'npm build'
- task: CopyFiles#2
inputs:
contents: 'build/**'
targetFolder: '$(Build.ArtifactStagingDirectory)'
cleanTargetFolder: true
- task: ArchiveFiles#2
inputs:
rootFolderOrFile: $(Build.ArtifactStagingDirectory)
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
includeRootFolder: false
- task: PublishBuildArtifacts#1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
artifactName: 'drop'
publishLocation: 'Container'
Just went through this again. What worked for me was modifying "Package or folder" to use Agent.ReleaaseDirectory. Screenshot below, may it save someone else the angst.

Couldn't find basic_configs folder while setting up SolR using Bitnami

I have been following below article to set up Solr and stuck at Step 1
http://www.bugdebugzone.com/2016/11/part-2-sitecore-82-with-solr-62.html
I have installed solr-7.2.1-0 with latest Bitnami software ( https://bitnami.com/stack/solr ) and now looking for basic_configs folder but I couldn't find. configsets folder contains only two folder
C:\Bitnami\solr-7.2.1-0\apache-solr\server\solr\configsets
_default
sample_techproducts_configs
Now how can I complete step 1
The installation process will create several sub-directories under the installdir (C:\Bitnami\solr-7.2.1-0\) directory:
Servers and related tools: apache2\, mysql\, postgresql\, apache-tomcat\, etc.
Languages: php\, python\, ruby\, tcl\, etc.
Application files: apps\phpMyAdmin\, apps\drupal\, apps\joomla\, apps\solr\, etc.
Common libraries: common\
Licenses of the components included in the stack: licenses\
Application files are stored in the C:\Bitnami\solr-7.2.1-0\apps\solr\htdocs directory. The configuration file for the Apache Web server is stored in the C:\Bitnami\solr-7.2.1-0\apps\solr\conf\ directory.

Resources