using docker:// url syntax correctly in a Bitbucket pipeline - bitbucket-pipelines

I have a Bitbucket pipeline with the following Step:
- step:
name: Package METADATA
script:
- mkdir meta
- pipe: docker://hub.docker.com/repository/docker/mycompany/bladepackager-pipeline:latest
variables:
FILENAME:
When it runs, it errors out with the message:
Unable to find image 'hub.docker.com/repository/docker/mycompany/bladepackager-pipeline:latest' locally
docker: Error response from daemon: error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "<!doctype html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"utf-8\">\n <title>404 : Docker</title>\n \n </div>\n Try visiting our <a href=\"
How do I fix the URL of the Docker image using docker:// syntax?
Please note: I can't use the shortened version of the URL (without specifying the docker:// prefix), because this is the only way to specify the latest tag in a Bitbucket pipeline

Related

Errors hosting hugo website on cloudflare

I am trying to host a hugo site I made on cloudflare but it keeps giving me error when it tried to build the site, the site uses a custom build command and it works just fine on my pc (which is running windows 10).
I am not exactly sure what the error is but I think it has something to do with calling the other files. any help would be much appreciated.
(Cloudflare is cloning the site from my Github repo)
Here are the logs from cloudflare:
Executing user command: hugo server -t hugo-theme-shell -w -D
2022-11-13T23:03:07.769635Z Building sites … ERROR 2022/11/13 23:03:07 render of "home" failed: execute of template failed: template: index.html:3:8: executing "index.html" at <partial "head.html" ...>: error calling partial: "/opt/buildhome/repo/themes/hugo-theme-shell/layouts/partials/head.html:6:7": execute of template failed: template: partials/head.html:6:7: executing "partials/head.html" at <partial "themes/hugo...>: error calling partial: Partial "themes/hugo-theme-shell/layouts/partials/style.html" not found
2022-11-13T23:03:07.769998Z ERROR 2022/11/13 23:03:07 render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:3:8: executing "_default/list.html" at <partial "head.html" ...>: error calling partial: "/opt/buildhome/repo/themes/hugo-theme-shell/layouts/partials/head.html:6:7": execute of template failed: template: partials/head.html:6:7: executing "partials/head.html" at <partial "themes/hugo...>: error calling partial: Partial "themes/hugo-theme-shell/layouts/partials/style.html" not found
2022-11-13T23:03:07.770177Z Total in 3 ms
2022-11-13T23:03:07.770303Z Error: Error building site: failed to render pages: render of "taxonomyTerm" failed: execute of template failed: template: _default/list.html:3:8: executing "_default/list.html" at <partial "head.html" ...>: error calling partial: "/opt/buildhome/repo/themes/hugo-theme-shell/layouts/partials/head.html:6:7": execute of template failed: template: partials/head.html:6:7: executing "partials/head.html" at <partial "themes/hugo...>: error calling partial: Partial "themes/hugo-theme-shell/layouts/partials/style.html" not found
2022-11-13T23:03:07.77619Z Failed: build command exited with code: 255
2022-11-13T23:03:08.586593Z Failed: an internal error occurred
I tried going through the files but I was having a hard time understanding what the errors were and what was causing them.
I also tried making sure all the files were uploaded to Github properly.
"Partial "themes/hugo-theme-shell/layouts/partials/style.html" not found"
It can't find the partial "style.html"
I suggest you share your github repo, because otherwise it is difficult to analyze.
It could be:
an issue with the directory structure in Windows vs when deploying in GitHub. Check in particular the slashes and backslashes that behave differently.
a difference between the hugo version used by GitHub to render your site, and the one you use on your local computer
an issue with the CloudFlare page deployment module, which is still quite new. See the known limitations below. And you can also have a look at similar issues in the CloudFlare community forum.
https://developers.cloudflare.com/pages/platform/known-issues/
If you can not fix it, an alternative would be to render the site on your desktop, then commit on github with Hugo public/ directory, and then use CloudFlare Pages without the Hugo deployment, just using pointing to your public/ directory.

Getting 403 when I docker login epregistry.azurecr.io from vs code

I am following this tutorial https://www.youtube.com/watch?v=I1cG1FRjFOQ and it uses the password from the registry in Azure to login. However, when I try to login running the command docker login epregistry.azurecr.io it gives me the following error Error response from daemon: Get "https://epregistry.azurecr.io/v2/": error parsing HTTP 403 response body: unexpected end of JSON input: "". Can someone please help me?
I think this ACR login server doesn't exist or has been deleted.
I reproduced with my ACR and can log in correctly.
So after I deleted ACR and tried to log in again, I got the same error. (But it is HTTP 404)
Error response from daemon: Get "https://<My-ACR>.azurecr.io": error parsing HTTP 404 response body: unexpected end of JSON input: ""

vault-secrets-provider alias not recognized with terraform-vault template

I'm having some issues when trying to use Hashicorp vault template (with terraform to.be.continuous).
Actually when I use it with terraform-vault template I got an error message.
This is a summary of .gitlab-ci.yml
include:
- project: "to-be-continuous/terraform"
ref: "2.4.0"
file: "templates/gitlab-ci-terraform.yml"
# Vault variant
- project: 'to-be-continuous/terraform'
ref: '2.4.0'
file: '/templates/gitlab-ci-terraform-vault.yml'
variables:
VAULT_BASE_URL: "https://vault.secrets.tech.orange/v1"
VAULT_ROLE_ID: $VAULT_ROLE_ID
VAULT_SECRET_ID: $VAULT_SECRET_ID
GCP_MYSECRET: "#url#http://vault-secrets-provider/api/secrets/XXX/gcp/credentials?field=mygcpsecret"
Error Message:
[ERROR] Failed getting secret GCP_MYSECRET:
... Connecting to vault-secrets-provider (127.0.0.1:80)
... wget: server returned error: HTTP/1.1 404 Not Found
I tried without vault template and it works.
Would you please help me with this? Or perhaps, where I can ask for some help?
It turns out you were facing this issue due to a Kubernetes runners limitation.
As stated in GitLab documentation,
Kubernetes runners cannot use several services using the same port
As a result, using the tracking service in addition to another one using the same port (80) fails.
It has now been fixed.

Having problems downloading rancher to my machine

I hope all is well with this pandemic going on. To get to the chase, I'm trying to install rancher on my mac and I've been stuck for the longest at this point. I believe I have everything downloaded properly. Is there something that I'm missing?
this is running on redhat os linux btw
and this is the command that I am trying to run: ./kubectl -n cattle-system apply -R -f ./rancher
and this is a look at my directory
Thank You So Much!
error validating "rancher/Chart.yaml": error validating data: kind not set; [![enter image description here][1]][1]if you choose to ignore these errors, turn validation off with --validate=false
error parsing rancher/templates/clusterRoleBinding.yaml: error converting YAML to JSON: yaml: line 6: did not find expected key
error parsing rancher/templates/deployment.yaml: error converting YAML to JSON: yaml: line 6: did not find expected key
error parsing rancher/templates/ingress.yaml: error converting YAML to JSON: yaml: line 6: did not find expected key
error parsing rancher/templates/issuer-letsEncrypt.yaml: json: line 0: invalid character '{' looking for beginning of object key string
error parsing rancher/templates/issuer-rancher.yaml: json: line 0: invalid character '{' looking for beginning of object key string
error parsing rancher/templates/service.yaml: error converting YAML to JSON: yaml: line 6: did not find expected key
error parsing rancher/templates/serviceAccount.yaml: error converting YAML to JSON: yaml: line 6: did not find expected key
error validating "rancher/values.yaml": error validating data: [apiVersion not set, kind not set]; if you choose to ignore these errors, turn validation off with --validate=false
You should follow the installation instructions for HA here: https://rancher.com/docs/rancher/v2.x/en/installation/k8s-install/ or for standalone mode here: https://rancher.com/docs/rancher/v2.x/en/installation/other-installation-methods/single-node-docker/
I guess you have downloaded the rancher helm chart directory and trying to install it using kubectl, which wouldn't work.
Under the HA instructions, you will find the helm install command.

Gitlab CI environment lint syntax incorrect

Trying to check my .gitlab-ci.yml for errors and discovered this through the CI Lint in CI/CD section. The following section throws syntax incorrect even though it's according to https://my.gitlab-instance/help/ci/environments
environment:
name: staging
url: https://staging.example.com
Produces this lint error:
Status: syntax is incorrect
Error: jobs:environment config contains unknown keys: name, url
Even trying to hack away with adding dashes like this
environment:
- name: staging
- url: https://staging.example.com
Which gives this instead
Status: syntax is incorrect
Error: jobs:environment config should be a hash
Any ideas how to do this correct?
The team updated Gitlab instance to latest version and the lint error have since disappeared. No idea if this was the actual fix to the lint error but seemed to be working since then.

Resources